Skip to content

Commit

Permalink
Tighten up read feature handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed Jan 3, 2022
1 parent b664fe0 commit 214a220
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import htsjdk.samtools.CigarElement;
import htsjdk.samtools.CigarOperator;
import htsjdk.samtools.SAMRecord;
import htsjdk.samtools.cram.CRAMException;
import htsjdk.samtools.cram.build.Utils;
import htsjdk.samtools.cram.encoding.readfeatures.*;
import htsjdk.samtools.util.SequenceUtil;
Expand Down Expand Up @@ -440,6 +441,16 @@ public static byte[] restoreReadBases(
case RefSkip.operator:
posInSeq += ((RefSkip) variation).getLength();
break;
case Bases.operator:
case ReadBase.operator:
break; // defer until after the reference bases are retrieved
case Scores.operator:
case BaseQualityScore.operator:
break; // handled by resolveQualityScores
case Padding.operator:
case HardClip.operator:
break; // handled by getCigarForReadFeatures
default: throw new CRAMException(String.format("Unrecognized read feature code: %c", variation.getOperator()));
}
}

Expand Down

0 comments on commit 214a220

Please sign in to comment.