Package htsjdk.samtools

# Enum Class CigarOperator

java.lang.Object
java.lang.Enum<CigarOperator>
htsjdk.samtools.CigarOperator

All Implemented Interfaces:
  `Serializable`, `Comparable<CigarOperator>`, `Constable`

public enum CigarOperator extends Enum<CigarOperator>
The operators that can appear in a cigar string, and information about their disk representations.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`D`
Deletion vs.
`EQ`
Matches the reference.
`H`
Hard clip.
`I`
Insertion vs.
`M`
Match or mismatch
`N`
Skipped region from the reference.
`P`
Padding.
`S`
Soft clip.
`X`
Mismatches the reference.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final CigarOperator`
`DELETION`
`static final CigarOperator`
`HARD_CLIP`
`static final CigarOperator`
`INSERTION`
`static final CigarOperator`
`MATCH_OR_MISMATCH`
`static final CigarOperator`
`PADDING`
`static final CigarOperator`
`SKIPPED_REGION`
`static final CigarOperator`
`SOFT_CLIP`

## Method Summary

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 EQ
`boolean`
`isClipping()`
Returns true if the operator is a clipped (hard or soft) operator
`boolean`
`isIndel()`
Returns true if the operator is a Insertion or Deletion operator
`boolean`
`isIndelOrSkippedRegion()`
Returns true if the operator is a Skipped Region Insertion or Deletion operator
`boolean`
`isPadding()`
Returns true if the operator is a Padding operator
`String`
`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 class with the specified name.
`static CigarOperator[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### 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 Details

### 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 Details

### values

public static CigarOperator[] values()
Returns an array containing the constants of this enum class, in the order they are declared.

Returns:
  an array containing the constants of this enum class, in the order they are declared

### valueOf

public static CigarOperator valueOf(String name)
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
  `NullPointerException` - 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 class `Enum<CigarOperator>`