samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
666 stars 240 forks source link

Missing info field from samtools/bcftools-1.8 output #775

Closed TashyK closed 6 years ago

TashyK commented 6 years ago

I recently updated software to samtools/bcftools-1.8 (from v 1.2). After mapping of illumina data to a references (using BWA), I use samtools to call SNPs and bcftools to produce VCF files.

While I get output there are a bunch of headers missing from my VCF files - the most important being the AF field, which I need for downstream analysis.

Any help or advice would be much appreciated.

Here is example code: "$pathtotools"samtools-1.8/bin/samtools mpileup -Bguf MTB_ancestor_reference.fas "$GENOME".sort.bam | "$pathtotools"bcftools-1.8/bin/bcftools call -Ob -m > "$GENOME".all.raw.bcf ; "$pathtotools"bcftools-1.8/bin/bcftools view -v snps,indels -Ob "$GENOME".all.raw.bcf > "$GENOME".var.raw.bcf ; "$pathtotools"bcftools-1.8/bin/bcftools view "$GENOME".all.raw.bcf > "$GENOME".all.raw.vcf ;

And an example of the first bit of my VCF file.

fileformat=VCFv4.2

FILTER=

samtoolsVersion=1.8+htslib-1.8

samtoolsCommand=samtools mpileup -Bguf MTB_ancestor_reference.fas 1_S1_L001.sort.bam

reference=file://MTB_ancestor_reference.fas

contig=

ALT=

INFO=

INFO=

INFO=

INFO=

INFO=<ID=VDB,Number=1,Type=Float,Description="Variant Distance Bias for filtering splice-site artefacts in RNA-seq data (bigger is better)",Version="3">

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

FORMAT=

FORMAT=

INFO=

INFO=

INFO=

INFO=

INFO=

INFO=

bcftools_callVersion=1.8+htslib-1.8

bcftools_callCommand=call -Ob -m; Date=Fri Apr 20 05:00:12 2018

bcftools_viewVersion=1.8+htslib-1.8

bcftools_viewCommand=view 1_S1_L001.all.raw.bcf; Date=Fri Apr 20 05:09:40 2018

CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 1_S1_L001.sort.bam

MTB_anc 11 . A . 63 . DP=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=60 GT 0/0 MTB_anc 12 . C . 115 . DP=3;MQ0F=0;AN=2;DP4=3,0,0,0;MQ=60 GT 0/0 MTB_anc 13 . C . 115 . DP=3;MQ0F=0;AN=2;DP4=3,0,0,0;MQ=60 GT 0/0 MTB_anc 14 . C . 115 . DP=3;MQ0F=0;AN=2;DP4=3,0,0,0;MQ=60 GT 0/0 MTB_anc 15 . C . 115 . DP=3;MQ0F=0;AN=2;DP4=3,0,0,0;MQ=60 GT 0/0 MTB_anc 16 . G . 150 . DP=5;MQ0F=0;AN=2;DP4=5,0,0,0;MQ=60 GT 0/0 MTB_anc 17 . G . 185 . DP=8;MQ0F=0;AN=2;DP4=8,0,0,0;MQ=60 GT 0/0 MTB_anc 18 . T . 187 . DP=8;MQ0F=0;AN=2;DP4=8,0,0,0;MQ=60 GT 0/0 MTB_anc 19 . T . 187 . DP=8;MQ0F=0;AN=2;DP4=8,0,0,0;MQ=60 GT 0/0 MTB_anc 20 . C . 189 . DP=8;MQ0F=0;AN=2;DP4=8,0,0,0;MQ=60 GT 0/0

pd3 commented 6 years ago

The plugin +fill-tags can be used to recalculate and add annotations, among other AF: AF, AC, AC_Hemi, AC_Hom, AC_Het, AN, ExcHet, HWE, MAF, NS.