astyping.cpp File Reference

#include <iostream>
#include <fstream>
#include "RNAModel.h"
#include <mysql++.h>
#include "dbinfo.h"
#include <algorithm>

Classes

class  ASCountKeeper

Functions

void statAStype (Connection &conn, const string &dbname, const string &resfile, bool use_raw=true)
int astypes (const Noschain &ch1, const Noschain &ch2, int tc[12], map< int, int > &ritype, ASCountKeeper &ack, map< int, int > &ril, map< int, int > &nril, set< pair< int, int > > &majorRI, set< pair< int, int > > &minorRI)
int skipExon (const Noschain &lch, const Noschain &sch, int &i, int &j, ASCountKeeper &ack)
int skipExonVariant (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
bool before (const Noschain &ch1, const Noschain &ch2, const int i, const int j)
int retainIntron (const Noschain &lch, const Noschain &sch, int &i, int &j, ASCountKeeper &ack, set< pair< int, int > > &retained)
bool adskip (const Noschain &ch1, const Noschain &ch2, int &i, int &j)
bool bothADAA (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
bool alternativeDonor (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
bool alternativeAcceptor (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
bool CEorAA (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
bool mutualExclusive (const Noschain &ch1, const Noschain &ch2, int &i, int &j, ASCountKeeper &ack)
void usage ()
int main (int argc, char *argv[])

Variables

const char * ASTYPE [12] = {"AD", "AA", "CE", "CE_AD", "CE_AA", "CE_ADAA", "IR", "ADAA", "CEorAAend", "ME", "Other", ""}

Function Documentation

bool adskip ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j 
)

this has bee replace with better function

this function has been replace with better version

References Range::begin(), Range::direction(), Range::end(), and Noschain::numberOfRanges().

Referenced by astypes().

bool alternativeAcceptor ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

bool alternativeDonor ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

int astypes ( const Noschain ch1,
const Noschain ch2,
int  tc[12],
map< int, int > &  ritype,
ASCountKeeper ack,
map< int, int > &  ril,
map< int, int > &  nril,
set< pair< int, int > > &  majorRI,
set< pair< int, int > > &  minorRI 
)

Parameters:
tc type of alternative splicing count, this function update this counter, each element represent a different type of AS. 0 AD, 1, AA, 2. CE, 3, CE_AD 4. CE_AA, 5. CE_ADAA, 6 IR 7. ADAA, 8 CEorAAend, 9 MutualExlusive, 10 other ASTYPE[10] ={ "AD", "AA", "CE", "CE_AD", "CE_AA", "CE_ADAA", "IR", "CEorAAend", "Other" };
ch1 is the representative model and usually is the star model with the hightest EST count. For certain AS types, we may want to distinguish this *model from other alternative models. This models can be considered as the constitutive. There is a directionality between ch1 and ch2
ch2 is usually the minor isoforms.
ril Retained Intron Length => Count
Returns:
the total number of AS found for this pair of models.

References adskip(), alternativeAcceptor(), alternativeDonor(), before(), bothADAA(), CEorAA(), Range::length(), length, mutualExclusive(), Noschain::numberOfRanges(), retainIntron(), skipExon(), and skipExonVariant().

Referenced by statAStype().

bool before ( const Noschain ch1,
const Noschain ch2,
const int  i,
const int  j 
)

bool bothADAA ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

will increment i and j if success

References ASCountKeeper::ADAA, Range::begin(), Range::direction(), Range::end(), Range::isPlus(), and Noschain::numberOfRanges().

Referenced by astypes().

bool CEorAA ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

int main ( int  argc,
char *  argv[] 
)

bool mutualExclusive ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

only check mutual exclusive of two exons, should check more

References ASCountKeeper::addME(), before(), Range::begin(), Range::end(), Noschain::numberOfRanges(), and Range::overlapFraction().

Referenced by astypes().

int retainIntron ( const Noschain lch,
const Noschain sch,
int &  i,
int &  j,
ASCountKeeper ack,
set< pair< int, int > > &  retained 
)

Returns:
the number of introns retained
Parameters:
lch is the chain that has introns retained.
sch is the one with introns spliced out. The two input chains must be in the same direction.
retained container for retained intron bounds. This container will be used as accumulator.

References Range::begin(), Range::direction(), Range::end(), ASCountKeeper::IR, and Noschain::numberOfRanges().

Referenced by astypes().

int skipExon ( const Noschain lch,
const Noschain sch,
int &  i,
int &  j,
ASCountKeeper ack 
)

this could measure skipping of multiple exons will also accumulate special kind of CE to Other, but will not return true.

Returns:
0 for no AS of any kind. 1 for CE 2 for special kind of CE, group to Other 3 for even more strange kind.

References ASCountKeeper::addCE(), ASCountKeeper::addOther(), Range::begin(), Range::direction(), Range::end(), and Noschain::numberOfRanges().

Referenced by astypes().

int skipExonVariant ( const Noschain ch1,
const Noschain ch2,
int &  i,
int &  j,
ASCountKeeper ack 
)

Returns:
1 for CE+AD, 2 for CE+AA, 3 for CE+AP(both AD and AA) 0 for Pure CE, -1 for no CE of any kind. 2516987->2517044 2517755->2518074 2518358->2518489 2518696->2522344 2516987->2517044 2517755->2518071 2518694->2522344

References ASCountKeeper::addCE(), before(), Range::begin(), Range::end(), Range::isPlus(), Noschain::numberOfRanges(), and Range::overlap().

Referenced by astypes().

void statAStype ( Connection &  conn,
const string &  dbname,
const string &  resfile,
bool  use_raw 
)

This is the main function. The input is taken from combest_good. I should have an option to take from combest_model/combest_gene.

References ASCountKeeper::accumulate(), ASTYPE, and astypes().

Referenced by main().

void usage (  ) 

given gmap summary format, this program converts it into combest archive format (*.car)

It can be used a pipe, or given specific file names.


Variable Documentation

const char* ASTYPE[12] = {"AD", "AA", "CE", "CE_AD", "CE_AA", "CE_ADAA", "IR", "ADAA", "CEorAAend", "ME", "Other", ""}

Description This program will count the different categories of AS (currently I have 10 different kinds) by comparing the rep model of each gene to minor models. The rep model is mainly selected by the max number of ESTs covering this model plus using some auxiliary information such as CDS length, strange UTR feature. This is done by gathergene program that contains the detailed algorithm.

In addition this program focused on RI types. It produces the coordinates of Major and Minor RI introns and write them into different files. To get non-RI introns you need to do a set operation All_Introns - (major + minor) = nonRI introns. This is not done in this program. intronstop program computes the coordiantes of all introns and tells you how many Ns are inside.

Referenced by statAStype().


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