从VCF和ref序列掩蔽低覆盖和无覆盖位置建立共识序列。

vcf-consensus-builder的Python项目详细描述


VCF共识构建者

https://img.shields.io/pypi/v/vcf_consensus_builder.svghttps://img.shields.io/travis/peterk87/vcf_consensus_builder.svgDocumentation Status

从VCF和参考序列建立一致性序列,屏蔽低覆盖和无覆盖位置。在

可以使用bcftools consensus,但在bcftools生成共识后,您需要应用低覆盖率和无覆盖位置掩蔽,这可能很棘手。在

特点

  • 默认情况下,使用N-在引用(默认:0X和<;5X)中屏蔽低覆盖率和无覆盖率位置
  • 不需要bgzipVCF文件,也不需要像bcftools consensus那样对其进行索引。在

用法

安装

使用来自PyPI的pip安装

pip install vcf_consensus_builder

显示帮助

帮助消息:

^{pr2}$

基本用法

运行测试数据,包括回购

# Clone this repo and enter it
$ git clone https://github.com/peterk87/vcf_consensus_builder.git --depth=1
$ cd vcf_consensus_builder/
# run vcf_consensus_builder on test data
$ vcf_consensus_builder -v tests/data/test.vcf \
    -d tests/data/test-depths.tsv \
    -r tests/data/ref.fa
# produces the following to stdout
>sample1 ref="ref ref"
NACCGTANACAATAN--

在参考序列中屏蔽no和低覆盖位置

vcf_consensus_builder首先在引用序列文件中屏蔽no和low coverage位置,然后在VCF中应用ALT变量。在

注意:vcf_consensus_builder不执行任何VCF变量筛选。假设VCF输入文件只包含您希望在一致性序列中看到的变体。请将bcftools filter与适当的筛选/排除表达式一起使用,以获得您希望在一致意见中表示的变体(有关如何筛选VCF文件的详细信息,请参见https://samtools.github.io/bcftools/howtos/filtering.html

给出这个参考序列

>ref
NGCCAAGTCTNCGACATN-

这个samtools depth输出

sample1     ref     1       4
sample1     ref     2       9
sample1     ref     3       9
sample1     ref     4       9
sample1     ref     5       9
sample1     ref     6       9
sample1     ref     7       10
sample1     ref     8       10
sample1     ref     9       10
sample1     ref     10      10
sample1     ref     11      3
sample1     ref     12      9
sample1     ref     13      9
sample1     ref     14      9
sample1     ref     15      9
sample1     ref     16      9
sample1     ref     17      5
sample1     ref     18      4
sample1     ref     19      0
sample1     ref     20      0

参考序列中的低(低于5X)和无(0X)覆盖位置将分别替换为N-。在

屏蔽参考序列将是:

>ref
NGCCAAGTCTNCGACATN-

这个屏蔽序列将用于生成一致性序列。在

学分

此包是用Cookiecutteraudreyr/cookiecutter-pypackage项目模板创建的。在

历史

  • PyPI的第一个版本。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用bouncycastle从pkcs7文件获取证书?   java是向字符串数字添加零的有效方法吗?   Android在外部播放器中播放视频url   如何在Java代码中调用Wildfly事务管理器?   java为什么在使用键盘完成选择时不触发选择事件?   java xpath错误:jaxb外部绑定文件上为null   java如何避免在活动之间切换时出现白屏   Hadoop安装程序中的java“unknown.prolexic.com:未知错误”   要用作out参数的java自定义数字类   java如何向spring控制器的http请求添加属性?   for循环中的java静态值   java为图像编辑器快速、可靠地保存/加载文档状态   java数组越界和空指针异常   java如何在列表<Object>对象包含对象的对象上检查null?   java从URL下载文件到tomcat服务器   GlassFish“ogs3.1.2.2windows.exe”和“ogs3.1.2.2windowsml.exe”文件之间的java差异   无MathLab的Java Gabor图像处理   包含CSV中不存在的其他字段的java mongoimport