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

Commit 68bacbb

Browse files
committed
Fixed issue 268: added check for length of query quality sequence to skip very short strings in SV analysis.
1 parent d2d0696 commit 68bacbb

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,10 +2015,10 @@ private void prepareSVStructuresForAnalysis(final SAMRecord record,
20152015
} else if (record.getIntegerAttribute(SAMTag.MQ.name()) != null
20162016
&& record.getIntegerAttribute(SAMTag.MQ.name()) < 15) {
20172017
// Ignore those with mate mapping quality less than 15
2018-
} else if (readDirNum * mateDirNum == -1 && (mlen * readDirNum) > 0 ) {
2018+
} else if (readDirNum * mateDirNum == -1 && (mlen * readDirNum) > 0 && queryQuality.length() > 15) {
20192019
// deletion candidate
20202020
mlen = mateStart > start ? mend - start : end - mateStart;
2021-
if(abs(mlen) > instance().conf.INSSIZE + instance().conf.INSSTDAMT * instance().conf.INSSTD ) {
2021+
if(abs(mlen) > instance().conf.INSSIZE + instance().conf.INSSTDAMT * instance().conf.INSSTD) {
20222022
if (readDirNum == 1) {
20232023
if (svStructures.svfdel.size() == 0
20242024
|| start - svStructures.svdelfend > Configuration.MINSVCDIST * maxReadLength) {
@@ -2070,7 +2070,7 @@ && abs(start - svStructures.svdelrend) <= Configuration.MINSVCDIST * maxReadLeng
20702070
adddisccnt(getLastSVStructure(svStructures.svrinv3));
20712071
}
20722072
}
2073-
} else if (readDirNum * mateDirNum == -1 && readDirNum * mlen < 0) {
2073+
} else if (readDirNum * mateDirNum == -1 && readDirNum * mlen < 0 && queryQuality.length() > 15) {
20742074
//duplication
20752075
if (readDirNum == 1) {
20762076
if (svStructures.svfdup.size() == 0
@@ -2121,7 +2121,7 @@ && abs(start - svStructures.svduprend) <= Configuration.MINSVCDIST * maxReadLeng
21212121
if (!svStructures.svrinv3.isEmpty() && abs(start - svStructures.svinvrend3) <= MIN_D) {
21222122
adddisccnt(getLastSVStructure(svStructures.svrinv3));
21232123
}
2124-
} else if (readDirNum * mateDirNum == 1) { // Inversion
2124+
} else if (readDirNum * mateDirNum == 1 && queryQuality.length() > 15) { // Inversion
21252125
if (readDirNum == 1 && mlen != 0 ) {
21262126
if (mlen < -3 * maxReadLength) {
21272127
if (svStructures.svfinv3.size() == 0
@@ -2191,7 +2191,7 @@ && abs(start - svStructures.svduprend) <= Configuration.MINSVCDIST * maxReadLeng
21912191
}
21922192
}
21932193
}
2194-
} else { // Inter-chr translocation
2194+
} else if (queryQuality.length() > 15){ // Inter-chr translocation
21952195
// to be implemented
21962196
final String mchr = getMateReferenceName(record);
21972197
if (record.getStringAttribute(SAMTag.MC.name()) != null
Binary file not shown.
Binary file not shown.

testdata/fastas/GRCh37.fa.csv

Lines changed: 2 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Simple,GRCh37.fa,short_quality_seq_in_sv.bam,chr1,17420079,17420230,-f 0.001

0 commit comments

Comments
 (0)