When remapping the read, set MAPQ, CIGAR etc to 0/null for unmapped reads. This is not required according to spec but current samtools jdk otherwise dies in STRICT validation mode.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5089 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
d33162145b
commit
63b709d992
|
|
@ -232,6 +232,17 @@ public class GenomicMap implements Iterable<Map.Entry<String, Collection<GenomeL
|
|||
// remapped bam
|
||||
r.setReferenceIndex(SAMRecord.NO_ALIGNMENT_REFERENCE_INDEX);
|
||||
r.setAlignmentStart(SAMRecord.NO_ALIGNMENT_START);
|
||||
|
||||
// these are required because current santools jdk is over-validating and requiring MAPQ, CIGAR etc be
|
||||
// set to 0/null for unmapped reads. In principle, it should not matter.
|
||||
r.setMappingQuality(0);
|
||||
r.setCigar(new Cigar());
|
||||
r.setNotPrimaryAlignmentFlag(false);
|
||||
if ( r.getReadNegativeStrandFlag() ) {
|
||||
r.setReadBases(BaseUtils.simpleReverseComplement(r.getReadBases()));
|
||||
r.setBaseQualities(Utils.reverse(r.getBaseQualities()));
|
||||
r.setReadNegativeStrandFlag(false);
|
||||
}
|
||||
return r; // nothing to do if read is unmapped
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue