gravatar for jeni

2 hours ago by

Hi,

is there any way to read genotype information (FORMAT field) GT:AD:AF using VariantAnnotation? Moreover, as I have used a somatic caller, I have 2 format fields for each variant (one from normal and one from tumour sample); so, how can I preserve sample name as a column name when I transform this vcf to a dataframe?

As an example:

#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  Normal_sample   Tumour_sample
1   52052   .   C   T   .   PASS    CONTQ=93;DP=56 GT:AD:AF 0/0:36,0:0.026  0/1:15,4:0.238

I am reading the vcf with this command:

as.data.frame(cbind([email protected]@seqnames,[email protected]@[email protected], [email protected], info(vcf)))

So I get the following dataframe:

vcf.rowRanges.ranges.start  REF ALT QUAL    FILTER  CONTQ   DP  
1    52052    C    T  pass 93   56

I would like to get something like this:

vcf.rowRanges.ranges.start REF ALT QUAL FILTER CONTQ DP NGT NAD NAF TGT TAD TAF
52052    C    T  pass 93   56  0/0  36,0 0.026  0/1 15,4:0 0.238

link

modified 50 minutes ago

by

RamRS26k

written
2 hours ago
by

jeni0



Source link