libStatGen Software  1
Cigar::CigarOperator Struct Reference

Public Member Functions

 CigarOperator (Operation operation, uint32_t count)
 Set the cigar operator with the specified operation and count length. More...
 
char getChar () const
 Get the character code (M, I, D, N, S, H, or P) associated with this operation. More...
 
bool operator== (const CigarOperator &rhs) const
 Compare only on the operator, true if they are the same, false if not. Match and mismatch are considered the same for CIGAR strings.
 
bool operator!= (const CigarOperator &rhs) const
 Compare only on the operator, false if they are the same, true if not. Match and mismatch are considered the same for CIGAR strings.
 

Public Attributes

Operation operation
 
uint32_t count
 

Detailed Description

Definition at line 107 of file Cigar.h.

Constructor & Destructor Documentation

◆ CigarOperator()

Cigar::CigarOperator::CigarOperator ( Operation  operation,
uint32_t  count 
)
inline

Set the cigar operator with the specified operation and count length.

Definition at line 118 of file Cigar.h.

119  : operation(operation), count(count) {};

Member Function Documentation

◆ getChar()

char Cigar::CigarOperator::getChar ( ) const
inline

Get the character code (M, I, D, N, S, H, or P) associated with this operation.

Definition at line 127 of file Cigar.h.

References Cigar::del, Cigar::hardClip, Cigar::insert, Cigar::match, Cigar::mismatch, Cigar::none, Cigar::pad, Cigar::skip, and Cigar::softClip.

128  {
129  switch (operation)
130  {
131  case none:
132  return '?'; // error
133  case match:
134  case mismatch:
135  return'M';
136  case insert:
137  return 'I';
138  case del:
139  return'D';
140  case skip:
141  return 'N';
142  case softClip:
143  return 'S';
144  case hardClip:
145  return 'H';
146  case pad:
147  return 'P';
148  }
149  return '?'; // actually it is an error to get here
150  }
insertion to the reference (the query sequence contains bases that have no corresponding base in the ...
Definition: Cigar.h:91
Padding (not in reference or query). Associated with CIGAR Operation "P".
Definition: Cigar.h:96
skipped region from the reference (the reference contains bases that have no corresponding base in th...
Definition: Cigar.h:93
no operation has been set.
Definition: Cigar.h:88
Hard clip on the read (clipped sequence not present in the query sequence or reference). Associated with CIGAR Operation "H".
Definition: Cigar.h:95
mismatch operation. Associated with CIGAR Operation "M"
Definition: Cigar.h:90
Soft clip on the read (clipped sequence present in the query sequence, but not in reference)...
Definition: Cigar.h:94
match/mismatch operation. Associated with CIGAR Operation "M"
Definition: Cigar.h:89
deletion from the reference (the reference contains bases that have no corresponding base in the quer...
Definition: Cigar.h:92

The documentation for this struct was generated from the following file: