updated what constitutes removing entropy
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1113 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
d7d4298917
commit
eb74b16e39
|
|
@ -40,6 +40,9 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
|
|
||||||
public static final int MAX_QUAL = 99;
|
public static final int MAX_QUAL = 99;
|
||||||
|
|
||||||
|
// fraction of mismatches that need to no longer mismatch for a column to be considered cleaned
|
||||||
|
private static final double MISMATCH_COLUMN_CLEANED_FRACTION = 0.75;
|
||||||
|
|
||||||
private SAMFileWriter writer = null;
|
private SAMFileWriter writer = null;
|
||||||
private FileWriter indelOutput = null;
|
private FileWriter indelOutput = null;
|
||||||
private FileWriter statsOutput = null;
|
private FileWriter statsOutput = null;
|
||||||
|
|
@ -577,22 +580,25 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
for ( int i=0; i < reference.length(); i++ ) {
|
for ( int i=0; i < reference.length(); i++ ) {
|
||||||
if ( cleanedMismatchBases[i] == originalMismatchBases[i] )
|
if ( cleanedMismatchBases[i] == originalMismatchBases[i] )
|
||||||
continue;
|
continue;
|
||||||
if ( originalMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD )
|
boolean didMismatch = false, stillMismatches = false;
|
||||||
originalMismatchColumns++;
|
|
||||||
if ( cleanedMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD )
|
|
||||||
cleanedMismatchColumns++;
|
|
||||||
if ( snpsOutput != null ) {
|
|
||||||
if ( originalMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD ) {
|
if ( originalMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD ) {
|
||||||
|
didMismatch = true;
|
||||||
|
originalMismatchColumns++;
|
||||||
|
if ( cleanedMismatchBases[i] > originalMismatchBases[i] * (1.0 - MISMATCH_COLUMN_CLEANED_FRACTION) ) {
|
||||||
|
stillMismatches = true;
|
||||||
|
cleanedMismatchColumns++;
|
||||||
|
}
|
||||||
|
} else if ( cleanedMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD ) {
|
||||||
|
cleanedMismatchColumns++;
|
||||||
|
}
|
||||||
|
if ( snpsOutput != null ) {
|
||||||
|
if ( didMismatch ) {
|
||||||
sb.append(reads.get(0).getRead().getReferenceName() + ":");
|
sb.append(reads.get(0).getRead().getReferenceName() + ":");
|
||||||
sb.append(((int)leftmostIndex + i));
|
sb.append(((int)leftmostIndex + i));
|
||||||
if ( cleanedMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD )
|
if ( stillMismatches )
|
||||||
sb.append(" SAME_SNP\n");
|
sb.append(" SAME_SNP\n");
|
||||||
else
|
else
|
||||||
sb.append(" NOT_SNP\n");
|
sb.append(" NOT_SNP\n");
|
||||||
//} else if ( cleanedMismatchBases[i] > totalBases[i] * MISMATCH_THRESHOLD ) {
|
|
||||||
// sb.append(reads.get(0).getRead().getReferenceName() + ":");
|
|
||||||
// sb.append(((int)leftmostIndex + i));
|
|
||||||
// sb.append(" NEW_SNP\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue