Instances of the Region class represent regions on a sequence. They have first and last coordinates, strand information and a name.
More...
#include "region.hh"
|
| Region () |
| Inits to empty (makes sense when using as input buffer)
|
|
| Region (unsigned int f, unsigned int l, char s, const std::string &nm) |
|
virtual | ~Region () |
| empty virtual dtor
|
|
void | set_coords (unsigned int f, unsigned int l) |
|
void | strand (char s) |
| Sets the strand.
|
|
std::string | name (const std::string &nm) |
|
const unsigned int & | first () const |
| Returns the first coordinate.
|
|
const unsigned int & | last () const |
| Returns the last coordinate.
|
|
const unsigned int & | length () const |
| Returns the length.
|
|
bool | is_empty () const |
| Zero-length regions are considered empty.
|
|
const char & | strand () const |
| Returns the strand information.
|
|
const std::string & | name () const |
| Returns the name of the region.
|
|
bool | equal_pos (const Region &rhs) const |
|
bool | operator== (const Region &rhs) const |
|
bool | operator< (const Region &rhs) const |
|
|
class | boost::serialization::access |
|
Instances of the Region class represent regions on a sequence. They have first and last coordinates, strand information and a name.
multovl::Region::Region |
( |
unsigned int |
f, |
|
|
unsigned int |
l, |
|
|
char |
s, |
|
|
const std::string & |
nm |
|
) |
| |
Inits to contain the genomic region with positions [f..l], strand /s/, name /nm/. Enforces the invariance f<=l If f>l, then the values are swapped silently.
- Parameters
-
f | the first position of the region |
l | the last position of the region |
s | the strand indicator. Anything else than '+' or '-' will be converted to '.' |
nm | the feature name for the region Note: the parameters f,l,s will be fixed for the lifetime of the object. |
bool multovl::Region::equal_pos |
( |
const Region & |
rhs | ) |
const |
|
inline |
- Returns
- true if the positions of /*this/ and /other/ are the same, strand information is not considered.
std::string multovl::Region::name |
( |
const std::string & |
nm | ) |
|
Changes the name of the region
- Returns
- old name.
bool multovl::Region::operator< |
( |
const Region & |
rhs | ) |
const |
Ordering. Sorted on first,last coords, strand ('+' < '-' < '.') and the name (lexicographically).
bool multovl::Region::operator== |
( |
const Region & |
rhs | ) |
const |
|
inline |
Equality. All fields must be equal. Equality. Positions and strands must be equal.
void multovl::Region::set_coords |
( |
unsigned int |
f, |
|
|
unsigned int |
l |
|
) |
| |
Sets the coordinates. Enforces f<=l. Sets the length as well.
The documentation for this class was generated from the following file: