Class holding a bam query.
More...
#include </scratch/bob/jari/tmp/pristine/yat-0.10.x/yat/omic/BamRead.h>
List of all members.
Public Member Functions |
| BamRead (void) |
| default constructor
|
| BamRead (const BamRead &other) |
| Copy constructor.
|
virtual | ~BamRead (void) |
| Destructor.
|
const BamRead & | operator= (const BamRead &rhs) |
| assignment operator
|
const uint8_t * | aux (void) const |
const bam1_core_t & | core (void) const |
| access core data struct
|
bam1_core_t & | core (void) |
| access core data struct
|
const uint32_t * | cigar (void) const |
| access CIGAR array
|
uint32_t | cigar (size_t i) const |
uint32_t | cigar_op (size_t i) const |
uint32_t | cigar_oplen (size_t i) const |
std::string | cigar_str (void) const |
void | cigar (const std::vector< uint32_t > &c) |
| set CIGAR
|
uint8_t | qual (size_t i) const |
const char * | name (void) const |
int32_t | tid (void) const |
| chromosome ID
|
int32_t | pos (void) const |
| 0-based laftmost coordinate
|
int32_t | end (void) const |
| rightmost coordinate
|
int32_t | mtid (void) const |
| Chromosome ID for mate.
|
int32_t | mpos (void) const |
| leftmost position for mate
|
std::string | sequence (void) const |
uint8_t | sequence (size_t index) const |
uint32_t | sequence_length (void) const |
uint16_t | flag (void) const |
| bitwise flag
|
void | swap (BamRead &other) |
Friends |
class | InBamFile |
class | OutBamFile |
class | BamReadIterator |
Detailed Description
Class holding a bam query.
This is a wrapper around bam1_t and most of its information is held in the core struct. A BamRead is typically created from a InBamFile.
- See also:
- samtools
- Since:
- New in yat 0.10
Constructor & Destructor Documentation
theplu::yat::omic::BamRead::BamRead |
( |
void |
| ) |
|
default constructor
Constructed object contains no data and most operations are not defined
Member Function Documentation
const uint8_t* theplu::yat::omic::BamRead::aux |
( |
void |
| ) |
const |
- Returns:
- pointer to auxiliary data
const uint32_t* theplu::yat::omic::BamRead::cigar |
( |
void |
| ) |
const |
access CIGAR array
In each element the lower 4 bits gives a CIGAR operation and the upper 28 bits keep the length.
uint32_t theplu::yat::omic::BamRead::cigar |
( |
size_t |
i | ) |
const |
- Returns:
- i th element of CIGAR array
void theplu::yat::omic::BamRead::cigar |
( |
const std::vector< uint32_t > & |
c | ) |
|
uint32_t theplu::yat::omic::BamRead::cigar_op |
( |
size_t |
i | ) |
const |
- Returns:
- i th CIGAR operation
uint32_t theplu::yat::omic::BamRead::cigar_oplen |
( |
size_t |
i | ) |
const |
- Returns:
- length of i th CIGAR element
std::string theplu::yat::omic::BamRead::cigar_str |
( |
void |
| ) |
const |
Translate CIGAR array to a string such as '72M3S'
const bam1_core_t& theplu::yat::omic::BamRead::core |
( |
void |
| ) |
const |
access core data struct
- See also:
- samtools C api documentaion
bam1_core_t& theplu::yat::omic::BamRead::core |
( |
void |
| ) |
|
access core data struct
- See also:
- samtools C api documentaion
int32_t theplu::yat::omic::BamRead::end |
( |
void |
| ) |
const |
rightmost coordinate
Coordinate is 0-based, i.e., the end is one passed the last matching position.
- See also:
- bam_calend
uint16_t theplu::yat::omic::BamRead::flag |
( |
void |
| ) |
const |
bitwise flag
- See also:
- Preprocessor defines BAM_F*
const char* theplu::yat::omic::BamRead::name |
( |
void |
| ) |
const |
- Returns:
- query name
Length of array is described by core().l_qname
uint8_t theplu::yat::omic::BamRead::qual |
( |
size_t |
i | ) |
const |
- Returns:
- Quality of base i
std::string theplu::yat::omic::BamRead::sequence |
( |
void |
| ) |
const |
Each character in returned sequence is either A, C, G, T, or N.
- Returns:
- sequence
uint8_t theplu::yat::omic::BamRead::sequence |
( |
size_t |
index | ) |
const |
4-bit integer describing base index
- See also:
- bam_nt16_rev_table
uint32_t theplu::yat::omic::BamRead::sequence_length |
( |
void |
| ) |
const |
void theplu::yat::omic::BamRead::swap |
( |
BamRead & |
other | ) |
|
Exchanging this read with other.
Friends And Related Function Documentation
uint32_t left_soft_clipped |
( |
const BamRead & |
bam | ) |
|
|
related |
If read is soft clipped on left side, return how many bases are clipped, otherwise return 0.
- Since:
- New in yat 0.10
uint32_t right_soft_clipped |
( |
const BamRead & |
bam | ) |
|
|
related |
If read is soft clipped on right side, return how many bases are clipped, otherwise return 0.
- Since:
- New in yat 0.10
return true
if query names are equal
- See also:
- BamRead::name()
- Since:
- New in yat 0.10
bool soft_clipped |
( |
const BamRead & |
bam | ) |
|
|
related |
- Returns:
true
if read is soft clipped, either left_soft_clipped or right_soft_clipped.
- Since:
- New in yat 0.10
Swap specialization for BamRead that is faster than generic std::swap as it just swap a pointers.
- Since:
- New in yat 0.10
The documentation for this class was generated from the following file:
- /scratch/bob/jari/tmp/pristine/yat-0.10.x/yat/omic/BamRead.h