nanoporetech / medaka

Sequence correction provided by ONT Research
https://nanoporetech.com
Other
391 stars 73 forks source link

The DP field is not matching the actual depth when compared with IGV or VAFATOR DP field #395

Closed Rohit-Satyam closed 1 year ago

Rohit-Satyam commented 1 year ago

I am facing an issue. I took the wf-artic VCF file and tried to annotate it with VFATOR and the DP field of variant differs with DP calculated by VAFATOR (vafator_dp=352) and IGV.

Example

MN908947.3  27513   .   C   T   31.008  PASS    DP=216;DPS=189,27;Pool=1;vafator_af=0.85795;vafator_ac=302;vafator_dp=352;vafator_eaf=0.5;vafator_pu=1;vafator_pw=1;vafator_k=5;vafator_bq=5,19;vafator_mq=60,60;vafator_pos=366.5,355;vafator_rsmq=-0.233;vafator_rsmq_pv=0.81542;vafator_rsbq=5.087;vafator_rsbq_pv=0;vafator_rspos=-0.076;vafator_rspos_pv=0.93927   GT:GQ   1:31

image

Though I don't understand why the DP is highter in vafator_dp field assigned by VAFATOR and the discussion about it is happening here, I am more concerned about it being wrong when assigned by medaka. I see in the issue 192 here that this anomaly was resolved but I think it didn't. Same issue is with indels.

cjw85 commented 1 year ago

The statistics in the VCF are from the downsampled data used to call variants. Is it possible that your IGV screenshot and vafator_dp numbers are from a different source?

Rohit-Satyam commented 1 year ago

I use the BAM file and vcf file produced by wf-artic pipeline to run VAFATOR. These are inhouse samples that we are sequencing. I agree that I don't understand why the depth of reads given by vafator doesn't match with the IGV but they are from same sample if that's what you mean by "same source"

Rohit-Satyam commented 1 year ago

Explanation!!

I also tried adding the DP field from pool1 and pool2 (I realized there are many variants supported by reads from both pools. Here 203 should be total depth. Hence, the Sum of DP field in Pool1+Pool2 matches with vafator_dp. Bravo

MN908947.3  28271   .   A   T   47.39   PASS    DP=67;DPS=32,35;Pool=2;vafator_af=0.84236;vafator_ac=171;vafator_dp=203;vafator_eaf=0.5;vafator_pu=1;vafator_pw=1;vafator_k=5;vafator_bq=15,26;vafator_mq=60,60;vafator_pos=66,109;vafator_rsmq=0.983;vafator_rsmq_pv=0.32562;vafator_rsbq=2.974;vafator_rsbq_pv=0.00294;vafator_rspos=1.45;vafator_rspos_pv=0.14719    GT:GQ   1:47
MN908947.3  28271   .   A   T   30.258  PASS    DP=136;DPS=31,105;Pool=1;vafator_af=0.84236;vafator_ac=171;vafator_dp=203;vafator_eaf=0.5;vafator_pu=1;vafator_pw=1;vafator_k=5;vafator_bq=15,26;vafator_mq=60,60;vafator_pos=66,109;vafator_rsmq=0.983;vafator_rsmq_pv=0.32562;vafator_rsbq=2.974;vafator_rsbq_pv=0.00294;vafator_rspos=1.45;vafator_rspos_pv=0.14719  GT:GQ   1:30

However IGV still shows less reads

image