How to annotate your vcf files with the GT (genotype) field
1
0
Entering edit mode
8.6 years ago
Michi ▴ 990

Hi there

So I am generating a .vcf file with samtools mpileup which is piped through bcftools view and bcftools norm. In the output I kindly get the fields DP and AD amongst others for which I asked for in the mpileup options. What I am not getting is the GT field and neither the documentation nor the help output give me a hint on how to get it.

So first, is samtools able to create the GT field? If not, how are all the GT fields in the world of .vcf files created ? ;)

Thanks so much for any help

EDIT:

I am doing this for three .bam files together. The exact command would be:

mpileup -u -A -B -d 100000 -t DP -t AD -t ADF -t ADR -f GRCh37.fa \ 
     --positions exac_variant_sites.snp.bed \
     patient1_tumorsample1.bam patient1_tumorsample2.bam patient1_germline.bam | \ 
     bcftools view | \ 
     bcftools norm -m-any -f GRCh37.fa - > gtless.vcf
samtools mpileup vcf genotype sequencing • 5.3k views
ADD COMMENT
0
Entering edit mode

Are you running the commands with BAM files from several samples or genotypes? Could you explain further or make an example of your commands?

ADD REPLY
0
Entering edit mode

Hi - I have edited my post and put the exact command ;)

ADD REPLY
0
Entering edit mode

Not sure if this paragraph could sed light:

"The VCF file produced by BCFtools does not strictly conform the VCF spec. For example, the GT genotype information is not always present because for the purpose of BCF, GT is unnecessary and takes disk space. In addition, GT is not the first as is required by the VCF spec. This can be fixed by the bcf-fix.pl script that comes with the source code package, and will be fixed in future (fixed in r880+)."

http://samtools.sourceforge.net/mpileup.shtml

ADD REPLY
0
Entering edit mode

Thanks! In any case - given that samtools does not do it (fixed in r880+ says it should) - do you know any other way of annotating the .vcf file with the GT field..?

ADD REPLY
0
Entering edit mode

bcf-fix.pl does not fix it? have you tried it?

do you have the same mpileup result using -v?

"Compute genotype likelihoods and output them in the variant call format (VCF). Output is bgzip-compressed VCF unless -u option is set."

ADD REPLY
0
Entering edit mode
3.0 years ago
OmBibo • 0

Hi Michi,

Did you figure out how to identify GT and AF fields with samtools? I tried the above suggestions but it doesn't work..

Thank you for your help.

ADD COMMENT

Login before adding your answer.

Traffic: 1463 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6