yat  0.10.4pre
Classes | Functions
theplu::yat::omic Namespace Reference

Classes and functions related to genomics and proteomics. More...

Classes

class  BamFile
class  InBamFile
class  OutBamFile
class  BamHeader
class  BamRead
 Class holding a bam query. More...
struct  BamLessPos
struct  BamLessEnd
class  BamReadIterator
 class to iterate through a InBamFile More...
class  BamWriter
class  BamWriteIterator
 Output iterator for bam file. More...
class  Codon
struct  AminoAcidEqual
 Functor comparing if two Codons translate to the same amino acid. More...
class  DNA
class  GenomicPosition
class  GFF
class  GFF2
class  GFF3

Functions

template<class Iterator , class Visitor >
void bam_pair_analyse (Iterator first, Iterator last, Visitor &visitor)
unsigned short chr2int (const std::string &str)
 transform a string to unsigned short chromosome number

Detailed Description

Classes and functions related to genomics and proteomics.


Function Documentation

template<class Iterator , class Visitor >
void theplu::yat::omic::bam_pair_analyse ( Iterator  first,
Iterator  last,
Visitor &  visitor 
)

bam_pair_analyse performs an operation on bam read pairs as defined by visitor. The function iterates over sorted input range of reads; if read is first read, it is cached for later use; if read is second read and mate is present in cache, visitor operates on pair, i.e., Visitor (mate, read) is called.

Type Requirements:

  • Iterator must be an Input Iterator
  • Iterator 's reference type must be convertible to BamRead
  • Visitor must have an operator()(BamRead, BamRead) (or any const or reference combination)
Note:
Input range [first, last ) must be sorted or behaviour is undefined.
Since:
New in yat 0.10
unsigned short theplu::yat::omic::chr2int ( const std::string &  str)

transform a string to unsigned short chromosome number

If str starts with 'chr' that prefix is stripped away before translating the string to chromosome number. Function translates "X" to 23, "Y" to 24, and "M" or "MT" to 25. For other inputs utility::convert is used to transform the input to an unsigned short.

Returns:
chromosome number
Since:
New in yat 0.7

Generated on Mon Nov 11 2013 09:41:45 for yat by  doxygen 1.8.1