生物信息学

[bcftools] 过滤vcf

2021-03-02  本文已影响0人  Silver_42ac
#-i/e, --include/--exclude <expr>    
#select/exclude sites for which the expression is true (see man page for details)

bcftools view -i "DP>10" -o  ${vcf}.gz  -Oz ${vcf}

expressions

报错:

Both INFO/DP and FORMAT/DP exist, which one do you want?

这里做下修改

ls *.raw.snv_indel.vcf > all.vcf.lst

while read vcf ;do
bcftools view -i "INFO/DP>10" -o  ${vcf}.gz  -Oz ${vcf}
bcftools index ${vcf}.gz

done < all.vcf.lst

bcftools merge  -Ov  -o  all_sample.merge.vcf  *.gz 

参考:
http://www.htslib.org/doc/1.0/bcftools.html#expressions

上一篇 下一篇

猜你喜欢

热点阅读