Graph Class Reference

#include <Esambl.h>

List of all members.

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< GraphNodevertices
vector< vector< int > > adjm
priority_queue< HeadNodeNVQ

Static Public Attributes

static int congid = 1

Private Member Functions

void init (const vector< Alnchain * > &modfrag)

Friends

ostream & operator<< (ostream &ous, const Graph &gr)


Constructor & Destructor Documentation

Graph::Graph (  )  [inline]

Graph::Graph ( int  N  )  [inline]

Graph::Graph ( const vector< Alnchain * > &  modfrag  ) 

this is the major input for constructing the assembly graph data structure. This is the initializing routine.

References adjm, NVQ, and vertices.

Graph::Graph ( const vector< Alnchain * > &  modfrag,
const vector< int > &  modfrag_count 
) [inline]

the two input vectors: modfrag, and modfrag_count are related to each ohter. Right now I am using this version for production. The NVQ will be poplated with all the input nodes.

References init().

Graph::Graph ( const vector< pair< Alnchain *, int > > &  modfrag  ) 

version with EST count More information but slower. The count for each Noschain is passed in.

References adjm, input, input_count, NVQ, and vertices.

Graph::~Graph (  ) 

this object will release the memory trsnsfered from the input

References input.


Member Function Documentation

int Graph::numberOfVertices (  )  const [inline]

References adjm.

Referenced by showInput().

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.

Returns:
the number of vertices assembled 0 to indicate no more assembly to do.
Parameters:
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

Parameters:
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

References adjm, string(), and vertices.

Referenced by operator<<().

void Graph::showInput ( ostream &  ous  )  const

References input, and numberOfVertices().

static int Graph::getCongregationId (  )  [inline, static]

each call will increment the underlying congid

References congid.

Referenced by assembleChain().

void Graph::init ( const vector< Alnchain * > &  modfrag  )  [private]

should only be used by constructor

References adjm, NVQ, and vertices.

Referenced by Graph().


Friends And Related Function Documentation

ostream& operator<< ( ostream &  ous,
const Graph gr 
) [friend]


Member Data Documentation

int Graph::congid = 1 [static]

Referenced by assemble(), and getCongregationId().

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<vector<int> > Graph::adjm

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


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

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