boneheaded mistake, mixed up my min and max
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5271 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
acad3ada06
commit
1bc5c7e99b
|
|
@ -27,7 +27,7 @@ public class HomopolymerRun implements InfoFieldAnnotation, StandardAnnotation {
|
||||||
|
|
||||||
int run;
|
int run;
|
||||||
if ( vc.isSNP() ) {
|
if ( vc.isSNP() ) {
|
||||||
run = computeHomopolymerRun(vc.getAlternateAllele(0).getBases()[0], ref, true);
|
run = computeHomopolymerRun(vc.getAlternateAllele(0).getBases()[0], ref);
|
||||||
} else if ( vc.isIndel() && ANNOTATE_INDELS ) {
|
} else if ( vc.isIndel() && ANNOTATE_INDELS ) {
|
||||||
run = computeIndelHomopolymerRun(vc,ref);
|
run = computeIndelHomopolymerRun(vc,ref);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -45,7 +45,7 @@ public class HomopolymerRun implements InfoFieldAnnotation, StandardAnnotation {
|
||||||
|
|
||||||
public boolean useZeroQualityReads() { return false; }
|
public boolean useZeroQualityReads() { return false; }
|
||||||
|
|
||||||
private static int computeHomopolymerRun(byte altAllele, ReferenceContext ref, boolean domin) {
|
private static int computeHomopolymerRun(byte altAllele, ReferenceContext ref) {
|
||||||
|
|
||||||
// TODO -- this needs to be computed in a more accurate manner
|
// TODO -- this needs to be computed in a more accurate manner
|
||||||
// We currently look only at direct runs of the alternate allele adjacent to this position
|
// We currently look only at direct runs of the alternate allele adjacent to this position
|
||||||
|
|
@ -70,11 +70,7 @@ public class HomopolymerRun implements InfoFieldAnnotation, StandardAnnotation {
|
||||||
rightRun++;
|
rightRun++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domin)
|
return Math.max(leftRun, rightRun);
|
||||||
return Math.min(leftRun, rightRun);
|
|
||||||
else
|
|
||||||
return Math.max(leftRun, rightRun);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int computeIndelHomopolymerRun(VariantContext vc, ReferenceContext ref) {
|
private static int computeIndelHomopolymerRun(VariantContext vc, ReferenceContext ref) {
|
||||||
|
|
@ -91,7 +87,7 @@ public class HomopolymerRun implements InfoFieldAnnotation, StandardAnnotation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return computeHomopolymerRun(dBase, ref, false); // do max in both directions
|
return computeHomopolymerRun(dBase, ref);
|
||||||
} else {
|
} else {
|
||||||
// check that inserted bases are the same
|
// check that inserted bases are the same
|
||||||
byte insBase = vc.getAlternateAllele(0).getBases()[0];
|
byte insBase = vc.getAlternateAllele(0).getBases()[0];
|
||||||
|
|
@ -101,7 +97,7 @@ public class HomopolymerRun implements InfoFieldAnnotation, StandardAnnotation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return computeHomopolymerRun(insBase,ref, false);
|
return computeHomopolymerRun(insBase,ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue