Class EncodeToken
java.lang.Object
htsjdk.samtools.cram.compression.nametokenisation.tokens.EncodeToken
- Direct Known Subclasses:
EncodeToken.DupOrDiffToken,EncodeToken.EndToken
A token that represents one fragment of a read name that has been tokenized.
Since not all token types have absolute and/or even relative values, there are a couple of subclasses
defined below that are used to ensure that calling code never violates the assumptions of the token type.
The subclasses enforce that the caller can only ask for and actual or relative value for token types that
have them.
Note: It would be more efficient to separate the encoded token cases where we want to store a numeric fragment
from the cases where we store a string fragment, but for simplicity we store all fragments as strings, and let
the caller interconvert them back to int on-demand.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
ConstructorsConstructorDescriptionEncodeToken(byte type, String actualValue, String relativeValue) Token types TOKEN_DELTA, TOKEN_DELTA0, TOKEN_DIGITS, TOKEN_DIGITS0 all have a relative value that differs from the actual value of the original fragment, and for those token types, we need to preserve both during the encoding process. -
Method Summary
-
Constructor Details
-
EncodeToken
Token types TOKEN_DELTA, TOKEN_DELTA0, TOKEN_DIGITS, TOKEN_DIGITS0 all have a relative value that differs from the actual value of the original fragment, and for those token types, we need to preserve both during the encoding process. We need to preserve the absolute value for so we can use it to detect duplicate fragments in downstream reads, and we need to preserve the relative value since, if it's present, that's what we emit to the output stream.- Parameters:
type-actualValue-relativeValue-
-
-
Method Details