#include <alnrange.h>

Public Member Functions | |
| alnrange () | |
| alnrange (const alnrange &r) | |
| alnrange (int b, int e, double s, double ng, double c) | |
| virtual | ~alnrange () |
| alnrange & | operator= (const alnrange &r) |
| bool | overlap (const alnrange &r, const int margin) |
| bool | overlap (const alnrange &r) |
| int | length () const |
| int | getBegin () const |
| int | getEnd () const |
| double | getScore () const |
| double | getNg () const |
| double | getCov () const |
| virtual string | asTabedString () const |
| virtual string | asDelimitedString (char sep[]=",") const |
| virtual string | essentialInfo () const |
Static Public Member Functions | |
| static string | fields () |
| static void | setmargin (int olpcut, float olpfrac) |
Protected Attributes | |
| int | begin |
| int | end |
| double | score |
| double | ngidentity |
| double | cov |
Static Protected Attributes | |
| static int | ovlpcut = 5 |
| static float | ovlpfraction = 0.1 |
Friends | |
| ostream & | operator<< (ostream &ous, const alnrange &r) |
Using another data type such as PgDatabase may not be good.
Input and output should use standard lib containners instead of database connection object. This will make the class more portable.
There is a much better and more generic implementation of ragne in range directory. I should rename the range in this directory.
Should be alnrange
| alnrange::alnrange | ( | ) | [inline] |
| alnrange::alnrange | ( | int | b, | |
| int | e, | |||
| double | s, | |||
| double | ng, | |||
| double | c | |||
| ) | [inline] |
| virtual alnrange::~alnrange | ( | ) | [inline, virtual] |
References begin, cov, end, ngidentity, and score.
| bool alnrange::overlap | ( | const alnrange & | r, | |
| const int | margin | |||
| ) |
| bool alnrange::overlap | ( | const alnrange & | r | ) |
References begin, end, getBegin(), getEnd(), overlap(), ovlpcut, and ovlpfraction.
| int alnrange::getBegin | ( | ) | const [inline] |
References begin.
Referenced by avgrange::avgrange(), avgrange::merge(), avgrange::overlap(), and overlap().
| int alnrange::getEnd | ( | ) | const [inline] |
References end.
Referenced by avgrange::avgrange(), avgrange::merge(), avgrange::overlap(), and overlap().
| double alnrange::getScore | ( | ) | const [inline] |
| double alnrange::getNg | ( | ) | const [inline] |
| double alnrange::getCov | ( | ) | const [inline] |
| string alnrange::asTabedString | ( | ) | const [virtual] |
Reimplemented in rangePair.
References begin.
Referenced by rangePair::asTabedString(), rangePair::essentialInfo(), and operator<<().
| string alnrange::asDelimitedString | ( | char | sep[] = "," |
) | const [virtual] |
| string alnrange::fields | ( | ) | [static] |
| static void alnrange::setmargin | ( | int | olpcut, | |
| float | olpfrac | |||
| ) | [inline, static] |
| ostream& operator<< | ( | ostream & | ous, | |
| const alnrange & | r | |||
| ) | [friend] |
this function is not very useful, further more itoa is not implemented in this stdlib.h list<string> rangePair::fieldsAsList() const { list<string> tmp; char buff[12]; tmp.push_back(itoa(begin,buff)); tmp.push_back(itoa(end,buff)); tmp.push_back(gcvt(score,10,buff)); tmp.push_back(gcvt(cov,3,buff)); tmp.push_back(tprtid); tmp.push_back(itoa(tmodelid,10,buff)); tmp.push_back(tgenomicid); tmp.push_back(tstrand); tmp.push_back(itoa(tstart,10,buff)); tmp.push_back(itoa(tend,10,buff)); tmp.push_back(gcvt(tcov,3,buff)); return tmp; }
int alnrange::begin [protected] |
Referenced by alnrange(), asDelimitedString(), asTabedString(), essentialInfo(), getBegin(), length(), operator=(), and overlap().
int alnrange::end [protected] |
Referenced by alnrange(), getEnd(), length(), operator=(), and overlap().
double alnrange::score [protected] |
addable score from blast or alignment programs
Referenced by alnrange(), getScore(), and operator=().
double alnrange::ngidentity [protected] |
non-gapped identity, identity should also be fine
Referenced by alnrange(), getNg(), operator=(), and rangePair::sameGene().
double alnrange::cov [protected] |
coverage on query
Referenced by alnrange(), getCov(), and operator=().
int alnrange::ovlpcut = 5 [static, protected] |
Referenced by overlap(), and setmargin().
float alnrange::ovlpfraction = 0.1 [static, protected] |
Referenced by overlap(), and setmargin().
1.5.6