Package htsjdk.samtools
Class TextCigarCodec
- java.lang.Object
-
- htsjdk.samtools.TextCigarCodec
-
public class TextCigarCodec extends Object
Convert between String and Cigar class representations of CIGAR.
-
-
Constructor Summary
Constructors Constructor Description TextCigarCodec()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Cigar
decode(String textCigar)
Convert from String CIGAR representation to Cigar class representation.static String
encode(Cigar cigar)
Convert from Cigar class representation to String.
-
-
-
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.
-
-