#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", ""} |
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 | |||
| ) |
References ASCountKeeper::addAA(), Range::begin(), Range::end(), Range::isPlus(), Noschain::numberOfRanges(), and Range::overlap().
Referenced by astypes().
| bool alternativeDonor | ( | const Noschain & | ch1, | |
| const Noschain & | ch2, | |||
| int & | i, | |||
| int & | j, | |||
| ASCountKeeper & | ack | |||
| ) |
References ASCountKeeper::addAD(), Range::begin(), Range::end(), Range::isPlus(), Noschain::numberOfRanges(), and Range::overlap().
Referenced by astypes().
| 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 | |||
| ) |
| 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 |
References adskip(), alternativeAcceptor(), alternativeDonor(), before(), bothADAA(), CEorAA(), Range::length(), length, mutualExclusive(), Noschain::numberOfRanges(), retainIntron(), skipExon(), and skipExonVariant().
Referenced by statAStype().
References Range::begin(), and Range::direction().
Referenced by astypes(), mutualExclusive(), and skipExonVariant().
| 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 | |||
| ) |
References Range::begin(), ASCountKeeper::CEorAAend, Range::end(), Range::isPlus(), and Noschain::numberOfRanges().
Referenced by astypes().
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
References MysqlDBInfo::getAuthenInfo(), MysqlDBInfo::getPassword(), MysqlDBInfo::getUser(), statAStype(), and usage.
| 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 | |||
| ) |
| 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.
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 | |||
| ) |
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.
| 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().
1.5.6