Ymir
.9
Fast\C++toolforcomputationofassemblingprobabilities,statisticalinferenceofassemblingstatisticalmodelandgenerationofartificialsequencesofT-cellreceptorsdata.
|
Public Member Functions | |
ProbabilisticAssemblingModel (const string &folderpath, ModelBehaviour behav=PREDEFINED) | |
Model constructor from the given folder with a model's parameters. More... | |
vector< prob_t > | computeFullProbabilities (const ClonesetView &repertoire, ErrorMode error_mode, SequenceType sequence_type=NUCLEOTIDE, MAAGComputeProbAction action=SUM_PROBABILITY) const |
Compute full assembling probabilities of clonotypes from the given repertoire. If some clonotypes have few alignments of some gene segments, than full probability of all combinations of gene segments will be computed and either summed or the max full probability will be chosen. More... | |
MAAGRepertoire | buildGraphs (const ClonesetView &repertoire, MetadataMode save_metadata, ErrorMode error_mode, SequenceType sequence_type=NUCLEOTIDE, bool verbose=true) const |
Build a set of MAAGs from the given cloneset. More... | |
void | updateEventProbabilities (MAAGRepertoire *repertoire, bool verbose=true) |
Update event probabilities in the given MAAG repertoire with new ones. | |
Cloneset | generateSequences (size_t count=1, bool verbose=true) const |
Generate artificial repertoire of sequences using this model. More... | |
const VDJRecombinationGenes & | gene_segments () const |
Access to the gene segments table. More... | |
const ModelParameterVector & | event_probabilities () const |
Access to vector of probabilities. | |
void | updateModelParameterVector (const ModelParameterVector &vec) |
Set a new event probabilities vector to this model. More... | |
void | updateGeneUsage (const ClonesetView &cloneset) |
Given the cloneset, compute its gene usage on out-of-frames and update the event probability vector with new gene probabilities. | |
bool | save (const string &folderpath) const |
Save the model to the given folder. More... | |
bool | status () const |
Return if the model is in the ready-to-work state. More... | |
Recombination | recombination () const |
string | name () const |
Protected Member Functions | |
ProbabilisticAssemblingModel () | |
Private default constructor. | |
void | parseModelConfig (const string &folderpath) |
Parse JSON file with model parameters. | |
void | make_builder () |
Make MAAGBuilder with this model's parameters (event probabilities and gene segments). | |
void | make_assembler () |
Make ClonotypeAssembler with this model's parameters (event probabilities and gene segments). | |
void | save_vj (const string &folderpath) const |
void | save_vdj (const string &folderpath) const |
Protected Attributes | |
bool | _status |
bool | _verbose |
ModelBehaviour | _behaviour |
Json::Value | _config |
Recombination | _recomb |
string | _model_path |
unique_ptr< ModelParser > | _parser |
unique_ptr< VDJRecombinationGenes > | _genes |
unique_ptr< ModelParameterVector > | _param_vec |
unique_ptr< MAAGBuilder > | _builder |
unique_ptr< ClonotypeAssembler > | _generator |
seq_len_t | _min_D_len |
|
inline |
Model constructor from the given folder with a model's parameters.
folderpath | Path to a folder with a model's parameters. |
behav | Model's behaviour. PREDEFINED means that each probability will stay constant for each input data unless the model probabilities vector updated with new parameters (either all parameters or gene usage only). EMPTY means that the model will load only gene segments sequences and generate vector of uniformly distributed marginal probabilities. This model could be used as an input model for the statistical inference of the model's parameters. |
|
inline |
|
inline |
Compute full assembling probabilities of clonotypes from the given repertoire. If some clonotypes have few alignments of some gene segments, than full probability of all combinations of gene segments will be computed and either summed or the max full probability will be chosen.
repertoire | Repertoire with alignments and event indices. |
aminoacid | What probabilities will be computed - of nucleotide or amino acid sequences. If this parameter is false and some clone will have amino acid sequence, than error message will be generated to the output and probability of this clone will set to zero. |
|
inline |
Access to the gene segments table.
|
inline |
Generate artificial repertoire of sequences using this model.
count | Number of generated sequences. |
merge | If true than return only unique clonotypes with counts of occurrences for each clonotype. |
|
inline |
Save the model to the given folder.
folderpath | Path to the model folder. |
|
inline |
Return if the model is in the ready-to-work state.
|
inline |
Set a new event probabilities vector to this model.
vec | Vector with new event probabilities. |