DNA Class Reference

#include <bioseq.h>

Inheritance diagram for DNA:

bioseq mRNA

List of all members.

Public Member Functions

 DNA ()
 DNA (const DNA &s)
 DNA (const string &s)
 DNA (const string &n, const string &s)
 DNA (const string &n, const string &s, const string &t)
 DNA (const bioseq &s)
 ~DNA ()
DNAoperator= (const DNA &s)
DNAoperator= (const string &str)
Protein translate () const
Protein translate (int begin, int end=-1) const
DNA subseq (int b, int e) const
const int * getcodeNuc () const
sequenceType getSequenceType () const
double GCContent () const
double GCContent (long int &A, long int &C, long int &G, long int &T, long int &N) const
void revcomp ()
Protein longestORFForward (int &b, int &e) const
void longestORFForward (Protein &p, int &b, int &e) const
Protein longestORFReverse (int &b, int &e) const
void longestORFReverse (Protein &p, int &b, int &e) const
Protein longestORF (char strand, int &b, int &e) const
Protein longestORF (int &b, int &e) const
void longestORF (Protein &p, int &b, int &e) const

Static Public Member Functions

static const codongetCodonTable ()
static void setCodonTable (const int ctid)

Static Protected Attributes

static codon codontable = codon()


Detailed Description

this class add a few DNA specific operations These operation can be applied to cDNA or genomic DNA

Constructor & Destructor Documentation

DNA::DNA (  )  [inline]

DNA::DNA ( const DNA s  )  [inline]

DNA::DNA ( const string &  s  )  [inline]

DNA::DNA ( const string &  n,
const string &  s 
) [inline]

DNA::DNA ( const string &  n,
const string &  s,
const string &  t 
) [inline]

DNA::DNA ( const bioseq s  )  [inline]

DNA::~DNA (  )  [inline]


Member Function Documentation

DNA & DNA::operator= ( const DNA s  ) 

References bioseq::operator=().

DNA & DNA::operator= ( const string &  str  ) 

replace the underlying sequece with str

Reimplemented from bioseq.

References bioseq::operator=().

Protein DNA::translate (  )  const

this is one essential operationn with cDNA CDS features of genomic DNA also use this feature. NNN => ?, may be I should use X

References codontable, and bioseq::seq.

Referenced by longestNoStartORFPlus(), longestNoStopORFPlus(), longestORFForward(), longestORFPlus(), longestORFPlusPrefix(), longestORFPlusSuffix(), main(), GenModel::makeProtein(), and GenModel::valid().

Protein DNA::translate ( int  begin,
int  end = -1 
) const

use 1-based index This operation limits the operation to a subrange of the DNA sequence. This class use only one codon table that is static.

References codontable, and bioseq::seq.

DNA DNA::subseq ( int  b,
int  e 
) const [inline]

performance is very bad if sequence is long. 1-based index, inclusive [b, e]

Reimplemented from bioseq.

References bioseq::subseq().

Referenced by bufferGenomic(), buildGeneInfo(), dumpFromModel(), dumpIntronExon(), and main().

const int * DNA::getcodeNuc (  )  const

not implemented yet, could convert bases into integers like A=>0, C=>1, ... This method is different, use a different hashing method

References bioseq::code, hashbase(), bioseq::length(), and bioseq::seq.

sequenceType DNA::getSequenceType (  )  const [inline, virtual]

Reimplemented from bioseq.

References DNASEQ.

double DNA::GCContent (  )  const

return the fraction of GC/Length of sequence

References at, and bioseq::seq.

Referenced by dumpFromModel(), dumpIntronExon(), and main().

double DNA::GCContent ( long int &  A,
long int &  C,
long int &  G,
long int &  T,
long int &  N 
) const

another version for compute the accumulative GC content for all sequences in a file Add to the counts for the four bases and N, ignoring other bases

References bioseq::seq.

void DNA::revcomp (  )  [inline]

use the inplace global function more efficient

References reverseComplementInPlace(), and bioseq::seq.

Referenced by ESTModel::ESTModel(), and longestORFReverse().

Protein DNA::longestORFForward ( int &  b,
int &  e 
) const

return the longest peptide sequence in the + strand. set b,e to the range on DNA that give rise to this translation. b,e are C style index. [b,e)

References bioseq::length(), longestORFIndex(), bioseq::subsequence(), and translate().

Referenced by ESTModel::ESTModel(), longestORF(), longestORFReverse(), testLongestORF(), and testTranslate().

void DNA::longestORFForward ( Protein p,
int &  b,
int &  e 
) const

more efficient version, avoiding returning a long string.

References bioseq::length(), longestORFIndex(), bioseq::subsequence(), and translate().

Protein DNA::longestORFReverse ( int &  b,
int &  e 
) const

[b,e) b>e from the lower strand (-)

References bioseq::length(), longestORFForward(), and revcomp().

Referenced by longestORF(), and testTranslate().

void DNA::longestORFReverse ( Protein p,
int &  b,
int &  e 
) const

Protein DNA::longestORF ( char  strand,
int &  b,
int &  e 
) const

Protein DNA::longestORF ( int &  b,
int &  e 
) const

void DNA::longestORF ( Protein p,
int &  b,
int &  e 
) const

static const codon& DNA::getCodonTable (  )  [inline, static]

References codontable.

Referenced by translate().

static void DNA::setCodonTable ( const int  ctid  )  [inline, static]

References codontable, and codon::use().

Referenced by main(), and testcodon().


Member Data Documentation

codon DNA::codontable = codon() [static, protected]

all the DNA class use one codon table This is mostly for efficiency purposes. May have to add some other function to deal with particular codon tables. Even global function use this codon table for translation.

Referenced by getCodonTable(), setCodonTable(), and translate().


The documentation for this class was generated from the following files:

Generated on Wed Aug 10 11:57:09 2011 for Softwares from Orpara by  doxygen 1.5.6