Class 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 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
    • Constructor Detail

      • SAMTagUtil

        public SAMTagUtil()
    • 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.