#include <RNAModel.h>

Public Member Functions | |
| RNAModel () | |
| RNAModel (const Noschain &seg, const string &chrom, const string &gs) | |
| RNAModel (const string &exstr, const string &gname, const string &gs, int oi) | |
| RNAModel (const string &exstr, const string &gname, const string &gs, int oi, int gene_id) | |
| RNAModel (const string &exstarts, const string &exends, char strand, const string &gi, const string &genomic) throw (Badinput, exception) | |
| RNAModel (const string &exstarts, const string &exends, char strand, const string &gi, const string &genomic, int oo) throw (Badinput) | |
| RNAModel (const RNAModel &rm) | |
| RNAModel & | operator= (const RNAModel &rm) |
| void | assignNewId () |
| int | getOid () const |
| void | setOid (int oi) |
| void | setNextOid () |
| void | assignNewGeneId () |
| void | modelidAsGeneid () |
| void | assignCurrentGeneId () |
| int | getGeneId () const |
| int | geneId () const |
| void | setGeneId (const int gene_id) |
| void | setGenomic (const string &gs) |
| void | setGenomicPointer (const string *gs) |
| void | trimAfterPoint (const int p) throw (PointOutChain) |
| void | trimBeforePoint (const int p) throw (PointOutChain) |
| const string & | RNASequence () const |
| int | genomicIndex (int mrnaidx) const throw (OutsideGenomicSequence) |
| int | RNAIndex (int gidx) const throw (PointOutChain) |
| bool | sameExons (const RNAModel &gm) const |
| const string * | getGenomicPointer () const |
| int | exonLength () const |
| virtual bool | valid () const |
| bool | sameRNA (const RNAModel &rmd) const |
| const string & | genomicId () const |
| int | RNALength () const |
| const string & | RNAString () const |
| void | resetRNA () throw (Badinput) |
| void | setRNA (const string &rseq) |
| virtual void | reset () |
| void | setGenomicId (const string &gg) |
| bool | append (Noschain &mod) |
| RNAModel & | reverse () |
| string | seqGenomic () const |
| int | genomicLength () const |
| virtual modeltype | objtype () const |
| ostream & | writeExon (ostream &ous, char sep='\t') const |
| ostream & | print (ostream &ous) const |
| void | intronBound (map< string, int > &spsite) const |
Static Public Member Functions | |
| static int | currentId () |
| static int | nextId () |
| static void | advanceId () |
| static void | rollbackId () |
| static void | setId (int oi) |
| static int | nextGeneId () |
| static int | currentGeneId () |
| static void | advanceGeneId () |
Static Public Attributes | |
| static const char | exonheader [] = "exonid\tmodelid\texstart\texfinish" |
Protected Attributes | |
| string | gid |
| const string * | gseq |
| string | rna |
| int | oid |
| int | genid |
Static Protected Attributes | |
| static int | serialid = 1 |
| static member initialization | |
| static int | exonid = 1 |
| static int | geneid = 1 |
This class should be used to derive ESTModel. I all common operations between JGI model and ESTModel should be implemented in this class.
All classes in this family have actual Genomic sequence and they produce RNA and protein sequence. This diff from objects where the main feature is simply Ranges with the ability to splice externally supplied genomic sequences.
Constructors don't assign geneid, it left as an operation by external programs. In this case combest assigns geneid of ESTAssemblyid class.
| RNAModel::RNAModel | ( | ) | [inline] |
| RNAModel::RNAModel | ( | const Noschain & | seg, | |
| const string & | chrom, | |||
| const string & | gs | |||
| ) | [inline, explicit] |
constructor from Bases class object. Assign gene id to zero. Geneid is usually assigned by external operations such as gathercaiwegene program. Or the ESTAssembly assigns primitive geneids.
References gseq, nextId(), oid, rna, and Noschain::subsequence().
| RNAModel::RNAModel | ( | const string & | exstr, | |
| const string & | gname, | |||
| const string & | gs, | |||
| int | oi | |||
| ) | [inline] |
reading from stored objects from text files, object id is provided.
| gname | genomic sequence id. | |
| gs | genomic sequence string. object identifier, mostly used for database interaction. |
References gseq, rna, and Noschain::subsequence().
| RNAModel::RNAModel | ( | const string & | exstr, | |
| const string & | gname, | |||
| const string & | gs, | |||
| int | oi, | |||
| int | gene_id | |||
| ) | [inline] |
for reading object from text file with geneid
References gseq, rna, and Noschain::subsequence().
| RNAModel::RNAModel | ( | const string & | exstarts, | |
| const string & | exends, | |||
| char | strand, | |||
| const string & | gi, | |||
| const string & | genomic | |||
| ) | throw (Badinput, exception) [inline] |
constructor from JGI model table. The oid is assigned from the serialid counter. Another version will take from existing id. The base class throws Badinput exceptions.
References Noschain::exons, gseq, Noschain::isNull(), rna, and Noschain::subsequence().
| RNAModel::RNAModel | ( | const string & | exstarts, | |
| const string & | exends, | |||
| char | strand, | |||
| const string & | gi, | |||
| const string & | genomic, | |||
| int | oo | |||
| ) | throw (Badinput) [inline] |
JGI input with know oid or primary key
| oo. | The unique identifier for this object. It is usually the primary key. |
References Noschain::exons, gseq, Noschain::isNull(), rna, and Noschain::subsequence().
| RNAModel::RNAModel | ( | const RNAModel & | rm | ) | [inline] |
consturctor of the same type. Oid is updated. The assignment of old is thread-safe if modify nextId() method. Now using simple serialid++. This is not thread safe.
do we copy oid?. copy oid. Up to the user to call assign new id to make up new id. use assignNewId() to do this.
References genid, gid, gseq, oid, Noschain::operator=(), and rna.
Referenced by mRNAModel::operator=().
| void RNAModel::assignNewId | ( | ) | [inline] |
| int RNAModel::getOid | ( | ) | const [inline] |
return the objectid
References oid.
Referenced by assembleChain(), ESTAssembly::breakPrefixModel(), ESTAssembly::breakSuffixModel(), ESTAssembly::budMinusPrefixModel(), ESTAssembly::budMinusSuffixModel(), ESTAssembly::budPlusPrefixModel(), ESTAssembly::budPlusSuffixModel(), checkstop(), ESTAssembly::ESTAssembly(), JGIModel::getId(), intronBound(), mRNAModel::JGIModelRow(), mRNAModel::JGIProteinRow(), mRNAModel::JGITranscriptRow(), mRNAModelUpdate::name(), mRNAModel::name(), mRNAModel::printJGIModelRow(), mRNAModel::printJGITranscriptRow(), readESTModel(), ESTAssembly::setName(), mRNAModel::show(), ESTAssembly::write(), ESTAssembly::writeCommentTab(), writeExon(), ESTAssembly::writeModel(), mRNAModelUpdate::writeModelTable(), and mRNAModel::writeModelTable().
| void RNAModel::setOid | ( | int | oi | ) | [inline] |
References oid.
| void RNAModel::setNextOid | ( | ) | [inline] |
| void RNAModel::assignNewGeneId | ( | ) | [inline] |
assign the current geneid to genid member, then increment geneid. use this one to control gene id. This is one way of assigning gene id. Another way to do it is to use the modelid. For single isoform genes, the modelid is the geneid. For genes with alternative splicing, the most highly expressed isoform's modelid will be used as the geneid. The programmer has the freedom to use whichever system that is the best.
References genid, and nextGeneId().
| void RNAModel::modelidAsGeneid | ( | ) | [inline] |
| void RNAModel::assignCurrentGeneId | ( | ) | [inline] |
assign the geneid to current genid, without increment
References currentGeneId(), and genid.
| int RNAModel::getGeneId | ( | ) | const [inline] |
| int RNAModel::geneId | ( | ) | const [inline] |
References genid.
Referenced by mRNAModel::append(), updateOnePredicted(), updateOneUpdated(), mRNAModelUpdate::writeModelTable(), and mRNAModel::writeModelTable().
| void RNAModel::setGeneId | ( | const int | gene_id | ) | [inline] |
| void RNAModel::setGenomic | ( | const string & | gs | ) | [inline] |
| void RNAModel::setGenomicPointer | ( | const string * | gs | ) | [inline] |
References gseq.
| void RNAModel::trimAfterPoint | ( | const int | p | ) | throw (PointOutChain) |
overload Noschain method, to do RNA trimming in addition to the genomic chain trimming.
Reimplemented from Noschain.
Reimplemented in mRNAModel.
References rna, RNAIndex(), and Noschain::trimAfterPoint().
Referenced by mRNAModel::trimAfterPoint().
| void RNAModel::trimBeforePoint | ( | const int | p | ) | throw (PointOutChain) |
overload Noschain method so it will also trim RNA
Reimplemented from Noschain.
Reimplemented in mRNAModel.
References rna, RNAIndex(), and Noschain::trimBeforePoint().
| const string& RNAModel::RNASequence | ( | ) | const [inline] |
write the object in several output streams
References rna.
Referenced by mRNAModel::JGITranscriptRow(), mRNAModel::printJGITranscriptRow(), mRNAModel::printJGITranscriptRowNoId(), and ESTAssembly::write().
| int RNAModel::genomicIndex | ( | int | mrnaidx | ) | const throw (OutsideGenomicSequence) |
given a index in spliced mRNA, translated into index in genomic position, this should avoid introns. use 1-based index
References Noschain::exonLength(), itos(), and Noschain::show().
Referenced by ESTAssembly::breakPrefixModel(), ESTAssembly::breakSuffixModel(), ESTAssemblyid::breakup(), mRNAModel::growCDS3Prime(), mRNAModel::reset(), ESTAssembly::setCDSInfo(), mRNAModel::setLongestCDSAndProtein(), mRNAModel::setRNACDS(), mRNAModel::trimCDSStop(), and mRNAModel::trimCDSTail().
| int RNAModel::RNAIndex | ( | int | gidx | ) | const throw (PointOutChain) |
References itos().
Referenced by ESTAssembly::breakPrefixModel(), ESTAssembly::budMinusSuffixModel(), ESTAssembly::budPlusSuffixModel(), mRNAModel::mRNAModel(), ESTAssembly::prune3PrimeUTR(), ESTAssembly::prune5PrimeUTR(), mRNAModel::setGenomicCDS(), mRNAModel::trimAfterPoint(), trimAfterPoint(), mRNAModel::trimBeforePoint(), and trimBeforePoint().
| bool RNAModel::sameExons | ( | const RNAModel & | gm | ) | const [inline] |
References Noschain::operator==().
| const string* RNAModel::getGenomicPointer | ( | ) | const [inline] |
get a string pointer that points to the parent genomic sequence
References gseq.
| int RNAModel::exonLength | ( | ) | const [inline] |
in Noschain this is implemented as sum of exon length This derived class store the same information into the length of the RNA string. No computation is needed. Overwrite parent class method.
Reimplemented from Noschain.
References rna.
Referenced by mRNAModel::CDSFractionRNA(), mRNAModelUpdate::ESTCoverage(), mRNAModel::ThreePrimeUTRLength(), valid(), ESTAssembly::write(), ESTAssembly::writeModel(), mRNAModelUpdate::writeModelTable(), and mRNAModel::writeModelTable().
| bool RNAModel::valid | ( | ) | const [virtual] |
I am making this a virtual function. it checks 1. rna string length is the same as parent class exonLength() 2. all exons are in the same direction.
Reimplemented in mRNAModel.
References Noschain::directionAgree(), exonLength(), Noschain::exonLength(), and rna.
Referenced by mRNAModel::valid().
| bool RNAModel::sameRNA | ( | const RNAModel & | rmd | ) | const [inline] |
| const string& RNAModel::genomicId | ( | ) | const [inline] |
| int RNAModel::RNALength | ( | ) | const [inline] |
References rna.
Referenced by mRNAModel::growCDS3Prime(), ESTAssembly::RNACodingFraction(), JGIModel::valid(), and ESTAssembly::writeModel().
| const string& RNAModel::RNAString | ( | ) | const [inline] |
| void RNAModel::resetRNA | ( | ) | throw (Badinput) [inline] |
Given the genomic sequence, this object will resplice the genomic DNA asscording to exons in the parent class (Noschain). rna will be reset according to this new splice result.
References gseq, rna, and Noschain::subsequence().
Referenced by mRNAModel::growCDS3Prime(), mRNAModel::reset(), reverse(), mRNAModel::trimCDSStop(), mRNAModel::trimCDSTail(), and JGIModel::valid().
| void RNAModel::setRNA | ( | const string & | rseq | ) | [inline] |
References rna.
Referenced by ESTAssembly::budMinusPrefixModel(), and ESTAssembly::budMinusSuffixModel().
| virtual void RNAModel::reset | ( | ) | [inline, virtual] |
simply reset RNA sequence from exon boudns call Noschain::subsequence() method
Reimplemented in mRNAModel.
References gseq, rna, and Noschain::subsequence().
Referenced by append(), and mRNAModel::mRNAModel().
| void RNAModel::setGenomicId | ( | const string & | gg | ) | [inline] |
References gid.
| bool RNAModel::append | ( | Noschain & | mod | ) |
RNAModel version, add chain first, then update RNA sequence.
Reimplemented from Noschain.
References Noschain::append(), and reset().
Referenced by mRNAModel::append().
| RNAModel & RNAModel::reverse | ( | ) |
Note, most RNA with introns have direction set from 5' to 3'. So reversing of such RNA should get a warning will also reverse the underlying RNA sequence. This method is used when strand information was not supplied in the right format. Then the guessStrand() function of mRNAModel will reverse - models.
Reimplemented from Noschain.
References resetRNA(), and Noschain::reverse().
Referenced by ESTAssemblyid::breakup(), mRNAModel::mRNAModel(), ESTAssembly::reverse(), and mRNAModel::reverse().
| string RNAModel::seqGenomic | ( | ) | const |
The subsequence of this object. For constructing JGI table column.
References Range::begin(), Range::direction(), Range::end(), gseq, and reverseComplementInPlace().
Referenced by mRNAModel::JGITranscriptRow(), mRNAModel::printJGITranscriptRow(), and mRNAModel::printJGITranscriptRowNoId().
| int RNAModel::genomicLength | ( | ) | const [inline] |
| virtual modeltype RNAModel::objtype | ( | ) | const [inline, virtual] |
| ostream & RNAModel::writeExon | ( | ostream & | ous, | |
| char | sep = '\t' | |||
| ) | const |
will not output endl. This method is enough for all derived classes. Generate a table row.
References exonid, Noschain::exons, getOid(), and Noschain::numberOfRanges().
Referenced by ESTAssembly::write(), ESTAssemblyid::writetab(), ESTAssembly::writetab(), mRNAModelUpdate::writetab(), and mRNAModel::writetab().
| ostream & RNAModel::print | ( | ostream & | ous | ) | const [virtual] |
for operator<<
Reimplemented from Noschain.
Reimplemented in mRNAModel, JGIModel, and ESTAssembly.
References genid, gid, oid, and Noschain::print().
Referenced by mRNAModel::print().
| void RNAModel::intronBound | ( | map< string, int > & | spsite | ) | const |
extract the boundary 4 bp, GTAG and count them
| spsite | is the accumulator. This function collect stat info for all introns. |
References Range::begin(), Range::direction(), Range::end(), Noschain::exons, genomicId(), getOid(), gseq, Noschain::numberOfRanges(), and reverseComplement().
Referenced by assembleChain().
| static int RNAModel::currentId | ( | ) | [inline, static] |
| static int RNAModel::nextId | ( | ) | [inline, static] |
References serialid.
Referenced by assignNewId(), RNAModel(), and setNextOid().
| static void RNAModel::advanceId | ( | ) | [inline, static] |
References serialid.
| static void RNAModel::rollbackId | ( | ) | [inline, static] |
References serialid.
| static void RNAModel::setId | ( | int | oi | ) | [inline, static] |
References serialid.
| static int RNAModel::nextGeneId | ( | ) | [inline, static] |
| static int RNAModel::currentGeneId | ( | ) | [inline, static] |
| static void RNAModel::advanceGeneId | ( | ) | [inline, static] |
const char RNAModel::exonheader = "exonid\tmodelid\texstart\texfinish" [static] |
Referenced by main(), and makeModels().
string RNAModel::gid [protected] |
a unique identifier for genomic sequence usually scaffold1, or chromosome1
Referenced by ESTAssemblyid::breakup(), ESTAssembly::budTemplate(), genomicId(), mRNAModel::JGIModelRow(), operator=(), print(), mRNAModel::printJGIModelRow(), setGenomicId(), JGIModel::show(), and mRNAModel::show().
const string* RNAModel::gseq [protected] |
genomic sequence should be a pointer that are shared by many RNA objects
Referenced by ESTAssemblyid::breakup(), ESTAssembly::budTemplate(), ESTAssembly::checkIntronBound(), ESTAssembly::fixIntronBound(), genomicLength(), getGenomicPointer(), mRNAModel::guessStrand(), intronBound(), operator=(), reset(), resetRNA(), RNAModel(), seqGenomic(), setGenomic(), mRNAModel::setGenomicCDS(), setGenomicPointer(), and mRNAModel::show().
string RNAModel::rna [protected] |
for generic RNA model it stores the product of transcription and splicing
Referenced by ESTAssembly::breakPrefixModel(), ESTAssembly::breakSuffixModel(), ESTAssemblyid::breakup(), ESTAssembly::budMinusSuffixModel(), ESTAssembly::budPlusPrefixModel(), ESTAssembly::budPlusSuffixModel(), mRNAModel::CDSSeq(), mRNAModel::CDSSequence(), exonLength(), mRNAModel::growCDS3Prime(), mRNAModel::JGITranscriptRow(), mRNAModel::mRNAModel(), operator=(), mRNAModel::printJGITranscriptRow(), mRNAModel::printJGITranscriptRowNoId(), ESTAssembly::prune3PrimeUTR(), ESTAssembly::prune5PrimeUTR(), reset(), mRNAModel::reset(), mRNAModel::resetProtein(), resetRNA(), RNALength(), RNAModel(), RNASequence(), RNAString(), sameRNA(), ESTAssembly::setCDSInfo(), mRNAModel::setLongestCDSAndProtein(), setRNA(), mRNAModel::setRNACDS(), mRNAModel::show(), trimAfterPoint(), mRNAModel::trimBeforePoint(), trimBeforePoint(), mRNAModel::UTR3Sequence(), mRNAModel::valid(), valid(), ESTAssembly::write(), ESTAssembly::writeModel(), mRNAModelUpdate::writeModelTable(), and mRNAModel::writeModelTable().
int RNAModel::oid [protected] |
this is the unique object id obtained by advancing serialid class-wise variable Or this can assigned from external database primary key.
Referenced by assignNewId(), getOid(), modelidAsGeneid(), operator=(), print(), RNAModel(), setNextOid(), and setOid().
int RNAModel::genid [protected] |
gene id. This is the member. I also have a global counter: geneid
Referenced by assignCurrentGeneId(), assignNewGeneId(), geneId(), getGeneId(), modelidAsGeneid(), operator=(), print(), and setGeneId().
int RNAModel::serialid = 1 [static, protected] |
static member initialization
for making unique identifier of objects in this class
Referenced by advanceId(), currentId(), nextId(), rollbackId(), and setId().
int RNAModel::exonid = 1 [static, protected] |
Referenced by writeExon().
int RNAModel::geneid = 1 [static, protected] |
Referenced by advanceGeneId(), currentGeneId(), and nextGeneId().
1.5.6