Merged bug fix from Stable into Unstable
This commit is contained in:
commit
52f6f9fdcc
|
|
@ -5,6 +5,7 @@ import net.sf.samtools.*;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.broadinstitute.sting.utils.GenomeLoc;
|
import org.broadinstitute.sting.utils.GenomeLoc;
|
||||||
import org.broadinstitute.sting.utils.GenomeLocParser;
|
import org.broadinstitute.sting.utils.GenomeLocParser;
|
||||||
|
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -113,9 +114,10 @@ public class ConstrainedMateFixingManager {
|
||||||
HashMap<String, SAMRecordHashObject> forMateMatching = new HashMap<String, SAMRecordHashObject>();
|
HashMap<String, SAMRecordHashObject> forMateMatching = new HashMap<String, SAMRecordHashObject>();
|
||||||
TreeSet<SAMRecord> waitingReads = new TreeSet<SAMRecord>(comparer);
|
TreeSet<SAMRecord> waitingReads = new TreeSet<SAMRecord>(comparer);
|
||||||
|
|
||||||
private <T> T remove(TreeSet<T> treeSet) {
|
private SAMRecord remove(TreeSet<SAMRecord> treeSet) {
|
||||||
final T first = treeSet.first();
|
final SAMRecord first = treeSet.first();
|
||||||
treeSet.remove(first);
|
if ( !treeSet.remove(first) )
|
||||||
|
throw new UserException("Error caching SAM record " + first.getReadName() + ", which is usually caused by malformed SAM/BAM files in which multiple identical copies of a read are present.");
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue