![]() |
Version 4.2.0 |
#include <seqpp/Sequence.h>

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_under_composition (const double *v_statlaw, long s_statlaw, const gsl_rng *r) |
| simulate the observations using the stat law the tokens composition | |
| 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 |
| compute the count | |
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
| 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.
| ifile | iftream flow | |
| order | markovian order | |
| transl | reference to a Translator | |
| coder | reference to a Coder | |
| name_file | file name corresponding to ifile |
References PrimaryCount::_coder, PrimaryCount::_coder_in, PrimaryCount::_count, PrimaryCount::_count_ok, PrimarySequence::_ipos, PrimarySequence::_length, PrimarySequence::_name, PrimarySequence::_name_file, PrimaryCount::_nbinv, PrimaryCount::_nbvalue, PrimarySequence::_nmodal, PrimarySequence::_obs, PrimaryCount::_order, PrimaryCount::_phase, PrimarySequence::_sizecode, and PrimarySequence::_transl.
| Sequence::Sequence | ( | short | order, | |
| unsigned long | length, | |||
| const Translator & | transl | |||
| ) |
minimal constructor
| order | markovian order | |
| length | default length | |
| transl | reference to a Translator |
References PrimaryCount::_coder, PrimaryCount::_coder_in, PrimaryCount::_count, PrimaryCount::_count_ok, PrimarySequence::_ipos, PrimarySequence::_length, PrimarySequence::_name, PrimarySequence::_name_file, PrimaryCount::_nbinv, PrimaryCount::_nbvalue, PrimarySequence::_nmodal, PrimarySequence::_obs, PrimaryCount::_order, PrimaryCount::_phase, PrimarySequence::_sizecode, and PrimarySequence::_transl.
| Sequence::Sequence | ( | const string & | name_file, | |
| short | order, | |||
| const Translator & | transl | |||
| ) |
Constructor from a Fasta or Genbank file containing a single sequence.
| name_file | file name to open | |
| order | markovian order | |
| transl | reference to a Translator |
References PrimaryCount::_coder, PrimaryCount::_coder_in, PrimaryCount::_count, PrimaryCount::_count_ok, PrimarySequence::_ipos, PrimarySequence::_length, PrimarySequence::_name, PrimarySequence::_name_file, PrimaryCount::_nbinv, PrimaryCount::_nbvalue, PrimarySequence::_nmodal, PrimarySequence::_obs, PrimaryCount::_order, PrimaryCount::_phase, PrimarySequence::_sizecode, and PrimarySequence::_transl.
| Download seq++ 4.2.0 |
| Download previous versions |
| Statistique & Genome Home |
| Contributors : M.Baudry, P.Y.Bourguignon, M.Hoebeke, V.Miele, P.Nicolas, G.Nuel, H.Richard, D.Robelin |
1.5.6