simplicity.phenotype package
Submodules
simplicity.phenotype.consensus module
- simplicity.phenotype.consensus.build_weighted_consensus_matrix(data)[source]
- Parameters:
data (TYPE) – DESCRIPTION.
- Returns:
matrix (TYPE) – DESCRIPTION.
bases (TYPE) – DESCRIPTION.
unique_positions (TYPE) – DESCRIPTION.
- simplicity.phenotype.consensus.get_seq_weights(data, t_sim)[source]
preprocess lineage data to calculate weighted consensus. calculate weight for sequence at time t_sim
- Parameters:
data (list) – list of list containing lineages data. data contains lineage_name, sequence, n_infected_t, t
t_sim (float) – time of the simulation at which we evalute the weights.
- Returns:
seq_for_consensus – [sequence, #_infected_t, w_t(t_sim)].
- Return type:
list
simplicity.phenotype.distance module
Here there are the functions we use to calculate the hamming distance for the phenotype model. Please consider that they are adapted to the data sctructure we use to store genomic data (we only store the positions and mutations that are
different from the reference genome.)
simplicity.phenotype.update module
simplicity.phenotype.weight module
- simplicity.phenotype.weight.w_t_params(t_half=30, t_max=21)[source]
Compute values for k_e and k_a from known pharmacokinetics relationships
- Parameters:
t_half (int, optional) – half life of antibodies in plasma. The default is 30.
t_max (int, optional) – time of max antibody concentration after exposure. The default is t_max.
- Returns:
float – k_e antibody elimination rate constant.
float – k_a - antibody generation rate constant.