#include <Esambl.h>
Public Member Functions | |
| Graph () | |
| Graph (int N) | |
| Graph (const vector< Alnchain * > &modfrag) | |
| Graph (const vector< Alnchain * > &modfrag, const vector< int > &modfrag_count) | |
| Graph (const vector< pair< Alnchain *, int > > &modfrag) | |
| ~Graph () | |
| int | numberOfVertices () const |
| void | prepareAssembly () |
| int | assembleOneRound (Noschain &res, int &count, ostream &ous) |
| int | assembleOneRound (Noschain &res, int &count, Coverdepth *&covd) throw (Invariant) |
| void | assemble (const string &gid, const string &gseq, set< ESTAssembly *, lessByChainDirectionPtr > &allest) |
| bool | allAssembled () const |
| void | showMatrix (ostream &ous) const |
| void | showInput (ostream &ous) const |
Static Public Member Functions | |
| static int | getCongregationId () |
Public Attributes | |
| vector< Alnchain * > | input |
| vector< int > | input_count |
| vector< GraphNode > | vertices |
| vector< vector< int > > | adjm |
| priority_queue< HeadNode > | NVQ |
Static Public Attributes | |
| static int | congid = 1 |
Private Member Functions | |
| void | init (const vector< Alnchain * > &modfrag) |
Friends | |
| ostream & | operator<< (ostream &ous, const Graph &gr) |
| Graph::Graph | ( | ) | [inline] |
| Graph::Graph | ( | int | N | ) | [inline] |
| Graph::Graph | ( | const vector< Alnchain * > & | modfrag | ) |
| Graph::Graph | ( | const vector< Alnchain * > & | modfrag, | |
| const vector< int > & | modfrag_count | |||
| ) | [inline] |
| Graph::Graph | ( | const vector< pair< Alnchain *, int > > & | modfrag | ) |
| Graph::~Graph | ( | ) |
this object will release the memory trsnsfered from the input
References input.
| int Graph::numberOfVertices | ( | ) | const [inline] |
| void Graph::prepareAssembly | ( | ) |
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.
References adjm, NVQ, and vertices.
Referenced by assembleOneRound().
| int Graph::assembleOneRound | ( | Noschain & | res, | |
| int & | count, | |||
| ostream & | ous | |||
| ) |
do one round of assemble, store result into res.
| ous | is used for debug output. After debugging stage, this should be removed. |
References adjm, allAssembled(), Noschain::append(), black, GraphNode::c, Noschain::compareChainAndFix(), Range::direction(), GraphNode::idx, input, input_count, Noschain::numberOfRanges(), NVQ, prepareAssembly(), Noschain::reverse(), Noschain::show(), vertices, and white.
Referenced by assemble().
| int Graph::assembleOneRound | ( | Noschain & | res, | |
| int & | count, | |||
| Coverdepth *& | covd | |||
| ) | throw (Invariant) |
production version no debug output, I will add base coverage
| res | is the output result, one single Noschain to represent one assembly. | |
| count. | is the total number of ESTS in this assembly. |
References adjm, allAssembled(), black, GraphNode::c, Noschain::exons, GraphNode::idx, input, input_count, NVQ, prepareAssembly(), Noschain::reverse(), vertices, and white.
| void Graph::assemble | ( | const string & | gid, | |
| const string & | gseq, | |||
| set< ESTAssembly *, lessByChainDirectionPtr > & | allest | |||
| ) |
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.
References assembleOneRound(), breakExtraModel(), congid, del(), and Range::length().
Referenced by testFromFile().
| bool Graph::allAssembled | ( | ) | const |
this method check for all nodes to see all of them are included in assemblies or not. Right now this one is not used. The termination condition is determined by the lack of headnode
References adjm, and vertices.
Referenced by assembleOneRound().
| void Graph::showMatrix | ( | ostream & | ous | ) | const |
| void Graph::showInput | ( | ostream & | ous | ) | const |
References input, and numberOfVertices().
| static int Graph::getCongregationId | ( | ) | [inline, static] |
| void Graph::init | ( | const vector< Alnchain * > & | modfrag | ) | [private] |
| ostream& operator<< | ( | ostream & | ous, | |
| const Graph & | gr | |||
| ) | [friend] |
int Graph::congid = 1 [static] |
Referenced by assemble(), and getCongregationId().
| vector<Alnchain*> Graph::input |
input alignments with alignment quality info
Referenced by assembleOneRound(), Graph(), operator<<(), showInput(), and ~Graph().
| vector<int> Graph::input_count |
number of the alignment
Referenced by assembleOneRound(), and Graph().
| vector<GraphNode> Graph::vertices |
vertices of the graph
Referenced by allAssembled(), assembleOneRound(), Graph(), init(), operator<<(), prepareAssembly(), and showMatrix().
| vector<vector<int> > Graph::adjm |
adjancy matrix of the graph
Referenced by allAssembled(), assembleOneRound(), Graph(), init(), numberOfVertices(), prepareAssembly(), and showMatrix().
| priority_queue<HeadNode> Graph::NVQ |
Is a prioiryt queue for pcking the head node to do the assembly Node Valence Queue: NVQ
Referenced by assembleOneRound(), Graph(), init(), and prepareAssembly().
1.5.6