Version 4.1.5
Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

Sequence Class Reference

The Sequence class has been designed for Markovian analysis of a single sequence. More...

#include <seqpp/Sequence.h>

Inheritance diagram for Sequence:

PrimarySequence PrimaryCount List of all members.

Public Member Functions

 Sequence (ifstream &ifile, short order, const Translator &transl, Coder &coder, const string &name_file="noname")
 Constructor from a flow ifile from a fasta file.
 Sequence (short order, unsigned long length, const Translator &transl)
 minimal constructor
 Sequence (const string &name_file, short order, const Translator &transl)
 Constructor from a Fasta or Genbank file containing a single sequence.
 Sequence (const Sequence &seq)
 Copy constructor.
 Sequence (const Sequence &seq, short order)
 Deduction constructor from an order 0-sequence.
virtual ~Sequence ()
 destructor
short tell_int (unsigned long pos) const
 Returns the int value of the token on position pos.
long tell_code (unsigned long pos) const
 Returns the code on position pos.
long & operator() (unsigned long pos) const
 idem "tell_code" Returns the code on position pos
long tell_code () const
 Returns the code on current position.
const long * seq () const
 Returns the coded sequence as a vector.
const long * get_code () const
 Returns the coded sequence as a vector.
void simule (const double *m_trans, const double *v_init, const gsl_rng *r)
 simulate the observations from a transition matrix and a vector for initial _order-word proba
void simule (const double *m_trans, const gsl_rng *r)
 simulate the observations from a transition matrix, random initial law
void simule_phased (short phase, const double **m_trans, const double *v_init, const gsl_rng *r)
 simulate the observations from a vector of transition matrices and a vector for initial _order word proba
void simule (unsigned long position, double *proba, const gsl_rng *r)
 simulate the observation on position from a alphabet size vector

Protected Member Functions

virtual unsigned long tell_max_count () const
 return the max length for the count
virtual void compute_count (unsigned long **extern_count, short phase, short initial_phase, unsigned long beg, unsigned long end) const

Detailed Description

The Sequence class has been designed for Markovian analysis of a single sequence.

On each position, the markovian predictor is coded and store (see PrimaryCount):

  Exple with the alphabet AGCT: 
  sequence position  .... 7  8  9 ...
  token              .... A  G  A ...
  code stored        ..........24

Sequence object of integer values corresponding to the code of the word considered on a position t for a Markov model of order _order... this code corresponds to the number of smaller words and the calculus in base |A| of this word, with A the alphabet.
ex : from A to GGG for order 2 with dna alphabet


Constructor & Destructor Documentation

Sequence::Sequence ifstream &  ifile,
short  order,
const Translator transl,
Coder &  coder,
const string &  name_file = "noname"
 

Constructor from a flow ifile from a fasta file.

on the position of the char '>', create an object until the next '>' generating his name by the concatenation of the sentence after the char '>'. The flow is or eof or on a '>' at the end.

Parameters:
ifile iftream flow
order markovian order
transl reference to a Translator
coder reference to a Coder
name_file file name corresponding to ifile

Sequence::Sequence short  order,
unsigned long  length,
const Translator transl
 

minimal constructor

Parameters:
order markovian order
length default length
transl reference to a Translator

Sequence::Sequence const string &  name_file,
short  order,
const Translator transl
 

Constructor from a Fasta or Genbank file containing a single sequence.

Parameters:
name_file file name to open
order markovian order
transl reference to a Translator


Member Function Documentation

void Sequence::compute_count unsigned long **  extern_count,
short  phase,
short  initial_phase,
unsigned long  beg,
unsigned long  end
const [protected, virtual]
 

total length case

Implements PrimaryCount.


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



Download seq++ 4.1.5
Download previous versions
Statistique & Genome Home


Generated on Thu Aug 4 18:34:05 2005 for seqpp by doxygen 1.3.9.1