eXpress “1.5”
|
The SequenceRev class implements the Sequence abstract class for accessing the reverse sequence. More...
#include <sequence.h>
Public Member Functions | |
SequenceRev (SequenceFwd &seq) | |
size_t | length () const |
An accessor for the length of the encoded sequence. | |
bool | empty () const |
Accessor to determine if the sequence has 0 length. | |
void | set (const std::string &seq, bool rev) |
A member function that encodes the given sequence and overwrites the current stored sequence with it. | |
size_t | operator[] (const size_t index) const |
An accessor for the encoded character at the given index. | |
size_t | get_ref (const size_t index) const |
An accessor for the encoded reference character at the given index. | |
float | get_obs (const size_t index, const size_t nuc) const |
An accessor for the observed nucleotide frequency (logged). | |
float | get_exp (const size_t index, const size_t nuc) const |
An accessor for the expected nucleotide frequency (logged). | |
void | update_est (const size_t index, const size_t nuc, float mass) |
A member function that updates the posterior nucleotide distribution if probabilistic. | |
void | update_obs (const size_t index, const size_t nuc, float mass) |
A member function that updates the observed frequency distribution if probabilistic. | |
void | update_exp (const size_t index, const size_t nuc, float mass) |
A member function that updates the expected frequency distribution if probabilistic. | |
float | get_prob (const size_t index, const size_t nuc) const |
An accessor for the posterior nucleotide distribution (logged). | |
bool | prob () const |
Accessor to determine if the sequence is probabilistic. | |
void | calc_p_vals (std::vector< double > &p_vals) const |
A member function that calculates p-values based on the observed and expected nucleotide frequences for the sequence. |
The SequenceRev class implements the Sequence abstract class for accessing the reverse sequence.
Documentation is only provided for methods not documented in the abstract Sequence class and SequenceFwd class. This class acts by storing a pointer to a SequenceFwd object and reverse complementing
the input and output appropriately.
Definition at line 258 of file sequence.h.
void SequenceRev::calc_p_vals | ( | std::vector< double > & | p_vals | ) | const [virtual] |
A member function that calculates p-values based on the observed and expected nucleotide frequences for the sequence.
Experimental.
p_vals | a reference to an empty vector of doubles to fill with p-values at each position. |
Implements Sequence.
Definition at line 119 of file sequence.cpp.
bool SequenceRev::empty | ( | ) | const [inline, virtual] |
Accessor to determine if the sequence has 0 length.
Implements Sequence.
Definition at line 274 of file sequence.h.
float SequenceRev::get_exp | ( | const size_t | index, |
const size_t | nuc | ||
) | const [inline, virtual] |
An accessor for the expected nucleotide frequency (logged).
index | the index of the position to access. |
nuc | the nucleotide to return the frequency of. |
Implements Sequence.
Definition at line 288 of file sequence.h.
float SequenceRev::get_obs | ( | const size_t | index, |
const size_t | nuc | ||
) | const [inline, virtual] |
An accessor for the observed nucleotide frequency (logged).
index | the index of the position to access. |
nuc | the nucleotide to return the frequency of. |
Implements Sequence.
Definition at line 286 of file sequence.h.
float SequenceRev::get_prob | ( | const size_t | index, |
const size_t | nuc | ||
) | const [inline, virtual] |
An accessor for the posterior nucleotide distribution (logged).
index | the index of the position to access. |
nuc | the nucleotide to return the probability of. |
Implements Sequence.
Definition at line 296 of file sequence.h.
size_t SequenceRev::get_ref | ( | const size_t | index | ) | const [inline, virtual] |
An accessor for the encoded reference character at the given index.
May differ from the operator[] if the sequence is probabilistic.
index | the index of the encoded reference character to return (assumed to be < _len) |
Implements Sequence.
Definition at line 284 of file sequence.h.
size_t SequenceRev::length | ( | ) | const [inline, virtual] |
An accessor for the length of the encoded sequence.
Implements Sequence.
Definition at line 268 of file sequence.h.
size_t SequenceRev::operator[] | ( | const size_t | index | ) | const [inline, virtual] |
An accessor for the encoded character at the given index.
If the sequence is probabilistic, returns the mode. Otherwise, returns the reference.
index | the index of the encoded character to return (assumed to be < _len) |
Implements Sequence.
Definition at line 282 of file sequence.h.
bool SequenceRev::prob | ( | ) | const [inline, virtual] |
Accessor to determine if the sequence is probabilistic.
Implements Sequence.
Definition at line 298 of file sequence.h.
void SequenceRev::set | ( | const std::string & | seq, |
bool | rev | ||
) | [inline, virtual] |
A member function that encodes the given sequence and overwrites the current stored sequence with it.
seq | the nucleotide sequence to encode and store. |
rev | a boolean if the sequence should be reverse complemented before encoding. |
Implements Sequence.
Definition at line 281 of file sequence.h.
void SequenceRev::update_est | ( | const size_t | index, |
const size_t | nuc, | ||
float | mass | ||
) | [inline, virtual] |
A member function that updates the posterior nucleotide distribution if probabilistic.
index | the index of the position to update. |
nuc | the nucleotide to increment the mass of. |
mass | the amount to increment the nucleotide's mass by. |
Implements Sequence.
Definition at line 290 of file sequence.h.
void SequenceRev::update_exp | ( | const size_t | index, |
const size_t | nuc, | ||
float | mass | ||
) | [inline, virtual] |
A member function that updates the expected frequency distribution if probabilistic.
index | the index of the position to update. |
nuc | the nucleotide to increment the mass of. |
mass | the amount to increment the nucleotide's mass by. |
Implements Sequence.
Definition at line 294 of file sequence.h.
void SequenceRev::update_obs | ( | const size_t | index, |
const size_t | nuc, | ||
float | mass | ||
) | [inline, virtual] |
A member function that updates the observed frequency distribution if probabilistic.
index | the index of the position to update. |
nuc | the nucleotide to increment the mass of. |
mass | the amount to increment the nucleotide's mass by. |
Implements Sequence.
Definition at line 292 of file sequence.h.