Package htsjdk.samtools
Class SAMTagUtil
- java.lang.Object
-
- htsjdk.samtools.SAMTagUtil
-
public class SAMTagUtil extends Object
Facility for converting between String and short representation of a SAM tag. short representation is used by SAM JDK internally and is much more efficient. Callers are encouraged to obtain the short value for a tag of interest once, and then use the SAMRecord attribute API that takes shorts rather than Strings.
-
-
Field Summary
Fields Modifier and Type Field Description short
AM
short
AS
short
CC
short
CG
short
CM
short
CP
short
CQ
short
CS
short
E2
short
FZ
short
H0
short
H1
short
H2
short
HI
short
IH
short
LB
short
MC
short
MD
short
MF
short
MQ
short
NH
short
NM
short
OQ
short
PG
short
PQ
short
PU
short
Q2
short
R2
short
RG
short
S2
short
SA
short
SM
short
SQ
short
U2
short
UQ
-
Constructor Summary
Constructors Constructor Description SAMTagUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SAMTagUtil
getSingleton()
Despite the fact that this class has state, it should be thread-safe because the cache gets filled with the same values by any thread.short
makeBinaryTag(String tag)
Convert from String representation of tag name to short representation.String
makeStringTag(short tag)
Convert from short representation of tag name to String representation.
-
-
-
Field Detail
-
RG
public final short RG
-
LB
public final short LB
-
PU
public final short PU
-
PG
public final short PG
-
AS
public final short AS
-
SQ
public final short SQ
-
MQ
public final short MQ
-
NM
public final short NM
-
H0
public final short H0
-
H1
public final short H1
-
H2
public final short H2
-
UQ
public final short UQ
-
PQ
public final short PQ
-
NH
public final short NH
-
IH
public final short IH
-
HI
public final short HI
-
MD
public final short MD
-
CS
public final short CS
-
CQ
public final short CQ
-
CM
public final short CM
-
R2
public final short R2
-
Q2
public final short Q2
-
S2
public final short S2
-
CC
public final short CC
-
CP
public final short CP
-
SM
public final short SM
-
AM
public final short AM
-
MF
public final short MF
-
E2
public final short E2
-
U2
public final short U2
-
OQ
public final short OQ
-
FZ
public final short FZ
-
SA
public final short SA
-
MC
public final short MC
-
CG
public final short CG
-
-
Method Detail
-
getSingleton
public static SAMTagUtil getSingleton()
Despite the fact that this class has state, it should be thread-safe because the cache gets filled with the same values by any thread.
-
makeBinaryTag
public short makeBinaryTag(String tag)
Convert from String representation of tag name to short representation.- Parameters:
tag
- 2-character String representation of a tag name.- Returns:
- Tag name packed as 2 ASCII bytes in a short.
-
makeStringTag
public String makeStringTag(short tag)
Convert from short representation of tag name to String representation.- Parameters:
tag
- Tag name packed as 2 ASCII bytes in a short.- Returns:
- 2-character String representation of a tag name.
-
-