从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双链表输出删除的元素   java如何计算字符串方法中的单词数?   java在遍历列表时跳过第一项   java Spring 5.0.0。调用ApplicationEventListener时发生M3错误:在上下文初始化期间未遇到ServletContext集异常   java searchview不显示任何结果   XML中的java连接   java增加价值并存储在Firebase中   java如何从特定固定长度的字符串创建子字符串   弗林克:爪哇。木卫一。NotSerializableException:redis。客户。绝地武士。绝地武士团   java如何跟踪我的内部框架?   JavaCayenne:解析表达式后检索标记的位置   通过扫描器的java用户输入与if语句不匹配   java如何根据深层嵌套对象中的字段对领域进行排序?