This is a test version of Biostars. For the public version, visit https://www.biostars.org.
samtools mpileup to bcftools mpileup

I got

samtools mpileup option `u` is functional, but deprecated. Please switch to using bcftools mpileup in future.

How could I convert the following commands to bcftools mpileup ?

samtools mpileup -uf QMg-NbQ3P-RN.fasta aln_P1O1.sorted.bam | bcftools view -bvcg - > P1O1_var.raw.bcf
bcftools view P1O1_var.raw.bcf | vcfutils.pl varFilter -D100 > P1O1_var.flt.vcf

Thank you in advance.

snp bcftools samtools

1 answer

Hello Ric ,

first make sure you have the latest version of samtools and bcftools.

$ bcftools mpileup -Ou QMg-NbQ3P-RN.fasta aln_P1O1.sorted.bam | bcftools call -Ou -mv  | bcftools norm -Ou -f QMg-NbQ3P-RN.fasta | bcftools view -e 'FORMAT/DP > 100' > P1O1_var.flt.vcf
  • The bcftools view command you showed was only used for bcftools version < 1 and is replaced by bcftools call
  • I recommend to normalize your indel variants, that's why I added a bcftools norm step
  • For removing variants with read depth greater 100 I used bcftools view

fin swimmer

Log in to answer this question.