only compare pair position for paired end reads

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1190 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-07-08 04:07:08 +00:00
parent d3daecfc4d
commit 787c84d68b
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class ComparableSAMRecord implements Comparable<ComparableSAMRecord> {
if ( comparison == 0 )
comparison = record.getReadName().compareTo(o.getRecord().getReadName());
// if the read names are the same, use the first of the pair if appropriate
if ( comparison == 0 )
if ( comparison == 0 && record.getReadPairedFlag() )
comparison = ( record.getFirstOfPairFlag() ? -1 : 1);
return comparison;
}