Package htsjdk.samtools
Class TextCigarCodec
java.lang.Object
htsjdk.samtools.TextCigarCodec
Convert between String and Cigar class representations of CIGAR.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
TextCigarCodec
public TextCigarCodec()
-
-
Method Details
-
encode
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
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.
-