#include <iostream>#include <fstream>#include <mysql++.h>#include <dbinfo.h>#include "SimpleRNAModel.h"#include <hatrees.h>Functions | |
| int | groupModel (set< mRNAModelCaiwe *, lessByChainDirectionPtr > &model, ostream &ous, ostream &gous, ostream &oslog, int &chimeraCount) |
| int | clustergene (list< mRNAModelCaiwe * > &mod, ostream &ous, ostream &gous, ostream &oslog) |
| void | releaseMemory (list< mRNAModelCaiwe * > &mod) |
| void | updateInputTable (Connection &conn, const string &m2gtab, const string &modtab, const string &caiwetrack) |
| void | createGeneTable (const string &tabname, const string &modtab, const string &shortgtab, Connection &conn) |
| void | file2table (Connection &conn, const string &file, const string &table) |
| void | createTables (Connection &conn, const string &m2gtab, const string >ab) |
| string | getlinktab (Connection &conn) |
| void | usage () |
| int | main (int argc, char *argv[]) |
| bool | isChimera (const mRNAModelCaiwe *m1, const mRNAModelCaiwe *m2, int olp) |
| void | writeModGeneRow (ostream &ous, ostream &gous, const mRNAModelCaiwe *mod) |
| int clustergene | ( | list< mRNAModelCaiwe * > & | mod, | |
| ostream & | ous, | |||
| ostream & | gous, | |||
| ostream & | oslog | |||
| ) |
| mod | input models | |
| ous | result of model cluster. Two columns: modelid, repmodelid (also serve as geneid). This way we saved one column. The gene table, gene id is the same as the representative model id. | |
| gous | put gene info: gid, numod, begin, end, maxintron gid is the same as repmodel id. |
poiter version
References Range::begin(), mRNAModelLight::CDSLength(), hatrees< T >::clusterArray(), Range::combine(), del(), mRNAModelCaiwe::getGenomicId(), mRNAModelLight::getId(), hatrees< T >::getNodeCount(), isChimera(), hatrees< T >::keyset(), Noschain::maxIntronLength(), Noschain::outerRange(), Range::output(), and writeModGeneRow().
Referenced by groupModel().
| void createGeneTable | ( | const string & | tabname, | |
| const string & | modtab, | |||
| const string & | shortgtab, | |||
| Connection & | conn | |||
| ) |
Create a full-featured gene table from the model table Thi is just the simple stats summarized into one talbe. It is for convinience, but violates the database design principle. tabname gene table to be made
| modtab | caiwe_model short gene table or minimal gene table. |
Referenced by combestInput().
| void createTables | ( | Connection & | conn, | |
| const string & | m2gtab, | |||
| const string & | gtab | |||
| ) |
create two tables: 1. model to gene (modid -> geneid) 2. gene table
Referenced by main().
| void file2table | ( | Connection & | conn, | |
| const string & | file, | |||
| const string & | table | |||
| ) |
Referenced by loadPrimaryTables(), and main().
| string getlinktab | ( | Connection & | conn | ) |
this is also defined in gathercaiwegene, in the future this function should be put into a mysql helper header Now using copy and pasting.
References string().
Referenced by constructJGIModel(), and updateInputTable().
| int groupModel | ( | set< mRNAModelCaiwe *, lessByChainDirectionPtr > & | model, | |
| ostream & | ous, | |||
| ostream & | gous, | |||
| ostream & | oslog, | |||
| int & | chimeraCount | |||
| ) |
it will write result to ous model from one chromosome or genomic DNA gene table
References clustergene(), Range::length(), Range::merge(), min, Range::overlap(), and releaseMemory().
Referenced by combestInput(), jgiInput(), and main().
| bool isChimera | ( | const mRNAModelCaiwe * | m1, | |
| const mRNAModelCaiwe * | m2, | |||
| int | olp | |||
| ) |
the first one is more likely to be chimea
References Range::contain(), Noschain::intronLength(), Range::length(), mRNAModelCaiwe::lessESTFactor(), Noschain::maxIntronLength(), and Noschain::numberOfRanges().
Referenced by clustergene().
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
| void releaseMemory | ( | list< mRNAModelCaiwe * > & | mod | ) |
| void updateInputTable | ( | Connection & | conn, | |
| const string & | m2gtab, | |||
| const string & | modtab, | |||
| const string & | caiwetrack | |||
| ) |
update input table with gene table stored in files Firt load the gene table file into gene table; this gene table has only two columns modelid => geneid. We call it minimal table. This table is not very useful, so we are going to make a full-featured gene table later. Then use the table in database to update the geneid columns of the model table. This method will remove chimera models based on modelid given in file
| m2gtab | minimal gene table | |
| modtab | model table, default caiwe_model | |
| caiwetrack | JGI track table name |
References getlinktab().
Referenced by combestInput(), and 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.
this is a helper program to count distinct estids in the ESTId column of the combest result. So it is the actual number of ESTs mapped. This could be lower for deeply covered genome because of the coverage depth-dependent filtering.
given gmap summary format, this program converts it into combest archive format (*.car)
It can be used a pipe, or given specific file names.
this is a helper program to count distinct estids in the ESTId column of the combest result. So it is the actual number of ESTs mapped. This could be lower for deeply covered genome because of the coverage depth-dependent filtering.
| void writeModGeneRow | ( | ostream & | ous, | |
| ostream & | gous, | |||
| const mRNAModelCaiwe * | mod | |||
| ) |
helper function geneid, genomicid, begin, end, numod, maxintronlen This is one row in the gene table
| mod | is the input model object |
References mRNAModelCaiwe::getGenomicId(), mRNAModelLight::getId(), Noschain::maxIntronLength(), Noschain::outerRange(), and Range::output().
Referenced by clustergene().
1.5.6