#include "Range.h"#include "Match.h"#include <iostream>#include <map>#include <fstream>#include "bioseq.h"#include "dbinfo.h"Classes | |
| struct | ProgParameters |
Functions | |
| void | bufferProteinsFromFile (const string &infile, map< string, Protein > &store) |
| void | bufferGenomicFromFile (const string &file, map< string, DNA > &store) |
| void | storeBestModels (Tblastn &tbn, ostream &SUM, ostream &DET, const ProgParameters &par) |
| void | usage (const ProgParameters ¶m) |
| bool | processAll (const map< string, Protein > &pepstore, const map< string, DNA > &genomicstore, const ProgParameters &par) |
| int | main (int argc, char *argv[]) |
| void bufferGenomicFromFile | ( | const string & | file, | |
| map< string, DNA > & | store | |||
| ) |
Store all genomic from one genome int a map
References bioseq::empty(), bioseq::getName(), ifstream(), and bioseq::read().
Referenced by main().
| void bufferProteinsFromFile | ( | const string & | infile, | |
| map< string, Protein > & | store | |||
| ) |
store protein into a map<string,string> so the program can randomly access the sequence by the proteinid
References bioseq::empty(), bioseq::getName(), ifstream(), and bioseq::read().
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
References bufferGenomicFromFile(), bufferProteinsFromFile(), ProgParameters::detailfile, ProgParameters::enough(), ProgParameters::genomicfile, ProgParameters::identitycut, processAll(), ProgParameters::prtinfile, ProgParameters::qcovcut, Tblastn::readConfig(), ProgParameters::scorecut, ProgParameters::summaryfile, ProgParameters::tbnfile, and usage.
| bool processAll | ( | const map< string, Protein > & | pepstore, | |
| const map< string, DNA > & | genomicstore, | |||
| const ProgParameters & | par | |||
| ) |
process a subset from the whole table. In this particular case, I am picking a Reverse transcriptase scanning against different databases. I used RT from SwissProt and searched against a dozen fungal gnomic databases using tblastn. Because this program only deals with the whole table. I have the choice to write a wrapper to use a dozen tables or use a sql to select a portion of the tables.
map of pid => protein sequence map of gid => genomic DNA sequence
References ProgParameters::detailfile, E, gap(), ifstream(), ProgParameters::showevery, storeBestModels(), ProgParameters::summaryfile, and ProgParameters::tbnfile.
Referenced by main().
| void storeBestModels | ( | Tblastn & | tbn, | |
| ostream & | SUM, | |||
| ostream & | DET, | |||
| const ProgParameters & | par | |||
| ) |
helper function used by processOneBatch and Main
make it work into different streams
The par mainly provide the cutoff information.
Only best chains with maxScore() > par.scorecut will be outputed.
Store information into output streams SUM and DET
make it work into different streams
The par mainly provide the cutoff information. Store information into output streams SUM and DET
References Linkmatch::bestModel(), ProgParameters::identitycut, Tblastn::numMatches(), Tblastn::outputModel(), ProgParameters::qcovcut, ProgParameters::qcovlencut, Tblastn::queryLength(), and ProgParameters::scorecut.
| void usage | ( | const ProgParameters & | param | ) |
this describe how to use this program After calling this function the program will terminate.
1.5.6