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:
parent
355be57539
commit
d0ca6f8a9c
|
|
@ -435,7 +435,8 @@ public class GenomeLocParser {
|
||||||
// read is unmapped and not placed anywhere on the genome
|
// read is unmapped and not placed anywhere on the genome
|
||||||
return GenomeLoc.UNMAPPED;
|
return GenomeLoc.UNMAPPED;
|
||||||
else {
|
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);
|
return createGenomeLoc(read.getReferenceName(), read.getReferenceIndex(), read.getAlignmentStart(), end, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue