Boxchain Class Reference

#include <boxchain.h>

List of all members.

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)
Boxchainoperator= (const Boxchain &bc)
void show (ostream &ous) const
const M8MatchEXlast () const
const M8MatchEXfirst () const
M8MatchEXfirst ()
M8MatchEXlast ()
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 bioseqxseq
const bioseqyseq
string top
string buttom
string middle
int sumscore
M8MatchEXbegin
M8MatchEXend
int chlen
double iden
int qolp

Friends

ostream & operator<< (ostream &ous, const Boxchain &bc)


Detailed Description

simple implementation

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


Constructor & Destructor Documentation

Boxchain::Boxchain ( Alignsegex pe,
const bioseq xx,
const bioseq yy 
)

new Boxchain class //////////

References boxes, and Alignsegex::previous().

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().


Member Function Documentation

void Boxchain::buildAlignment ( Dynaln aln  ) 

void Boxchain::printAlign ( ostream &  ous,
const int  width = 70 
)

int Boxchain::getXStart (  )  const [inline]

References boxes.

Referenced by buildAlignment().

int Boxchain::getYStart (  )  const [inline]

References boxes.

Referenced by buildAlignment().

int Boxchain::getXEnd (  )  const [inline]

References boxes.

int Boxchain::getYEnd (  )  const [inline]

References boxes.

int Boxchain::numberHSP (  )  const [inline]

References boxes.

Referenced by buildAlignment(), and printAlign().

int Boxchain::getScore (  )  const [inline]

References sumscore.

Referenced by printAlign().

Boxchain & Boxchain::operator= ( const Boxchain bc  ) 

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::last (  )  const [inline]

References end.

const M8MatchEX* Boxchain::first (  )  const [inline]

References begin.

Referenced by Tblastn::outputModel().

M8MatchEX* Boxchain::first (  )  [inline]

References begin.

M8MatchEX* Boxchain::last (  )  [inline]

References end.

int Boxchain::numMatch (  )  const [inline]

References chlen.

char Boxchain::direction (  )  const [inline]

References begin, and Match::targetDirection().

int Boxchain::queryBegin (  )  const [inline]

References begin, and Match::queryBegin().

Referenced by summaryOutput().

int Boxchain::queryEnd (  )  const [inline]

References end, and Match::queryEnd().

Referenced by summaryOutput().

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]

References end, and Match::targetEnd().

Referenced by summaryOutput().

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

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

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().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ous,
const Boxchain bc 
) [friend]


Member Data Documentation

list<Alignsegex*> Boxchain::boxes [private]

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().

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().

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().


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

Generated on Wed Aug 10 11:57:08 2011 for Softwares from Orpara by  doxygen 1.5.6