biocrnpyler.mixtures.cell
Classes
|
A Model for in-vivo Gene Expression without any Machinery (eg Ribosomes, Polymerases, etc.). |
|
Mixture with continuous dilution for non-DNA species. |
|
A Model for Transcription and Translation with Ribosomes, Polymerases, and Endonucleases labelled as Machinery. |
- class biocrnpyler.mixtures.cell.ExpressionDilutionMixture(name='', **kwargs)[source]
A Model for in-vivo Gene Expression without any Machinery (eg Ribosomes, Polymerases, etc.).
Here transcription and Translation are lumped into one reaction: expression. A global mechanism is used to dilute all non-dna species
Initializes an ExpressionDilutionMixture instance.
- Parameters:
name – name of the mixture
kwargs – keywords passed into the parent Class (Mixture)
- add_components(components: List[Component] | Component)[source]
This function adds a list of components to the mixture.
- add_global_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture global_mechanism dictonary.
- keywordS:
mechanism: a Mechanism instance mech_type: the type of mechanism. defaults to mechanism.mech_type if None overwrite: whether to overwrite existing mechanisms of the same type (default False)
- add_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture mechanism_dictionary.
- Parameters:
mechanism – a Mechanism instance
mech_type – the type of mechanism. defaults to mechanism.mech_type if None
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- add_mechanisms(mechanisms, overwrite=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
Can take both GlobalMechanisms and Mechanisms
- Parameters:
mechanisms – a Mechanism instance
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- compile_crn(**keywords) ChemicalReactionNetwork[source]
Overwriting compile_crn to replace transcripts with proteins for all DNA_assemblies.
Overwriting compile_crn to turn off transcription in all DNAassemblies
- Returns:
compiled CRN instance
- get_component(component=None, name=None, index=None)[source]
Function to get components from Mixture._components.
One of the 3 keywords must not be None.
- Parameters:
component – an instance of a component. Searches Mixture._components for a Component with the same type and name.
name – str. Searches Mixture._components for a Component with the same name
index – int. returns Mixture._components[index]
- Returns:
if nothing is found, returns None.
- get_initial_concentration(S: List | Species, component=None)[source]
Tries to find an initial condition of species s using the parameter hierarchy using the key:
- Searches Component’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
- Searches the Mixture’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
Defaults to 0
- get_mechanism(mechanism_type)[source]
Searches the Mixture for a Mechanism of the correct type.
If no Mechanism is found, None is returned.
- global_component_enumeration(comps_to_enumerate=None, recursion_depth=None) List[Component][source]
components that produce other components infinitely
- property global_mechanisms
global_mechanisms stores global Mechanisms in the Mixture.
- property mechanisms
mechanisms stores Mixture Mechanisms.
- set_species(species: Species | str, material_type=None, attributes=None)[source]
Used to set internal species from strings, Species or Components
- Parameters:
species – name of a species or a species instance
material_type – material type of a species as a string
attributes – Species attribute
- Returns:
Species in the mixture
- class biocrnpyler.mixtures.cell.SimpleTxTlDilutionMixture(name='', **keywords)[source]
Mixture with continuous dilution for non-DNA species.
Transcription and Translation are both modeled as catalytic with no cellular machinery. mRNA is also degraded via a separate reaction to represent endonucleases
Initializes a SimpleTxTlDilutionMixture instance.
- Parameters:
name – name of the mixture
kwargs – keywords passed into the parent Class (Mixture)
- add_components(components: List[Component] | Component)[source]
This function adds a list of components to the mixture.
- add_global_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture global_mechanism dictonary.
- keywordS:
mechanism: a Mechanism instance mech_type: the type of mechanism. defaults to mechanism.mech_type if None overwrite: whether to overwrite existing mechanisms of the same type (default False)
- add_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture mechanism_dictionary.
- Parameters:
mechanism – a Mechanism instance
mech_type – the type of mechanism. defaults to mechanism.mech_type if None
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- add_mechanisms(mechanisms, overwrite=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
Can take both GlobalMechanisms and Mechanisms
- Parameters:
mechanisms – a Mechanism instance
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- compile_crn(recursion_depth: int = None, initial_concentration_dict: dict = None, return_enumerated_components: bool = False, initial_concentrations_at_end: bool = False, copy_objects: bool = True, add_reaction_species: bool = True, compartment: Compartment = None) ChemicalReactionNetwork[source]
Creates a chemical reaction network from the species and reactions associated with a mixture object (with compartment). :param initial_concentration_dict: a dictionary to overwrite initial
concentrations at the end of compile time
- Parameters:
recursion_depth – how deep to run the Local and Global Component Enumeration
return_enumerated_components – returns a list of all enumerated components along with the CRN
initial_concentrations_at_end – if True does not look in Components for Species’ initial concentrations and only checks the Mixture database at the end.
copy_objects – Species and Reactions will be copied when placed into the CRN. Protects CRN validity at the expense of compilation speed.
add_reaction_species – Species inside reactions will be added to the CRN. Ensures no missing species at the expense of compilation speed.
- Returns:
ChemicalReactionNetwork
- get_component(component=None, name=None, index=None)[source]
Function to get components from Mixture._components.
One of the 3 keywords must not be None.
- Parameters:
component – an instance of a component. Searches Mixture._components for a Component with the same type and name.
name – str. Searches Mixture._components for a Component with the same name
index – int. returns Mixture._components[index]
- Returns:
if nothing is found, returns None.
- get_initial_concentration(S: List | Species, component=None)[source]
Tries to find an initial condition of species s using the parameter hierarchy using the key:
- Searches Component’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
- Searches the Mixture’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
Defaults to 0
- get_mechanism(mechanism_type)[source]
Searches the Mixture for a Mechanism of the correct type.
If no Mechanism is found, None is returned.
- global_component_enumeration(comps_to_enumerate=None, recursion_depth=None) List[Component][source]
components that produce other components infinitely
- property global_mechanisms
global_mechanisms stores global Mechanisms in the Mixture.
- property mechanisms
mechanisms stores Mixture Mechanisms.
- set_species(species: Species | str, material_type=None, attributes=None)[source]
Used to set internal species from strings, Species or Components
- Parameters:
species – name of a species or a species instance
material_type – material type of a species as a string
attributes – Species attribute
- Returns:
Species in the mixture
- class biocrnpyler.mixtures.cell.TxTlDilutionMixture(name='', rnap='RNAP', ribosome='Ribo', rnaase='RNAase', **kwargs)[source]
A Model for Transcription and Translation with Ribosomes, Polymerases, and Endonucleases labelled as Machinery.
This model includes a background load “cellular processes” which represents innate loading effects in the cell. Effects of loading on cell growth are not modelled. Unlike TxTlExtract, has global dilution for non-DNA and non-Machinery This model does not include any energy
Initializes a TxTlDilutionMixture instance.
- Parameters:
name – name of the mixture
rnap – name of the RNA polymerase, default: RNAP
ribosome – name of the ribosome, default: Ribo
rnaase – name of the Ribonuclease, default: RNAase
kwargs – keywords passed into the parent Class (Mixture)
- add_components(components: List[Component] | Component)[source]
This function adds a list of components to the mixture.
- add_global_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture global_mechanism dictonary.
- keywordS:
mechanism: a Mechanism instance mech_type: the type of mechanism. defaults to mechanism.mech_type if None overwrite: whether to overwrite existing mechanisms of the same type (default False)
- add_mechanism(mechanism, mech_type=None, overwrite=False)[source]
adds a mechanism of type mech_type to the Mixture mechanism_dictionary.
- Parameters:
mechanism – a Mechanism instance
mech_type – the type of mechanism. defaults to mechanism.mech_type if None
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- add_mechanisms(mechanisms, overwrite=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
Can take both GlobalMechanisms and Mechanisms
- Parameters:
mechanisms – a Mechanism instance
overwrite – whether to overwrite existing mechanisms of the same type (default False)
- Returns:
- compile_crn(recursion_depth: int = None, initial_concentration_dict: dict = None, return_enumerated_components: bool = False, initial_concentrations_at_end: bool = False, copy_objects: bool = True, add_reaction_species: bool = True, compartment: Compartment = None) ChemicalReactionNetwork[source]
Creates a chemical reaction network from the species and reactions associated with a mixture object (with compartment). :param initial_concentration_dict: a dictionary to overwrite initial
concentrations at the end of compile time
- Parameters:
recursion_depth – how deep to run the Local and Global Component Enumeration
return_enumerated_components – returns a list of all enumerated components along with the CRN
initial_concentrations_at_end – if True does not look in Components for Species’ initial concentrations and only checks the Mixture database at the end.
copy_objects – Species and Reactions will be copied when placed into the CRN. Protects CRN validity at the expense of compilation speed.
add_reaction_species – Species inside reactions will be added to the CRN. Ensures no missing species at the expense of compilation speed.
- Returns:
ChemicalReactionNetwork
- get_component(component=None, name=None, index=None)[source]
Function to get components from Mixture._components.
One of the 3 keywords must not be None.
- Parameters:
component – an instance of a component. Searches Mixture._components for a Component with the same type and name.
name – str. Searches Mixture._components for a Component with the same name
index – int. returns Mixture._components[index]
- Returns:
if nothing is found, returns None.
- get_initial_concentration(S: List | Species, component=None)[source]
Tries to find an initial condition of species s using the parameter hierarchy using the key:
- Searches Component’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
- Searches the Mixture’s ParameterDatabase using the key:
mechanisms = “initial concentration” part_id = mixture.name parameter_name = str(s)
if s == component.get_species, also checks with parameter_name=component.name
Defaults to 0
- get_mechanism(mechanism_type)[source]
Searches the Mixture for a Mechanism of the correct type.
If no Mechanism is found, None is returned.
- global_component_enumeration(comps_to_enumerate=None, recursion_depth=None) List[Component][source]
components that produce other components infinitely
- property global_mechanisms
global_mechanisms stores global Mechanisms in the Mixture.
- property mechanisms
mechanisms stores Mixture Mechanisms.
- set_species(species: Species | str, material_type=None, attributes=None)[source]
Used to set internal species from strings, Species or Components
- Parameters:
species – name of a species or a species instance
material_type – material type of a species as a string
attributes – Species attribute
- Returns:
Species in the mixture