Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.

Commit 6ed76a0

Browse files
authored
Merge pull request #273 from PolinaBevad/fix_issue_272_zero_in_mark_dupsv
Fixed issue 272: zero deletion in markDUPSV
2 parents 7b86e6d + 8cea02e commit 6ed76a0

7 files changed

Lines changed: 82 additions & 4 deletions

File tree

src/main/java/com/astrazeneca/vardict/modules/StructuralVariantsProcessor.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,9 @@ public static Tuple.Tuple3<Integer, Integer, Integer> markSV(int start,
16441644
sv_r.used = true;
16451645
cnt++;
16461646
pairs += sv_r.varsCount;
1647-
cov += (int) ((sv_r.varsCount * rlen)/(sv_r.end - sv_r.start)) + 1;
1647+
if (sv_r.end != sv_r.start) {
1648+
cov += (int) ((sv_r.varsCount * rlen)/(sv_r.end - sv_r.start)) + 1;
1649+
}
16481650
}
16491651
}
16501652
}
@@ -1688,7 +1690,9 @@ static Tuple.Tuple2<Integer, Integer> markDUPSV(int start,
16881690
sv_r.used = true;
16891691
cnt++;
16901692
pairs += sv_r.varsCount;
1691-
cov += (int) ((sv_r.varsCount * rlen)/(sv_r.end - sv_r.start)) + 1;
1693+
if (sv_r.end != sv_r.start) {
1694+
cov += (int) ((sv_r.varsCount * rlen)/(sv_r.end - sv_r.start)) + 1;
1695+
}
16921696
}
16931697
}
16941698
}
@@ -1716,7 +1720,8 @@ static boolean isOverlap(int start1,
17161720
positions.sort(Integer::compareTo);
17171721

17181722
int ins = positions.get(2) - positions.get(1);
1719-
if (ins/(double)(end1 - start1) > 0.75 && ins/(double)(end2 - start2) > 0.75 ) {
1723+
if ((end1 != start1) && (end2 != start2)
1724+
&& ins/(double)(end1 - start1) > 0.75 && ins/(double)(end2 - start2) > 0.75 ) {
17201725
return true;
17211726
}
17221727
if (positions.get(1) - positions.get(0) + positions.get(3) - positions.get(2) < 3 * rlen) {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

testdata/fastas/hg19.fa.csv

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.

testdata/integrationtestcases/Somatic;hg19.fa;Zero_in_DUPSV_TUMOUR.bam-Zero_in_DUPSV_NORMAL.bam;chr19;290742-291636;-f0.001-X3.txt

Lines changed: 72 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)