Reading AD and other genotype information from the VCF file
0
0
Entering edit mode
5 hours ago

I need to get the allele depth and read depth from a vcf file, sometimes it can look like this:

GT:AD:AF:DP:F1R2:F2R1:FAD:SB 0/1:25,13:0.348:38:7,2:7,5:14,7:12,13,7,6

But sometimes they look like this:

DP:FDP:SDP:SUBDP:AU:CU:GU:TU 35:1:0:0:0,0:0,0:34,35:0,0 35:0:0:0:0,0:2,2:31,31:2,2

And ocassionally there are multiple alleles for the same position.

Are there R tools that help with extracting this information? I am using readVcf from the Bioconductor VariantAnnotation package, but I still need to do extra steps to compare both cases above, and I think there migth be more situations depending on the variant caller that creates the vcf file. I can do the work but I was wondering if anyone uses another package to extract allele depth for each variant from a vcf file.

Thank you in advance.

R vcf • 76 views
ADD COMMENT
0
Entering edit mode

bcftools query -f '[%CHROM %POS %REF %ALT %SAMPLE %GT %AD\n]'

ADD REPLY

Login before adding your answer.

Traffic: 2660 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