Update MalformedReadFilter to pass reads that have cigar strings like 40S36I
that have 0 aligned bases in the genome. We'll have to fix walkers as faults appear. Also added JIRA GSA-406: finer-grained control of MalformedReadFilter: want to exception out by default in these cases but pass them with a warning with a corresponding -U flag. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4476 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
530875817f
commit
7008a469dc
|
|
@ -72,8 +72,8 @@ public class MalformedReadFilter implements SamRecordHeaderFilter {
|
|||
* @return true if read end is valid, false otherwise.
|
||||
*/
|
||||
private static boolean checkInvalidAlignmentEnd( SAMRecord read ) {
|
||||
// Alignment ends prior to its beginning
|
||||
if( !read.getReadUnmappedFlag() && read.getAlignmentEnd() != -1 && read.getAlignmentEnd() < read.getAlignmentStart() )
|
||||
// Alignment aligns to negative number of bases in the reference.
|
||||
if( !read.getReadUnmappedFlag() && read.getAlignmentEnd() != -1 && (read.getAlignmentEnd()-read.getAlignmentStart()+1)<0 )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ public class MalformedReadFilter implements SamRecordHeaderFilter {
|
|||
if( !read.getReadUnmappedFlag() &&
|
||||
read.getAlignmentStart() != -1 &&
|
||||
read.getAlignmentStart() != SAMRecord.NO_ALIGNMENT_START &&
|
||||
read.getAlignmentBlocks().size() == 0 )
|
||||
read.getAlignmentBlocks().size() < 0 )
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,6 @@ public class TraverseReads<M,T> extends TraversalEngine<M,T,ReadWalker<M,T>,Read
|
|||
// update the number of reads we've seen
|
||||
ReadMetrics readMetrics = dataProvider.getShard().getReadMetrics();
|
||||
readMetrics.incrementNumIterations();
|
||||
readMetrics.incrementNumReadsSeen();
|
||||
|
||||
// if the read is mapped, create a metadata tracker
|
||||
ReadMetaDataTracker tracker = (read.getReferenceIndex() >= 0) ? rodView.getReferenceOrderedDataForRead(read) : null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue