Patch for case that a read spans only an insertion (i.e. no Ms in the CIGAR string): the end position should not be less than the start position (which is how Picard defines it) but instead should be equal to it. This is just a patch; we'll get a proper solution in at some point.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5922 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2011-06-02 20:40:56 +00:00
parent 355be57539
commit d0ca6f8a9c
1 changed files with 2 additions and 1 deletions

View File

@ -435,7 +435,8 @@ public class GenomeLocParser {
// read is unmapped and not placed anywhere on the genome
return GenomeLoc.UNMAPPED;
else {
int end = read.getReadUnmappedFlag() ? read.getAlignmentStart() : read.getAlignmentEnd();
//
int end = read.getReadUnmappedFlag() ? read.getAlignmentStart() : Math.max(read.getAlignmentEnd(), read.getAlignmentStart());
return createGenomeLoc(read.getReferenceName(), read.getReferenceIndex(), read.getAlignmentStart(), end, false);
}
}