yat  0.20.3pre
Classes | Public Types | Public Member Functions | Related Functions | List of all members
theplu::yat::omic::Pileup< Iterator > Class Template Reference

#include <yat/omic/Pileup.h>

Classes

class  Entry
 

Public Types

typedef std::list< Entry >::const_iterator const_iterator
 
typedef std::list< Entry >::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

 Pileup (void)
 
 Pileup (Iterator first, Iterator last)
 
const_iterator begin (void) const
 
const_iterator end (void) const
 
bool good (void) const
 
void increment (void)
 step to next position. More...
 
size_t size (void) const
 
const_reverse_iterator rbegin (void) const
 
const_reverse_iterator rend (void) const
 
int32_t tid (void) const
 
int32_t pos (void) const
 
bool skip_ref (void) const
 

Related Functions

(Note that these are not member functions.)

template<typename Iterator >
Pileup< Iterator > make_pileup (Iterator first, Iterator last)
 

Detailed Description

template<typename Iterator>
class theplu::yat::omic::Pileup< Iterator >

Pileup takes a range of BamReads and pile them up on the current position. User can investigate the pile of reads at current (locus) position via begin() and end(), which provide access to reads at current position. The position can be incremented and in that way the user can investigate each position of the genome.

Since
new in yat 0.13

Type Requirments:

Member Typedef Documentation

◆ const_iterator

template<typename Iterator>
typedef std::list<Entry>::const_iterator theplu::yat::omic::Pileup< Iterator >::const_iterator

Const iterator that can be used to iterate over reads that overlap with current position (as defined by tid() and pos()).

◆ const_reverse_iterator

template<typename Iterator>
typedef std::list<Entry>::const_reverse_iterator theplu::yat::omic::Pileup< Iterator >::const_reverse_iterator

Same as const_iterator but iterates reversed.

See also
rbegin(void) rend(void)
Since
new in yat 0.17

Constructor & Destructor Documentation

◆ Pileup() [1/2]

template<typename Iterator>
theplu::yat::omic::Pileup< Iterator >::Pileup ( void  )
inline

Create an empty Pileup

◆ Pileup() [2/2]

template<typename Iterator >
theplu::yat::omic::Pileup< Iterator >::Pileup ( Iterator  first,
Iterator  last 
)

Create a Pileup that will use reads in range [first, last). The range must be sorted as defined by BamLessPos.

Iterator is a Readable Iterator.

Member Function Documentation

◆ begin()

template<typename Iterator >
Pileup< Iterator >::const_iterator theplu::yat::omic::Pileup< Iterator >::begin ( void  ) const
Returns
an iterator that points to the first Entry in Pileup.

Iteration is done in same order as range provided in constructor. Reads that do not overlap with current position (tid:pos) are ignored.

◆ end()

template<typename Iterator >
Pileup< Iterator >::const_iterator theplu::yat::omic::Pileup< Iterator >::end ( void  ) const
Returns
an iterator that points one past the last element in the Pileup.

◆ good()

template<typename Iterator>
bool theplu::yat::omic::Pileup< Iterator >::good ( void  ) const
inline
Returns
true if there are more positions to increment into

◆ increment()

template<typename Iterator >
void theplu::yat::omic::Pileup< Iterator >::increment ( void  )

step to next position.

If any Entry has a insertion at current position, increment each Entry that has an insertion. Otherwise increment to next position and update each Entry accordingly.

If the position is not covered by any read, the Pileup fastforward to next covered locus.

◆ pos()

template<typename Iterator>
int32_t theplu::yat::omic::Pileup< Iterator >::pos ( void  ) const
inline
Returns
position

When in a skip_ref region, the position of the next reference is returned.

◆ rbegin()

template<typename Iterator >
Pileup< Iterator >::const_reverse_iterator theplu::yat::omic::Pileup< Iterator >::rbegin ( void  ) const
Returns
an iterator that points to the last Entry in Pileup.

Iteration is done in reversed order; othwerwise behaves as begin(void)

Since
new in yat 0.17

◆ rend()

template<typename Iterator >
Pileup< Iterator >::const_reverse_iterator theplu::yat::omic::Pileup< Iterator >::rend ( void  ) const
Returns
const reverse iterator to reverse end
See also
end(void)
rbegin(void)
Since
new in yat 0.17

◆ size()

template<typename Iterator >
size_t theplu::yat::omic::Pileup< Iterator >::size ( void  ) const
Returns
number of reads in pileup. Reads with a deletion of the current position is also counted.
Since
new in yat 0.17

◆ skip_ref()

template<typename Iterator >
bool theplu::yat::omic::Pileup< Iterator >::skip_ref ( void  ) const
Returns
true if position does not exist in reference, i.e., inserted region.

◆ tid()

template<typename Iterator>
int32_t theplu::yat::omic::Pileup< Iterator >::tid ( void  ) const
inline
Returns
template id as defined in bam file header

Friends And Related Function Documentation

◆ make_pileup()

template<typename Iterator >
Pileup< Iterator > make_pileup ( Iterator  first,
Iterator  last 
)
related
Since
new in yat 0.13

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

Generated on Sat Feb 18 2023 03:31:44 for yat by  doxygen 1.8.14