Graphid Class Reference

#include <Esambl.h>

List of all members.

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

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)


Detailed Description

I should just use copy paste and rewrite the Graph in a new format, this one should be used in the future There is no inheritance relationship between this one and Graph. So I have to use copy and paste.

Constructor & Destructor Documentation

Graphid::Graphid ( const vector< Alnchainid * > &  modfrag  )  [inline]

version with each EST id stored, even more slower

Parameters:
modfrag is the input for this object. The pointers in the vector should have been allolcated on the free store. This object will release the memory. We use this mechanism to increase performance.

References init().

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.


Member Function Documentation

bool Graphid::allAssembled (  )  const

References adjm, and vertices.

Referenced by assembleOneRound().

void Graphid::prepareAssembly (  ) 

References adjm, NVQ, and vertices.

Referenced by assembleOneRound().

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.

Parameters:
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.
This method will increment congid. Will assign EST ids to the ESTAssemblyid objects in allest

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

Parameters:
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.
Returns:
number of vertices in the assembly. This is different from the number of EST that could be more if there are identical alignment from different input EST. Zero value indicates the finish of the traversal.

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

References adjm, string(), and vertices.

Referenced by operator<<().

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]

should only be used by constructor. There should be a way of avoiding this copy pasting.

References adjm, NVQ, and vertices.

Referenced by Graphid().

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]

Returns:
vector of all EST ids in this graph structure It collects all est ids from the input vector Rreturning a large object, not good for performance. Need to redesign for performance.

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


Friends And Related Function Documentation

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

Firt it shows input chains, then show matrix. This is only used for debug.


Member Data Documentation

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

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


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