#include <Esambl.h>
Public Member Functions | |
| Graphid (const vector< Alnchainid * > &modfrag) | |
| ~Graphid () | |
| bool | allAssembled () const |
| void | prepareAssembly () |
| void | assemble (const string &gid, const string &gseq, set< ESTAssemblyid *, lessByChainDirectionPtr > &allest) throw (PointOutChain) |
| int | assembleOneRound (Noschain &res, int &count, Coverdepth *&covd) throw (PointOutChain, Invariant) |
| void | showMatrix (ostream &ous) const |
| void | showInput (ostream &ous) const |
| int | numberOfVertices () const |
Static Public Member Functions | |
| static int | getCongregationId () |
Public Attributes | |
| vector< Alnchainid * > | input |
| vector< GraphNode > | vertices |
| vector< vector< int > > | adjm |
| priority_queue< HeadNode > | NVQ |
Static Public Attributes | |
| static int | congid = 1 |
| static int | genomic_lengthcut = 26 |
Private Member Functions | |
| void | init (const vector< Alnchainid * > &modfrag) |
| string | allInputESTIdsString (const char sep=',') const |
| vector< string > | allInputESTIds () const |
| void | appendAllESTIds (vector< string > &idv) const |
| void | assignESTIds (const set< ESTAssemblyid *, lessByChainDirectionPtr > &estmod) const |
Friends | |
| ostream & | operator<< (ostream &ous, const Graph &gr) |
| Graphid::Graphid | ( | const vector< Alnchainid * > & | modfrag | ) | [inline] |
| Graphid::~Graphid | ( | ) |
this object will release the memory transfered through the constructor parameter modfrag vector<Alnchainid*> So the supplier will not need to release memory.
References input.
| bool Graphid::allAssembled | ( | ) | const |
| void Graphid::prepareAssembly | ( | ) |
| void Graphid::assemble | ( | const string & | gid, | |
| const string & | gseq, | |||
| set< ESTAssemblyid *, lessByChainDirectionPtr > & | allest | |||
| ) | throw (PointOutChain) |
use set for output mechanism, much better, let the user do the output later. All models in allest are different. This function also did break suffix and prefix models to eliminate chimera models. This function also remove contained models.
| gid | genomic identifier | |
| gseq | genomic sequence | |
| allest | result of the assembly. This is the set of ESTAssemblies produced from this method. All ESTAssemblies point to the sam congid. They will have ESTids stored inside. |
References assembleOneRound(), assignESTIds(), breakExtraModel(), ESTAssemblyid::breakup(), congid, del(), Noschain::directionAgree(), genomic_lengthcut, ESTAssembly::isChimera(), Range::length(), Noschain::show(), and PointOutChain::what().
Referenced by assembleChain().
| int Graphid::assembleOneRound | ( | Noschain & | res, | |
| int & | count, | |||
| Coverdepth *& | covd | |||
| ) | throw (PointOutChain, Invariant) |
production version no debug output
| res | is the output result, one single Noschain to represent one assembly. | |
| count. | is the total number of ESTS in this assembly. | |
| covd | Base Coverage Profile result. |
References adjm, allAssembled(), black, GraphNode::c, Noschain::exons, GraphNode::idx, input, NVQ, prepareAssembly(), Noschain::reverse(), vertices, and white.
Referenced by assemble().
| void Graphid::showMatrix | ( | ostream & | ous | ) | const |
| void Graphid::showInput | ( | ostream & | ous | ) | const |
output each alignment to ous, one per line Use the output operator of Alignchainid
References input, and numberOfVertices().
| int Graphid::numberOfVertices | ( | ) | const [inline] |
number of vertices in the grapha, different from number of input EST which could be more.
References adjm.
Referenced by showInput().
| static int Graphid::getCongregationId | ( | ) | [inline, static] |
each call will increment the underlying congid
References congid.
| void Graphid::init | ( | const vector< Alnchainid * > & | modfrag | ) | [private] |
| string Graphid::allInputESTIdsString | ( | const char | sep = ',' |
) | const [private] |
set each vertex to default state before assembly Ignoring red vertices that are headnodes already paricipated assembly. Nothing needs to be done if the first round. Set all attributes except the inassembly to default. return a string of ids
References input.
| vector< string > Graphid::allInputESTIds | ( | ) | const [private] |
References input.
| void Graphid::appendAllESTIds | ( | vector< string > & | idv | ) | const [private] |
take all the EST ids from this graph's input and append to the end of the vector idv. this is the efficient version of allInputESTIds().
References input.
Referenced by assignESTIds().
| void Graphid::assignESTIds | ( | const set< ESTAssemblyid *, lessByChainDirectionPtr > & | estmod | ) | const [private] |
helper function, the assembler use the input est information to assign to each model. If an EST covers two models, then this function use exonOverLength/ESTaln.exonLength > 0.5 to make a decesion as to which model to assign to.
References appendAllESTIds(), and input.
Referenced by assemble().
| ostream& operator<< | ( | ostream & | ous, | |
| const Graph & | gr | |||
| ) | [friend] |
Firt it shows input chains, then show matrix. This is only used for debug.
int Graphid::congid = 1 [static] |
congregation id
Referenced by assemble(), and getCongregationId().
int Graphid::genomic_lengthcut = 26 [static] |
Genomic length of the assembly, below which to discard default is 26, very low.
Referenced by assemble().
| vector<Alnchainid*> Graphid::input |
input alignments with alignment quality info
Referenced by allInputESTIds(), allInputESTIdsString(), appendAllESTIds(), assembleOneRound(), assignESTIds(), operator<<(), showInput(), and ~Graphid().
| vector<GraphNode> Graphid::vertices |
vertices of the graph
Referenced by allAssembled(), assembleOneRound(), init(), operator<<(), prepareAssembly(), and showMatrix().
| vector<vector<int> > Graphid::adjm |
adjancy matrix of the graph
Referenced by allAssembled(), assembleOneRound(), init(), numberOfVertices(), prepareAssembly(), and showMatrix().
| priority_queue<HeadNode> Graphid::NVQ |
Is a prioiryt queue for pcking the head node to do the assembly Node Valence Queue: NVQ
Referenced by assembleOneRound(), init(), and prepareAssembly().
1.5.6