Package htsjdk.samtools
Enum CigarOperator
- java.lang.Object
-
- java.lang.Enum<CigarOperator>
-
- htsjdk.samtools.CigarOperator
-
- All Implemented Interfaces:
Serializable
,Comparable<CigarOperator>
public enum CigarOperator extends Enum<CigarOperator>
The operators that can appear in a cigar string, and information about their disk representations.
-
-
Field Summary
Fields Modifier and Type Field Description static CigarOperator
DELETION
static CigarOperator
HARD_CLIP
static CigarOperator
INSERTION
static CigarOperator
MATCH_OR_MISMATCH
static CigarOperator
PADDING
static CigarOperator
SKIPPED_REGION
static CigarOperator
SOFT_CLIP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CigarOperator
binaryToEnum(int i)
static CigarOperator
characterToEnum(int b)
boolean
consumesReadBases()
If true, represents that this cigar operator "consumes" bases from the read bases.boolean
consumesReferenceBases()
If true, represents that this cigar operator "consumes" bases from the reference sequence.static int
enumToBinary(CigarOperator e)
static byte
enumToCharacter(CigarOperator e)
Returns the character that should be used within a SAM file.boolean
isAlignment()
Returns true if the operator is a M, a X or a EQboolean
isClipping()
Returns true if the operator is a clipped (hard or soft) operatorboolean
isIndel()
Returns true if the operator is a Insertion or Deletion operatorboolean
isIndelOrSkippedRegion()
Returns true if the operator is a Skipped Region Insertion or Deletion operatorboolean
isPadding()
Returns true if the operator is a Padding operatorString
toString()
Returns the cigar operator as it would be seen in a SAM file.static CigarOperator
valueOf(String name)
Returns the enum constant of this type with the specified name.static CigarOperator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
M
public static final CigarOperator M
Match or mismatch
-
I
public static final CigarOperator I
Insertion vs. the reference.
-
D
public static final CigarOperator D
Deletion vs. the reference.
-
N
public static final CigarOperator N
Skipped region from the reference.
-
S
public static final CigarOperator S
Soft clip.
-
H
public static final CigarOperator H
Hard clip.
-
P
public static final CigarOperator P
Padding.
-
EQ
public static final CigarOperator EQ
Matches the reference.
-
X
public static final CigarOperator X
Mismatches the reference.
-
-
Field Detail
-
MATCH_OR_MISMATCH
public static final CigarOperator MATCH_OR_MISMATCH
-
INSERTION
public static final CigarOperator INSERTION
-
DELETION
public static final CigarOperator DELETION
-
SKIPPED_REGION
public static final CigarOperator SKIPPED_REGION
-
SOFT_CLIP
public static final CigarOperator SOFT_CLIP
-
HARD_CLIP
public static final CigarOperator HARD_CLIP
-
PADDING
public static final CigarOperator PADDING
-
-
Method Detail
-
values
public static CigarOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CigarOperator c : CigarOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CigarOperator valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
consumesReadBases
public boolean consumesReadBases()
If true, represents that this cigar operator "consumes" bases from the read bases.
-
consumesReferenceBases
public boolean consumesReferenceBases()
If true, represents that this cigar operator "consumes" bases from the reference sequence.
-
characterToEnum
public static CigarOperator characterToEnum(int b)
- Parameters:
b
- CIGAR operator in character form as appears in a text CIGAR string- Returns:
- CigarOperator enum value corresponding to the given character.
-
binaryToEnum
public static CigarOperator binaryToEnum(int i)
- Parameters:
i
- CIGAR operator in binary form as appears in a BAMRecord.- Returns:
- CigarOperator enum value corresponding to the given int value.
-
enumToBinary
public static int enumToBinary(CigarOperator e)
- Parameters:
e
- CigarOperator enum value.- Returns:
- CIGAR operator corresponding to the enum value in binary form as appears in a BAMRecord.
-
enumToCharacter
public static byte enumToCharacter(CigarOperator e)
Returns the character that should be used within a SAM file.
-
isClipping
public boolean isClipping()
Returns true if the operator is a clipped (hard or soft) operator
-
isIndel
public boolean isIndel()
Returns true if the operator is a Insertion or Deletion operator
-
isIndelOrSkippedRegion
public boolean isIndelOrSkippedRegion()
Returns true if the operator is a Skipped Region Insertion or Deletion operator
-
isAlignment
public boolean isAlignment()
Returns true if the operator is a M, a X or a EQ
-
isPadding
public boolean isPadding()
Returns true if the operator is a Padding operator
-
toString
public String toString()
Returns the cigar operator as it would be seen in a SAM file.- Overrides:
toString
in classEnum<CigarOperator>
-
-