yat  0.14.5pre
Public Member Functions | Related Functions | List of all members
theplu::yat::omic::GenomicPosition Class Reference

#include <yat/omic/GenomicPosition.h>

Inheritance diagram for theplu::yat::omic::GenomicPosition:

Public Member Functions

 GenomicPosition (void)
 
 GenomicPosition (unsigned short chr, unsigned long pos)
 Constructor. More...
 
 GenomicPosition (const std::string &chr, const std::string &pos)
 Constructor. More...
 
unsigned short & chromosome (void)
 
const unsigned short & chromosome (void) const
 
unsigned long int & position (void)
 
const unsigned long int & position (void) const
 

Related Functions

(Note that these are not member functions.)

bool operator< (const GenomicPosition &lhs, const GenomicPosition &rhs)
 
bool operator== (const GenomicPosition &lhs, const GenomicPosition &rhs)
 

Detailed Description

Class used to hold genomic location, i.e., chromosome and position.

The class inherits from boost::operators, which means besides the operators directly implemented (operator== and operator<) also operator<=, operator>, operator>=, and operator!= are supported.

Since
New in yat 0.7

Constructor & Destructor Documentation

theplu::yat::omic::GenomicPosition::GenomicPosition ( void  )

Creates a GenomicPosition with undefined values.

theplu::yat::omic::GenomicPosition::GenomicPosition ( unsigned short  chr,
unsigned long  pos 
)

Constructor.

Parameters
chrchromosome
posnon-negative number describing location on chromosome
theplu::yat::omic::GenomicPosition::GenomicPosition ( const std::string &  chr,
const std::string &  pos 
)

Constructor.

Parameters
chrchromosome
posnon-negative number describing location on chromosome

chr2int is used to translate chr into an unsigned short, and utility::convert is used to translate pos into an unsigned long.

See Also
chr2int

Member Function Documentation

unsigned short& theplu::yat::omic::GenomicPosition::chromosome ( void  )
Returns
reference to chr
const unsigned short& theplu::yat::omic::GenomicPosition::chromosome ( void  ) const
Returns
const reference to chr
unsigned long int& theplu::yat::omic::GenomicPosition::position ( void  )
Returns
reference to position
const unsigned long int& theplu::yat::omic::GenomicPosition::position ( void  ) const
Returns
const reference to position

Friends And Related Function Documentation

bool operator< ( const GenomicPosition lhs,
const GenomicPosition rhs 
)
related
Returns
true if chromosome of lhs is less than chromosome of rhs or if chromosome of lhs equals chromosome of rhs and position of lhs is less than position of rhs.
Since
New in yat 0.7
bool operator== ( const GenomicPosition lhs,
const GenomicPosition rhs 
)
related
Returns
true if chromosomes and positions are the same.
Since
New in yat 0.7

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

Generated on Tue Sep 26 2017 02:33:30 for yat by  doxygen 1.8.5