The cleaner now cleans duplicate reads (instead of ignoring them) - although it doesn't include them for scoring ref or alt consenses
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2424 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
cf303810d3
commit
f448a263e9
|
|
@ -111,7 +111,6 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
for ( SAMRecord read : reads ) {
|
for ( SAMRecord read : reads ) {
|
||||||
if ( !read.getReadUnmappedFlag() &&
|
if ( !read.getReadUnmappedFlag() &&
|
||||||
!read.getNotPrimaryAlignmentFlag() &&
|
!read.getNotPrimaryAlignmentFlag() &&
|
||||||
!read.getDuplicateReadFlag() &&
|
|
||||||
read.getMappingQuality() != 0 &&
|
read.getMappingQuality() != 0 &&
|
||||||
read.getAlignmentStart() != SAMRecord.NO_ALIGNMENT_START &&
|
read.getAlignmentStart() != SAMRecord.NO_ALIGNMENT_START &&
|
||||||
(allow454 || !Utils.is454Read(read)) )
|
(allow454 || !Utils.is454Read(read)) )
|
||||||
|
|
@ -121,9 +120,6 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
}
|
}
|
||||||
|
|
||||||
clean(goodReads, ref, loc);
|
clean(goodReads, ref, loc);
|
||||||
//bruteForceClean(goodReads, ref, context.getLocation().getStart());
|
|
||||||
//testCleanWithDeletion();
|
|
||||||
//testCleanWithInsertion();
|
|
||||||
|
|
||||||
if ( writer != null ) {
|
if ( writer != null ) {
|
||||||
// Although we can guarantee that reads will be emitted in order WITHIN an interval
|
// Although we can guarantee that reads will be emitted in order WITHIN an interval
|
||||||
|
|
@ -257,6 +253,7 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
// if this doesn't match perfectly to the reference, let's try to clean it
|
// if this doesn't match perfectly to the reference, let's try to clean it
|
||||||
if ( mismatchScore > 0 ) {
|
if ( mismatchScore > 0 ) {
|
||||||
altReads.add(aRead);
|
altReads.add(aRead);
|
||||||
|
if ( !read.getDuplicateReadFlag() )
|
||||||
totalMismatchSum += mismatchScore;
|
totalMismatchSum += mismatchScore;
|
||||||
aRead.setMismatchScoreToReference(mismatchScore);
|
aRead.setMismatchScoreToReference(mismatchScore);
|
||||||
// if it has an indel, let's see if that's the best consensus
|
// if it has an indel, let's see if that's the best consensus
|
||||||
|
|
@ -325,6 +322,7 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
|
||||||
consensus.readIndexes.add(new Pair<Integer, Integer>(j, altAlignment.first));
|
consensus.readIndexes.add(new Pair<Integer, Integer>(j, altAlignment.first));
|
||||||
|
|
||||||
//logger.debug(consensus.str + " vs. " + toTest.getRead().getReadString() + " => " + myScore + " - " + altAlignment.first);
|
//logger.debug(consensus.str + " vs. " + toTest.getRead().getReadString() + " => " + myScore + " - " + altAlignment.first);
|
||||||
|
if ( !toTest.getRead().getDuplicateReadFlag() )
|
||||||
consensus.mismatchSum += myScore;
|
consensus.mismatchSum += myScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue