Ymir  .9
Fast\C++toolforcomputationofassemblingprobabilities,statisticalinferenceofassemblingstatisticalmodelandgenerationofartificialsequencesofT-cellreceptorsdata.
Public Member Functions | List of all members
ymir::ModelParameterVector Class Reference

Class for storing parameters of assembling statistical model. Note: event with index 0 (zero) is "null" event and always has zero probability. Vector is ordered so for VJ or VDJ recombination specific family events stored in specific order. More...

#include <modelparametervector.h>

Public Member Functions

 ModelParameterVector (Recombination vec_type, const vector< prob_t > &param_vec, const vector< event_ind_t > &lens_vec, const vector< event_ind_t > &event_classes, const vector< seq_len_t > &event_family_col_numbers, const vector< prob_t > &laplace_vec=vector< prob_t >(), prob_t err_prob=0, bool do_normalise=true, const vector< seq_len_t > &d_genes_min_len=vector< seq_len_t >())
 
bool operator== (const ModelParameterVector &other) const
 
Recombination recombination () const
 
event_ind_t eventFamilySize (event_ind_t event_family) const
 
event_ind_t eventFamilySize (event_ind_t event_class, event_ind_t event_family) const
 
event_ind_t eventClassSize (event_ind_t event_class) const
 
vector< prob_t >::const_iterator get_iterator (event_ind_t i) const
 
event_ind_t event_index (EventClass event_class, event_ind_t event_family, event_ind_t event_index) const
 
event_ind_t event_index (EventClass event_class, event_ind_t event_family, event_ind_t event_row, event_ind_t event_column) const
 
prob_t event_prob (EventClass event_class, event_ind_t event_family, event_ind_t event_index) const
 
prob_t event_prob (EventClass event_class, event_ind_t event_family, event_ind_t event_row, event_ind_t event_column) const
 
void normaliseEventFamilies ()
 Normalise each event family to have sum equal to 1.
 
void normaliseEventClass (EventClass event_class)
 
event_ind_t max_VJ_ins_len () const
 
event_ind_t max_VD_ins_len () const
 
event_ind_t max_DJ_ins_len () const
 
seq_len_t D_min_len (event_ind_t d_index) const
 
prob_t error_prob () const
 
void set_error_prob (prob_t val)
 
void fill (prob_t val=0)
 Fill the vector with the given value.
 
void familyFill (event_ind_t event_family, prob_t val=0)
 
size_t families () const
 
size_t size () const
 
seq_len_t n_columns (EventClass event_class, event_ind_t event_family=0) const
 
prob_t & operator[] (event_ind_t gl_event_index)
 Get a probability of an event with the given global index. More...
 
prob_t operator[] (event_ind_t gl_event_index) const
 
prob_t operator() (event_ind_t event_family, event_ind_t loc_event_index) const
 

Detailed Description

Class for storing parameters of assembling statistical model. Note: event with index 0 (zero) is "null" event and always has zero probability. Vector is ordered so for VJ or VDJ recombination specific family events stored in specific order.

Vector with event's probabilities stored in specific order: VJ - recombination: [0] - null family [1] - Variable gene segment probability [2] - J prob [3 : 3 + [2] - [1]] - V deletions [4] - J deletions [5] - VJ insertion length [6] - VJ insertion markov chain

VDJ - recombination: [0] - null family [1] - Variable gene segment probability [2] - J prob [3] - V deletions [4] - J deletions [5] - VJ insertion length [6] - VJ insertion markov chain

Hypermutations added as the last element in the vector. Note: gene segment deletion probabilities stored in order of gene segment probabilities.

Constructor & Destructor Documentation

ymir::ModelParameterVector::ModelParameterVector ( Recombination  vec_type,
const vector< prob_t > &  param_vec,
const vector< event_ind_t > &  lens_vec,
const vector< event_ind_t > &  event_classes,
const vector< seq_len_t > &  event_family_col_numbers,
const vector< prob_t > &  laplace_vec = vector<prob_t>(),
prob_t  err_prob = 0,
bool  do_normalise = true,
const vector< seq_len_t > &  d_genes_min_len = vector<seq_len_t>() 
)
inline

Event family - family of specific events like deletions of V4 segment or DJ insertions. Event class - class of events like V deletions, J deletions, D deletions, VJ insertions.

Parameters
param_vecVector of probabilities of events.
lens_vecVector of lengths for each family of events (V1 deletions, V2 deletions, etc.)
event_classesVector of start indices in lens_vec of each class of events (all V deletions, all J deletions, VJ insertions, etc.)
event_family_col_numbersNumber of rows in each event family (zero means there is no matrix, but only a vector). Vector with the same length as lens_vec.
laplace_vecVector of pseudo counts for each event family.

Member Function Documentation

event_ind_t ymir::ModelParameterVector::event_index ( EventClass  event_class,
event_ind_t  event_family,
event_ind_t  event_index 
) const
inline

0-based indices for families and events! All segment indices must be passed as (segindex - 1), segment families as (segindex_deletion_index - 1), but deletions and insertions should be passed as it is (#deletions).

prob_t& ymir::ModelParameterVector::operator[] ( event_ind_t  gl_event_index)
inline

Get a probability of an event with the given global index.

Parameters
event_familyEvent family's index.
gl_event_indexGlobal index of the event.
loc_event_indexLocal index of the event, i.e., index of the event in the given event family.
Returns
Probability of the event.

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