yat
0.20.3pre
|
#include <yat/omic/GenomicPosition.h>
Public Member Functions | |
GenomicPosition (void) | |
GenomicPosition (unsigned short chr, unsigned long pos) | |
Constructor. More... | |
GenomicPosition (const std::string &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) |
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.
theplu::yat::omic::GenomicPosition::GenomicPosition | ( | void | ) |
Creates a GenomicPosition with undefined values.
theplu::yat::omic::GenomicPosition::GenomicPosition | ( | unsigned short | chr, |
unsigned long | pos | ||
) |
Constructor.
chr | chromosome |
pos | non-negative number describing location on chromosome |
theplu::yat::omic::GenomicPosition::GenomicPosition | ( | const std::string & | chr, |
unsigned long | pos | ||
) |
Constructor.
chr | chromosome |
pos | non-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
.
theplu::yat::omic::GenomicPosition::GenomicPosition | ( | const std::string & | chr, |
const std::string & | pos | ||
) |
Constructor.
chr | chromosome |
pos | non-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
.
unsigned short& theplu::yat::omic::GenomicPosition::chromosome | ( | void | ) |
const unsigned short& theplu::yat::omic::GenomicPosition::chromosome | ( | void | ) | const |
unsigned long int& theplu::yat::omic::GenomicPosition::position | ( | void | ) |
const unsigned long int& theplu::yat::omic::GenomicPosition::position | ( | void | ) | const |
|
related |
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.
|
related |
true
if chromosomes and positions are the same.