silvio.catalog package¶
Submodules¶
silvio.catalog.RecExpSim module¶
An experiment that uses hosts which implements all currently existing modules.
-
class
silvio.catalog.RecExpSim.GrowthOutcome(value: Union[pandas.core.frame.DataFrame, pandas.core.series.Series], error: Optional[str] = None)[source]¶ Bases:
silvio.outcome.DataWithPlotOutcome-
make_plot() → matplotlib.figure.Figure[source]¶ Plotting with pyplot is unfortunately unintuitive. You cannot display a single figure by using the object-oriented API. When you do plt.subplots (or create a plot by any other means) it will be stored in the global context. You can only display things from the glbbal context, and displaying it will remove it from there.
-
-
class
silvio.catalog.RecExpSim.RecExperiment(seed: Optional[int] = None, equipment_investment: int = 0, max_budget: int = 10000)[source]¶ Bases:
silvio.experiment.ExperimentRecombinant Expression Experiment with culture growth and genetic recombination. Has a budget system to limit bruteforcing.
-
_abc_impl= <_abc._abc_data object>¶
-
clone_with_recombination(host_name: str, primer: Bio.Seq.Seq, gene: silvio.extensions.records.gene.gene.Gene, tm: int) → Tuple[silvio.catalog.RecExpSim.RecHost, str][source]¶ Clone the host while trying to insert a gene. The Clone might or might not contain the added Gene. Returns: ( new_host, outcome_message )
-
create_host(species: Literal[ecol, pput], name: Optional[str]) → silvio.catalog.RecExpSim.RecHost[source]¶
-
find_host_or_abort(host_name: str) → silvio.catalog.RecExpSim.RecHost[source]¶ Find a host by a given name or abort with an exception. Throws: ExperimentException
-
measure_promoter_strength(host_name: str, gene_name: str) → silvio.outcome.DataOutcome[source]¶ Measure the promoter strength of gene gene_name inside host host_name.
-
simulate_growth(host_name: str, temps: List[int], wait: float = 0.001) → silvio.catalog.RecExpSim.GrowthOutcome[source]¶ Simulate a growth under multiple temperatures and return expected biomasses over time.
-
simulate_vaccine_production(host_names: List[str], gene_name: silvio.extensions.records.gene.gene.Gene, cult_temp: int, growth_rate: float, biomass: int) → silvio.outcome.DataOutcome[source]¶ Simulate the protein production of multiple host cultures.
-
spend_budget_or_abort(amount: int) → None[source]¶ Each operation may use up a certain amount of the budget. When the budget is not sufficient those operations will all fail. By using error handling via raised exceptions we don’t need to check each method for a success flag on their return value. Throws: ExperimentException
-
-
class
silvio.catalog.RecExpSim.RecHost(ref: Optional[Host] = None, name: str = None, seed: Optional[int] = None, **kwargs)[source]¶ Bases:
silvio.host.Host-
_abc_impl= <_abc._abc_data object>¶
-
copy(ref: silvio.catalog.RecExpSim.RecHost) → None[source]¶ Make a copy of the host params and modules by using another similar Host as a reference. The code inside this method should provide a good copy where shallow and deep copies are used appropriately.
Extending Hosts should have the following structure on their method:
-
find_gene_or_abort(gene_name: str) → silvio.extensions.records.gene.gene.Gene[source]¶ Find a gene by a given name or abort with an exception. Throws: HostException
-
make(opt_growth_temp: int, max_biomass: int, infl_prom_str: int, species_prom_str: int, opt_primer_len: int, regressor_file: pathlib.Path, addparams_file: pathlib.Path) → None[source]¶ Make a new host from scratch with the help of arguments. Set possible params and modules.
Extending Host should have the following structure on their method:
-
ref_prom= 'GCCCATTGACAAGGCTCTCGCGGCCAGGTATAATTGCACG'¶
-