friend1ws / nanomonsv

SV detection tool for nanopore sequence reads
GNU General Public License v3.0
78 stars 12 forks source link

incorrect supporting read counts and VAF for inversions #54

Open abelhj opened 9 months ago

abelhj commented 9 months ago

Hi, I think I've encountered a bug in the calculation of supporting read counts and VAFs for inversions (and probably other rearrangments?).

Inversions have 2 distinct breakpoints, and are supported by reads in both the +/+ and -/- orientations. The number of supporting variant reads VR in the final output is only the count of reads in the +/+ orientation, but the TR (the denominator in the VAF calculation) is the sum of the depths at both breakpoints, making the final VAF approximately 1/2 of the correct value.

abelhj@compute1-exec-257:/storage1/fs1/timley/Active/aml_ppg/analysis/longread/ont/dorado_test/nanomonsv_test/output0a$ cat  test_tumor.realignment.tumor.sread_count.0.txt | grep chr16  | grep 1572 | grep 670
chr16   15721325    +   chr16   67089059    +   --- r_185   62  5
chr16   15721333    -   chr16   67089053    -   --- r_184   62  16
abelhj@compute1-exec-257:/storage1/fs1/timley/Active/aml_ppg/analysis/longread/ont/dorado_test/nanomonsv_test/output0a$ cat  test_tumor.realignment.control.sread_count.0.txt | grep chr16  | grep 1572 | grep 670
chr16   15721325    +   chr16   67089059    +   --- r_185   51  7
chr16   15721333    -   chr16   67089053    -   --- r_184   51  9
abelhj@compute1-exec-257:/storage1/fs1/timley/Active/aml_ppg/analysis/longread/ont/dorado_test/nanomonsv_test/output0a$ cat test_tumor.nanomonsv.result.vcf | grep chr16 | grep 1572
chr16   15721325    r_185_0 T   T]chr16:67089059]   .   Too_low_VAF SVTYPE=BND;MATEID=r_185_1   TR:VR   62:5    51:7
chr16   67089059    r_185_1 C   C]chr16:15721325]   .   Too_low_VAF SVTYPE=BND;MATEID=r_185_0   TR:VR   62:5    51:7