libStatGen Software 1
Loading...
Searching...
No Matches
Cigar::CigarOperator Struct Reference

Public Member Functions

 CigarOperator (Operation operation, uint32_t count)
 Set the cigar operator with the specified operation and count length.
 
char getChar () const
 Get the character code (M, I, D, N, S, H, or P) associated with this operation.
 
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() [1/2]

Cigar::CigarOperator::CigarOperator ( )
inline

Definition at line 110 of file Cigar.h.

111 {
112 operation = none;
113 count = 0;
114 }
@ none
no operation has been set.
Definition Cigar.h:88

◆ CigarOperator() [2/2]

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.

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 }
@ del
deletion from the reference (the reference contains bases that have no corresponding base in the quer...
Definition Cigar.h:92
@ mismatch
mismatch operation. Associated with CIGAR Operation "M"
Definition Cigar.h:90
@ hardClip
Hard clip on the read (clipped sequence not present in the query sequence or reference)....
Definition Cigar.h:95
@ match
match/mismatch operation. Associated with CIGAR Operation "M"
Definition Cigar.h:89
@ pad
Padding (not in reference or query). Associated with CIGAR Operation "P".
Definition Cigar.h:96
@ insert
insertion to the reference (the query sequence contains bases that have no corresponding base in the ...
Definition Cigar.h:91
@ skip
skipped region from the reference (the reference contains bases that have no corresponding base in th...
Definition Cigar.h:93
@ softClip
Soft clip on the read (clipped sequence present in the query sequence, but not in reference)....
Definition Cigar.h:94

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

◆ operator!=()

bool Cigar::CigarOperator::operator!= ( const CigarOperator rhs) const
inline

Compare only on the operator, false if they are the same, true if not. Match and mismatch are considered the same for CIGAR strings.

Definition at line 163 of file Cigar.h.

164 {
165 return !((*this) == rhs) ;
166 }

◆ operator==()

bool Cigar::CigarOperator::operator== ( const CigarOperator rhs) const
inline

Compare only on the operator, true if they are the same, false if not. Match and mismatch are considered the same for CIGAR strings.

Definition at line 153 of file Cigar.h.

154 {
155 if (operation==rhs.operation)
156 return true;
157 if ((operation == mismatch || operation == match) && (rhs.operation == mismatch || rhs.operation == match))
158 return true;
159 return false;
160 }

References Cigar::match, and Cigar::mismatch.

Member Data Documentation

◆ count

uint32_t Cigar::CigarOperator::count

Definition at line 123 of file Cigar.h.

◆ operation

Operation Cigar::CigarOperator::operation

Definition at line 121 of file Cigar.h.


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