#include <gbseq.h>

Public Member Functions | |
| gbseq () | |
| virtual | ~gbseq () |
| virtual bool | read (istream &ins) |
| virtual void | writeAce (ostream &ous, ostream &sub, ostream &snp)=0 |
| void | writeSpecies (ostream &ous) |
| int | getLength () const |
| int | getSeqlen () const |
| string | getDate () const |
| void | clear () |
| string | getKey () const |
| string | getLocusName () const |
| string | getSegmentLocus () const |
| string | getType () const |
| string | getMolType () const |
| string | getOrgAcronym () const |
| string | getOrganism () const |
| bool | hasFeature (const string &f, int b, int e) const |
| bool | isSegment () const |
Static Public Member Functions | |
| static void | init () |
| static void | loadOrgmap (const string &file) |
| static void | dumpOrgmap (const string &file) |
Static Public Attributes | |
| static const int | VAL_START = 12 |
Protected Attributes | |
| string | locus |
| int | seqLength |
| string | definition |
| vector< string > | accession |
| string | version [2] |
| string | dbsource |
| string | keywords |
| int | seg |
| int | segtotal |
| string | source |
| string | organism |
| string | taxonomy |
| vector< Ref * > | references |
| string | comment |
| vector< feature > | features |
| string | sequence |
| string | line |
| string | orgacronym |
Static Protected Attributes | |
| static map< string, string > | orgmap = map<string,string>() |
| static set< string > | orgacronyms = set<string>() |
| static set< string > | taxons = set<string>() |
| virtual gbseq::~gbseq | ( | ) | [inline, virtual] |
References references.
| bool gbseq::read | ( | istream & | ins | ) | [virtual] |
Reimplemented in gbprtseq, and gbdnaseq.
References feature::clear(), clear(), comment, gberr::context(), dbsource, definition, dissect(), features, getf(), getLocusName(), keywords, line, locus, Refreader::newRef(), feature::next(), Refreader::next(), organism, gberr::print(), gberr::prtContext(), references, seg, segtotal, source, split(), taxonomy, tr(), and VAL_START.
Referenced by processOneFile(), gbdnaseq::read(), and gbprtseq::read().
| virtual void gbseq::writeAce | ( | ostream & | ous, | |
| ostream & | sub, | |||
| ostream & | snp | |||
| ) | [pure virtual] |
| void gbseq::writeSpecies | ( | ostream & | ous | ) |
A smart method that will only write the actual information about a species when it is not in the orgmap
References features, getKey(), organism, split(), taxonomy, and taxons.
Referenced by gbdnaseq::writeAce(), and gbprtseq::writeAce().
| int gbseq::getLength | ( | ) | const |
get length information from the locus line The Sequence may have a different length if the original source GB file is currpted
References locus, and seqLength.
Referenced by gbdnaseq::read(), gbprtseq::read(), gbdnaseq::writeAce(), gbprtseq::writeAce(), feature::writeAceProtein(), feature::writemRNA(), and feature::writeRNA().
| int gbseq::getSeqlen | ( | ) | const [inline] |
return the actual sequence length This number is the same as getLength() because I have check the identity of these two numbers druing the reading stage.
References sequence.
| string gbseq::getDate | ( | ) | const [inline] |
| void gbseq::clear | ( | ) |
| string gbseq::getKey | ( | ) | const [inline] |
Referenced by feature::outSegMultiple(), processOneFile(), feature::subCDS(), gbdnaseq::writeAce(), feature::writeAceProtein(), feature::writeCDS(), feature::writeFeatureOfWholeSeq(), feature::writeGene(), feature::writeImmuno(), feature::writemRNA(), feature::writeProtein(), feature::writeRNA(), feature::writeSegCDS(), feature::writeSegmRNA(), feature::writeSNP(), and writeSpecies().
| string gbseq::getLocusName | ( | ) | const [inline] |
References firstword(), and locus.
Referenced by getSegmentLocus(), read(), gbdnaseq::writeAce(), feature::writeCDS(), and feature::writeGene().
| string gbseq::getSegmentLocus | ( | ) | const |
| string gbseq::getType | ( | ) | const [inline] |
return the type of the molecule DNA, RNA This info comes from the LOCUS line
Referenced by gbdnaseq::writeAce(), feature::writeGene(), feature::writemRNA(), and feature::writeRNA().
| string gbseq::getMolType | ( | ) | const |
Info comes from the first source annotation that covers the whole sequence. Some sequences describe integration site and will not have the first source feature describing the whole sequence.
will get the mol_type from the first source sequence
References features.
Referenced by gbdnaseq::writeAce(), feature::writeCDS(), and feature::writeGene().
| string gbseq::getOrgAcronym | ( | ) | const |
First look into the cached member: orgacronym Then look into the orgmap if all fails, make a acronym, starting with 2 letters if the acronym is not unique then make with more letters
this methods should rely on externally defined acronyms
found in map
References length, orgacronym, orgacronyms, organism, orgmap, and split().
Referenced by feature::outgeneline(), feature::subCDS(), feature::writeAceProtein(), feature::writeGene(), and feature::writeProtein().
| string gbseq::getOrganism | ( | ) | const [inline] |
| bool gbseq::hasFeature | ( | const string & | f, | |
| int | b, | |||
| int | e | |||
| ) | const |
| bool gbseq::isSegment | ( | ) | const [inline] |
| void gbseq::init | ( | ) | [static] |
initialize a few commonly used organism maps
References orgacronyms, and orgmap.
Referenced by main().
| void gbseq::loadOrgmap | ( | const string & | file | ) | [static] |
loads orgmap and orgacronyms
References ifstream(), line, orgacronyms, orgmap, and split().
Referenced by main().
| void gbseq::dumpOrgmap | ( | const string & | file | ) | [static] |
const int gbseq::VAL_START = 12 [static] |
Referenced by Refreader::next(), Reference::read(), and read().
string gbseq::locus [protected] |
Referenced by getDate(), getLength(), getLocusName(), gbdnaseq::getStrand(), getType(), and read().
int gbseq::seqLength [mutable, protected] |
Referenced by clear(), and getLength().
string gbseq::definition [protected] |
Referenced by read(), gbdnaseq::writeAce(), and gbprtseq::writeAce().
vector<string> gbseq::accession [protected] |
string gbseq::version[2] [protected] |
string gbseq::dbsource [protected] |
string gbseq::keywords [protected] |
Referenced by read(), gbdnaseq::writeAce(), and gbprtseq::writeAce().
int gbseq::seg [protected] |
Referenced by clear(), isSegment(), and read().
int gbseq::segtotal [protected] |
string gbseq::source [protected] |
Referenced by read(), and gbdnaseq::writeAce().
string gbseq::organism [protected] |
Referenced by getOrgAcronym(), getOrganism(), read(), gbdnaseq::writeAce(), gbprtseq::writeAce(), and writeSpecies().
string gbseq::taxonomy [protected] |
Referenced by read(), and writeSpecies().
vector<Ref*> gbseq::references [protected] |
Referenced by clear(), read(), gbdnaseq::writeAce(), gbprtseq::writeAce(), and ~gbseq().
string gbseq::comment [protected] |
Referenced by clear(), read(), gbdnaseq::writeAce(), and gbprtseq::writeAce().
vector<feature> gbseq::features [protected] |
Referenced by clear(), getMolType(), hasFeature(), read(), gbdnaseq::writeAce(), gbprtseq::writeAce(), and writeSpecies().
string gbseq::sequence [protected] |
Referenced by clear(), gbseq(), getSeqlen(), gbdnaseq::read(), gbprtseq::read(), gbdnaseq::writeAce(), and gbprtseq::writeAce().
string gbseq::line [protected] |
Referenced by gbseq(), loadOrgmap(), gbdnaseq::read(), gbprtseq::read(), and read().
string gbseq::orgacronym [mutable, protected] |
Referenced by clear(), and getOrgAcronym().
map< string, string > gbseq::orgmap = map<string,string>() [static, protected] |
organism info is an external resource, and the keys made should be unique in the scope. For example, all vertebrates the acronym should be unique among all of them so that when we name genes we can distinguish the same gene from different species. This table should be read and dumpped before each parsing except for one organism genome annotationns.
Referenced by dumpOrgmap(), getOrgAcronym(), init(), and loadOrgmap().
set< string > gbseq::orgacronyms = set<string>() [static, protected] |
Referenced by getOrgAcronym(), init(), and loadOrgmap().
set< string > gbseq::taxons = set<string>() [static, protected] |
Referenced by writeSpecies().
1.5.6