biocrnpyler.mixtures.extract
Classes
|
A Model for Transcription and Translation in Cell Extract with Ribosomes, Polymerases, and Endonucleases. |
|
A Model for Gene Expression without any Machinery (eg Ribosomes, Polymerases, etc.). |
|
A Model for Transcription and Translation in an extract any Machinery (eg Ribosomes, Polymerases, etc.) RNA is degraded via a global mechanism. |
|
A Model for Transcription and Translation in Cell Extract with Ribosomes, Polymerases, and Endonucleases. |
- class biocrnpyler.mixtures.extract.EnergyTxTlExtract(name='', rnap='RNAP', ribosome='Ribo', rnaase='RNAase', ntps='NTPs', ndps='NDPs', amino_acids='amino_acids', fuel='Fuel_3PGA', **kwargs)[source]
A Model for Transcription and Translation in Cell Extract with Ribosomes, Polymerases, and Endonucleases.
This model include energy carrier molcules in the form of NTPs, Amino Acids, and a Fuel Species (such as 3PGA) used for NTP regeneration. This model is equivalent to TxTl extract, but with limited fuel. Note that different amino acids and nucleotides are lumped together.
Energy usage for transcription and translation is length dependent.
- 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
ntps – name of the nucleotide fuel source (eg ATP + GTP etc), default: NTP
amino_acids – name of the amino acids species, default: amino_acids
fuel – name of the fuel species that regenerates ATP
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.extract.ExpressionExtract(name='', **kwargs)[source]
A Model for Gene Expression without any Machinery (eg Ribosomes, Polymerases, etc.).
Here transcription and Translation are lumped into one reaction: expression.
Initializes an ExpressionExtract 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 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.extract.SimpleTxTlExtract(name='', **kwargs)[source]
A Model for Transcription and Translation in an extract any Machinery (eg Ribosomes, Polymerases, etc.) RNA is degraded via a global mechanism.
Initializes a SimpleTxTlExtract 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.extract.TxTlExtract(name='', rnap='RNAP', ribosome='Ribo', rnaase='RNAase', **kwargs)[source]
A Model for Transcription and Translation in Cell Extract with Ribosomes, Polymerases, and Endonucleases.
This model does not include any energy
Initializes a TxTlExtract 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