CigarOperation¶
#include <pbbam/CigarOperation.h>
-
enum
PacBio::BAM::
CigarOperationType
¶ Describes a CIGAR operation.
Bracketed character is the corresponding SAM/BAM character code.
- Warning
- ALIGNMENT_MATCH (‘M’) is included in this enum to maintain consistency with htslib. However, as of PacBio BAM spec version 3.0b7, this CIGAR operation forbidden. Any attempt to read or write a record containing this operation will trigger a std::runtime_error. SEQUENCE_MATCH(‘=) or SEQUENCE_MISMATCH(‘X’) should be used instead.
Values:
-
UNKNOWN_OP
= -1¶ unknown/invalid CIGAR operator
-
ALIGNMENT_MATCH
= 0¶ alignment match (can be a sequence match or mismatch) [M]
-
INSERTION
¶ insertion to the reference [I]
-
DELETION
¶ deletion from the reference [D]
-
REFERENCE_SKIP
¶ skipped region from the reference [N]
-
SOFT_CLIP
¶ soft clipping (clipped sequences present in SEQ) [S]
-
HARD_CLIP
= 5¶ hard clipping (clipped sequences NOT present in SEQ) [H]
-
PADDING
¶ padding (silent deletion from padded reference) [P]
-
SEQUENCE_MATCH
¶ sequence match [=]
-
SEQUENCE_MISMATCH
¶ sequence mismatch [X]
-
class
PacBio::BAM::
CigarOperation
¶ The CigarOperation class represents a single CIGAR operation (consisting of a type & length).
Operation Type Conversion Methods
-
static char
TypeToChar
(const CigarOperationType type)¶ Convert between CigarOperationType enum & SAM/BAM character code.
- Return
- SAM/BAM character code
- Parameters
type
: CigarOperationType value
-
static CigarOperationType
CharToType
(const char c)¶ Convert between CigarOperationType enum & SAM/BAM character code.
- Return
- CigarOperationType value
- Parameters
c
: SAM/BAM character code
Constructors & Related Methods
-
CigarOperation
()¶
-
CigarOperation
(char c, uint32_t length)¶
-
CigarOperation
(CigarOperationType op, uint32_t length)¶
-
CigarOperation
(const CigarOperation&)¶
-
CigarOperation
(CigarOperation&&)¶
-
CigarOperation &
operator=
(const CigarOperation&)¶
-
CigarOperation &
operator=
(CigarOperation&&)¶
-
~CigarOperation
()¶
Attributes
-
CigarOperation &
Char
(const char opChar)¶ Sets this operation type.
- Return
- reference to this operation
- Parameters
opChar
: SAM/BAM character code
-
CigarOperation &
Length
(const uint32_t length)¶ Sets this operation length.
- Return
- reference to this operation
- Parameters
length
:
-
CigarOperation &
Type
(const CigarOperationType opType)¶ Sets this operation type.
- Return
- reference to this operation
- Parameters
opType
: CigarOperationType value
Comparison Operators
-
bool
operator==
(const CigarOperation &other) const¶ - Return
- true if both CIGAR operation type & length match
-
bool
operator!=
(const CigarOperation &other) const¶ - Return
- true if either CIGAR operation type or length differ
Public Functions
-
char
Char
() const¶ - Return
- operation type as SAM/BAM char code
-
uint32_t
Length
() const¶ - Return
- operation length
-
CigarOperationType
Type
() const¶ - Return
- operation type as CigarOperationType enum value
-
static char