|
Gamgee
You miserable little maggot. I'll stove your head in!
|
Utility class to manipulate a Sam record. More...
#include <sam.h>
Public Member Functions | |
| Sam ()=default | |
| initializes a null Sam More... | |
| Sam (const std::shared_ptr< bam_hdr_t > &header, const std::shared_ptr< bam1_t > &body) noexcept | |
| creates a Sam given htslib objects. More... | |
| Sam (const Sam &other) | |
| makes a deep copy of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly. More... | |
| Sam (Sam &&other) noexcept | |
| moves Sam and it's header accordingly. Shared pointers maintain state to all other associated objects correctly. More... | |
| Sam & | operator= (const Sam &other) |
| deep copy assignment of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly. More... | |
| Sam & | operator= (Sam &&other) noexcept |
| move assignment of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly. More... | |
| SamHeader | header () |
| uint32_t | chromosome () const |
| returns the integer representation of the chromosome. Notice that chromosomes are listed in index order with regards to the header (so a 0-based number). Similar to Picards getReferenceIndex() More... | |
| uint32_t | alignment_start () const |
| returns a (1-based and inclusive) alignment start position (as you would see in a Sam file). More... | |
| uint32_t | alignment_stop () const |
| returns a (1-based and inclusive) alignment stop position (as you would see in a Sam file). More... | |
| uint32_t | unclipped_start () const |
| calculates the theoretical alignment start of a read that has soft/hard-clips preceding the alignment More... | |
| uint32_t | unclipped_stop () const |
| calculates the theoretical alignment stop of a read that has soft/hard-clips preceding the alignment More... | |
| uint32_t | mate_chromosome () const |
| returns the integer representation of the mate's chromosome. Notice that chromosomes are listed in index order with regards to the header (so a 0-based number). Similar to Picards getMateReferenceIndex() More... | |
| uint32_t | mate_alignment_start () const |
| returns a (1-based and inclusive) mate's alignment start position (as you would see in a Sam file). More... | |
| uint32_t | mate_alignment_stop () const |
| returns a (1-based and inclusive) mate'salignment stop position (as you would see in a Sam file). More... | |
| uint32_t | mate_unclipped_start () const |
| uint32_t | mate_unclipped_stop () const |
| void | set_chromosome (const uint32_t chr) |
| simple setter for the chromosome index. Index is 0-based. More... | |
| void | set_alignment_start (const uint32_t start) |
| simple setter for the alignment start. More... | |
| void | set_mate_chromosome (const uint32_t mchr) |
| simple setter for the mate's chromosome index. Index is 0-based. More... | |
| void | set_mate_alignment_start (const uint32_t mstart) |
| simple setter for the mate's alignment start. More... | |
| std::string | name () const |
| returns the read name More... | |
| ReadBases | bases () const |
| returns the read bases More... | |
| BaseQuals | base_quals () const |
| returns the base qualities More... | |
| Cigar | cigar () const |
| returns the cigar More... | |
| bool | paired () const |
| whether or not this read is paired More... | |
| bool | properly_paired () const |
| whether or not this read is properly paired (see definition in BAM spec) More... | |
| bool | unmapped () const |
| whether or not this read is unmapped More... | |
| bool | next_unmapped () const |
| whether or not the next read is unmapped More... | |
| bool | reverse () const |
| whether or not this read is from the reverse strand More... | |
| bool | next_reverse () const |
| whether or not the next read is from the reverse strand More... | |
| bool | first () const |
| whether or not this read is the first read in a pair (or multiple pairs) More... | |
| bool | last () const |
| whether or not this read is the last read in a pair (or multiple pairs) More... | |
| bool | secondary () const |
| whether or not this read is a secondary alignment (see definition in BAM spec) More... | |
| bool | fail () const |
| whether or not this read is marked as failing vendor (sequencer) quality control More... | |
| bool | duplicate () const |
| whether or not this read is a duplicate More... | |
| bool | supplementary () const |
| whether or not this read is a supplementary alignment (see definition in the BAM spec) More... | |
| void | set_paired () |
| void | set_not_paired () |
| void | set_unmapped () |
| void | set_not_unmapped () |
| void | set_next_unmapped () |
| void | set_not_next_unmapped () |
| void | set_reverse () |
| void | set_not_reverse () |
| void | set_next_reverse () |
| void | set_not_next_reverse () |
| void | set_first () |
| void | set_not_first () |
| void | set_last () |
| void | set_not_last () |
| void | set_secondary () |
| void | set_not_secondary () |
| void | set_fail () |
| void | set_not_fail () |
| void | set_duplicate () |
| void | set_not_duplicate () |
| void | set_supplementary () |
| void | set_not_supplementary () |
| bool | empty () const |
| whether or not this Sam object is empty, meaning that the internal memory has not been initialized (i.e. a Sam object initialized with Sam()). More... | |
Friends | |
| class | SamWriter |
| allows the writer to access the guts of the object More... | |
Utility class to manipulate a Sam record.
|
default |
|
explicitnoexcept |
| gamgee::Sam::Sam | ( | const Sam & | other | ) |
makes a deep copy of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly.
creates a deep copy of a sam record
|
noexcept |
moves Sam and it's header accordingly. Shared pointers maintain state to all other associated objects correctly.
moves a sam record, transferring ownership of the underlying htslib memory
|
inline |
returns a (1-based and inclusive) alignment start position (as you would see in a Sam file).
|
inline |
returns a (1-based and inclusive) alignment stop position (as you would see in a Sam file).
|
inline |
returns the base qualities
|
inline |
returns the read bases
|
inline |
returns the integer representation of the chromosome. Notice that chromosomes are listed in index order with regards to the header (so a 0-based number). Similar to Picards getReferenceIndex()
|
inline |
returns the cigar
|
inline |
whether or not this read is a duplicate
|
inline |
|
inline |
whether or not this read is marked as failing vendor (sequencer) quality control
|
inline |
whether or not this read is the first read in a pair (or multiple pairs)
|
inline |
|
inline |
whether or not this read is the last read in a pair (or multiple pairs)
|
inline |
returns a (1-based and inclusive) mate's alignment start position (as you would see in a Sam file).
| uint32_t gamgee::Sam::mate_alignment_stop | ( | ) | const |
returns a (1-based and inclusive) mate'salignment stop position (as you would see in a Sam file).
|
inline |
returns the integer representation of the mate's chromosome. Notice that chromosomes are listed in index order with regards to the header (so a 0-based number). Similar to Picards getMateReferenceIndex()
|
inline |
| uint32_t gamgee::Sam::mate_unclipped_stop | ( | ) | const |
|
inline |
returns the read name
|
inline |
whether or not the next read is from the reverse strand
|
inline |
whether or not the next read is unmapped
deep copy assignment of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly.
creates a deep copy of a sam record
< shared_ptr assignment will take care of deallocating old sam record if necessary
< shared_ptr assignment will take care of deallocating old sam record if necessary
move assignment of a Sam and it's header. Shared pointers maintain state to all other associated objects correctly.
moves a sam record, transferring ownership of the underlying htslib memory
< shared_ptr assignment will take care of decrementing the reference count for the old managed object (and destroying it if necessary)
< shared_ptr assignment will take care of decrementing the reference count for the old managed object (and destroying it if necessary)
|
inline |
whether or not this read is paired
|
inline |
whether or not this read is properly paired (see definition in BAM spec)
|
inline |
whether or not this read is from the reverse strand
|
inline |
whether or not this read is a secondary alignment (see definition in BAM spec)
|
inline |
simple setter for the alignment start.
|
inline |
simple setter for the chromosome index. Index is 0-based.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
simple setter for the mate's alignment start.
|
inline |
simple setter for the mate's chromosome index. Index is 0-based.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
whether or not this read is a supplementary alignment (see definition in the BAM spec)
| uint32_t gamgee::Sam::unclipped_start | ( | ) | const |
calculates the theoretical alignment start of a read that has soft/hard-clips preceding the alignment
Invalid to call on an unmapped read. Invalid to call with cigar = null
| uint32_t gamgee::Sam::unclipped_stop | ( | ) | const |
calculates the theoretical alignment stop of a read that has soft/hard-clips preceding the alignment
Invalid to call on an unmapped read. Invalid to call with cigar = null
|
inline |
whether or not this read is unmapped
|
friend |
allows the writer to access the guts of the object
1.8.7