Class NameTokenisationDecode
java.lang.Object
htsjdk.samtools.cram.compression.nametokenisation.NameTokenisationDecode
CRAM 3.1 NameTokenisation decoder, used to compress read names in CRAM files. The NameTokeniser codec exploits
the fact that read names typically follow a structured pattern consisting of alternating alpha and numeric
components (i.e., "H0164ALXX140820:2:1101:17727:54981") that can be tokenised and then encoded as one or more
differences relative to a previously tokenised name.
Uses the rAnsNx16 and/or range codecs internally to compress the resulting token streams.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]uncompress(ByteBuffer inBuffer, byte nameSeparator) Uncompress the compressed name data in the input buffer.
-
Field Details
-
NAME_SEPARATOR
public static final byte NAME_SEPARATOR- See Also:
-
DEFAULT_POSITION_ALLOCATION
public static final int DEFAULT_POSITION_ALLOCATION- See Also:
-
-
Constructor Details
-
NameTokenisationDecode
public NameTokenisationDecode()
-
-
Method Details
-
uncompress
Uncompress the compressed name data in the input buffer. Return is a byte[] containing the read names, each separated by the byte value specified by nameSeparator, including a terminating separator.- Parameters:
inBuffer- the buffer to uncompressnameSeparator- the name separator byte to use in the output buffer- Returns:
- the uncompressed read names
-