Class TextCigarCodec


  • public class TextCigarCodec
    extends Object
    Convert between String and Cigar class representations of CIGAR.
    • Constructor Detail

      • TextCigarCodec

        public TextCigarCodec()
    • Method Detail

      • encode

        public static String encode​(Cigar cigar)
        Convert from Cigar class representation to String.
        Parameters:
        cigar - in Cigar class format
        Returns:
        CIGAR in String form ala SAM text file. "*" means empty CIGAR.
      • decode

        public static Cigar decode​(String textCigar)
        Convert from String CIGAR representation to Cigar class representation. Does not do validation beyond the most basic CIGAR string well-formedness, i.e. each operator is valid, and preceded by a decimal length.
        Parameters:
        textCigar - CIGAR in String form ala SAM text file. "*" means empty CIGAR.
        Returns:
        cigar in Cigar class format
        Throws:
        RuntimeException - if textCigar is invalid at the most basic level.