#include <boxchain.h>
Public Member Functions | |
| Boxchain (Alignsegex *pe, const bioseq *xx, const bioseq *yy) | |
| new Boxchain class ////////// | |
| ~Boxchain () | |
| void | buildAlignment (Dynaln &aln) |
| void | printAlign (ostream &ous, const int width=70) |
| int | getXStart () const |
| int | getYStart () const |
| int | getXEnd () const |
| int | getYEnd () const |
| int | numberHSP () const |
| int | getScore () const |
| Boxchain () | |
| ~Boxchain () | |
| Boxchain (M8MatchEX *p) | |
| Boxchain (const Boxchain &bc) | |
| Boxchain & | operator= (const Boxchain &bc) |
| void | show (ostream &ous) const |
| const M8MatchEX * | last () const |
| const M8MatchEX * | first () const |
| M8MatchEX * | first () |
| M8MatchEX * | last () |
| int | numMatch () const |
| char | direction () const |
| int | queryBegin () const |
| int | queryEnd () const |
| int | targetBegin () const |
| int | targetEnd () const |
| double | sumScore () const |
| double | maxScore () const |
| double | avgIdentity () const |
| int | queryOverlap () const |
| ostream & | summaryOutput (ostream &ous, const char dl[]="\t") const |
| ostream & | detailOutput (ostream &ous, const string &qid, const string &tid, const int &id, const char dl[]="\t") const |
| int | queryCovered () const |
| int | querySeqCovered () const |
Private Attributes | |
| list< Alignsegex * > | boxes |
| const bioseq * | xseq |
| const bioseq * | yseq |
| string | top |
| string | buttom |
| string | middle |
| int | sumscore |
| M8MatchEX * | begin |
| M8MatchEX * | end |
| int | chlen |
| double | iden |
| int | qolp |
Friends | |
| ostream & | operator<< (ostream &ous, const Boxchain &bc) |
This class should be independent of the Linkmath object. I will implement the copy by value scheme. This object is manufactured by the Linkmatch object
| Boxchain::Boxchain | ( | Alignsegex * | pe, | |
| const bioseq * | xx, | |||
| const bioseq * | yy | |||
| ) |
| Boxchain::~Boxchain | ( | ) |
References boxes.
| Boxchain::Boxchain | ( | ) | [inline] |
| Boxchain::~Boxchain | ( | ) |
use start2match as a guide to deallocate memory
| Boxchain::Boxchain | ( | M8MatchEX * | p | ) |
build the object out of the chaining algorithm (the chain is in reversed order). This is a very special Copy constructor. It takes a constructed chain, which is in reverse order. Give this train to this object. Then it remove all elements in the Linkmatch objects all poiinters that point to this objexts.
It manipulates pointers.
Can only call this constructor once on one particular end!
References begin, chlen, M8MatchEX::previous(), and M8MatchEX::setNext().
| Boxchain::Boxchain | ( | const Boxchain & | bc | ) |
copy the nodes in the chain list. New objects made. It must make new object if use itsown destructors. otherwise have to implement reference counted pointer.
References begin, end, M8MatchEX::next(), M8MatchEX::setNext(), and M8MatchEX::setPrevious().
| void Boxchain::buildAlignment | ( | Dynaln & | aln | ) |
References boxes, buttom, Dynaln::buttomBeginIndex(), Dynaln::buttomEndIndex(), Dynaln::getButtomAln(), bioseq::getcode(), Alignsegex::getConnectPath(), Alignseg::getEndX(), Alignseg::getEndY(), Alignseg::getLength(), Dynaln::getScore(), Dynaln::getScoringMatrix(), Dynaln::getTopAln(), Alignseg::getX(), getXStart(), Alignseg::getY(), getYStart(), bioseq::length(), length, Matrix::lookup(), middle, numberHSP(), Dynaln::runglobal(), Dynaln::runlocal(), Matrix::score(), Dynaln::setseq(), string(), bioseq::subsequence(), bioseq::substring(), sumscore, top, Dynaln::topBeginIndex(), Dynaln::topEndIndex(), xseq, and yseq.
| void Boxchain::printAlign | ( | ostream & | ous, | |
| const int | width = 70 | |||
| ) |
References buttom, bioseq::getName(), getScore(), middle, numberHSP(), top, xseq, and yseq.
| int Boxchain::getXStart | ( | ) | const [inline] |
| int Boxchain::getYStart | ( | ) | const [inline] |
| int Boxchain::getXEnd | ( | ) | const [inline] |
References boxes.
| int Boxchain::getYEnd | ( | ) | const [inline] |
References boxes.
| int Boxchain::numberHSP | ( | ) | const [inline] |
| int Boxchain::getScore | ( | ) | const [inline] |
Copy by value
References begin, chlen, end, iden, M8MatchEX::next(), qolp, M8MatchEX::setNext(), and M8MatchEX::setPrevious().
| void Boxchain::show | ( | ostream & | ous | ) | const |
debug show Gives you all the information about this object. For debug purpose.
References begin, and M8MatchEX::next().
| const M8MatchEX* Boxchain::first | ( | ) | const [inline] |
| int Boxchain::numMatch | ( | ) | const [inline] |
References chlen.
| char Boxchain::direction | ( | ) | const [inline] |
References begin, and Match::targetDirection().
| int Boxchain::queryBegin | ( | ) | const [inline] |
| int Boxchain::queryEnd | ( | ) | const [inline] |
| int Boxchain::targetBegin | ( | ) | const [inline] |
if on + then begin, else on - end The begin-end encodes direction
References begin, and Match::targetBegin().
Referenced by summaryOutput().
| int Boxchain::targetEnd | ( | ) | const [inline] |
| double Boxchain::sumScore | ( | ) | const [inline] |
this gives the same result as maxScore() an alias.
References end, and M8MatchEX::getMaxScore().
| double Boxchain::maxScore | ( | ) | const [inline] |
this function returns the max score for this chain which is stored in the last node
References end, and M8MatchEX::getMaxScore().
| double Boxchain::avgIdentity | ( | ) | const |
References M8Match::alnlen(), begin, iden, M8Match::identity(), and M8MatchEX::next().
Referenced by summaryOutput().
| int Boxchain::queryOverlap | ( | ) | const |
return the sum of the overlaps on the query.
References begin, M8MatchEX::next(), Range::overlap(), qolp, and Match::queryRange().
Referenced by Tblastn::outputModel().
| ostream & Boxchain::summaryOutput | ( | ostream & | ous, | |
| const char | dl[] = "\t" | |||
| ) | const |
helper function to be use by Tblastn to produce the database row for summary of each footprint
the outputed columns: qbegin, qend, tbegin, tend, numexon, sumscore, avgiden
References avgIdentity(), chlen, end, M8MatchEX::getMaxScore(), queryBegin(), queryEnd(), targetBegin(), and targetEnd().
Referenced by Tblastn::outputModel().
| ostream & Boxchain::detailOutput | ( | ostream & | ous, | |
| const string & | qid, | |||
| const string & | tid, | |||
| const int & | id, | |||
| const char | dl[] = "\t" | |||
| ) | const |
References begin, M8MatchEX::next(), and M8Match::output().
| int Boxchain::queryCovered | ( | ) | const [inline] |
total length of query that parcipated the alignment regardless of internal gaps, this number is larger than the actual residues participating alignment.
References begin, end, Match::queryBegin(), and Match::queryEnd().
| int Boxchain::querySeqCovered | ( | ) | const |
This version counts the actual residues participating alignment is is smaller than the queryCovered() value
References begin, M8MatchEX::next(), and Match::queryLength().
Referenced by Tblastn::outputModel().
| ostream& operator<< | ( | ostream & | ous, | |
| const Boxchain & | bc | |||
| ) | [friend] |
list<Alignsegex*> Boxchain::boxes [private] |
Referenced by Boxchain(), buildAlignment(), getXEnd(), getXStart(), getYEnd(), getYStart(), numberHSP(), operator<<(), and ~Boxchain().
const bioseq* Boxchain::xseq [private] |
Referenced by buildAlignment(), and printAlign().
const bioseq* Boxchain::yseq [private] |
Referenced by buildAlignment(), and printAlign().
string Boxchain::top [private] |
Referenced by buildAlignment(), and printAlign().
string Boxchain::buttom [private] |
Referenced by buildAlignment(), and printAlign().
string Boxchain::middle [private] |
Referenced by buildAlignment(), and printAlign().
int Boxchain::sumscore [private] |
Referenced by buildAlignment(), and getScore().
M8MatchEX* Boxchain::begin [private] |
the linked list of M8MatchEX nodes are sorted according to query protein from small to large
Referenced by avgIdentity(), Boxchain(), detailOutput(), direction(), first(), operator=(), queryBegin(), queryCovered(), queryOverlap(), querySeqCovered(), show(), and targetBegin().
M8MatchEX* Boxchain::end [private] |
Referenced by Boxchain(), last(), maxScore(), operator=(), queryCovered(), queryEnd(), summaryOutput(), sumScore(), and targetEnd().
int Boxchain::chlen [private] |
number of boxes (elemental matches)
Referenced by Boxchain(), numMatch(), operator=(), and summaryOutput().
double Boxchain::iden [mutable, private] |
average identity
Referenced by avgIdentity(), and operator=().
int Boxchain::qolp [mutable, private] |
sum of query overlap when looking at all the matches
Referenced by operator=(), and queryOverlap().
1.5.6