biocrnpyler.components.dna.promoter
Classes
|
A class for a promoter which can be activated by a single species, modelled as a positive hill function |
|
A combinatorial promoter is something where binding multiple regulators result in qualitatively different transcription behaviour. |
|
A basic Promoter class with no regulation. |
|
A Promoter class with simple regulation. |
|
A class for a promoter which can be repressed by a single species, modelled as a negative hill function |
- class biocrnpyler.components.dna.promoter.ActivatablePromoter(name, activator, transcript=None, leak=False, **keywords)[source]
A class for a promoter which can be activated by a single species, modelled as a positive hill function
this represents a modular component sequence. These get compiled into working components
- add_mechanism(mechanism: Mechanism, mech_type=None, overwrite=False, optional_mechanism=False)[source]
adds a mechanism of type mech_type to the Component Mechanism dictionary.
- Parameters:
mechanism
mech_type
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- add_mechanisms(mechanisms: Mechanism | GlobalMechanism, overwrite=False, optional_mechanism=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
- Parameters:
mechanisms – Can take both GlobalMechanisms and Mechanisms
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- property compartment
The compartment of the Component.
- Returns:
Compartment
- enumerate_components(**keywords) List[source]
this is for component enumeration. Usually you will return a list of components that are copies of existing ones (first list) and new components (second list). For example, A DNA_construct makes a list of copies of its parts as the first output, and a list of RNA_constructs as the second output. An RNA_construct will make a list of copies of its parts as the first output, and a list of Protein components as its second output (if it makes any proteins)
- classmethod from_promoter(name, assembly, transcript, protein)[source]
Helper function to initialize a promoter instance from another promoter or str.
- Parameters:
name – either string or an other promoter instance
assembly
transcript
protein
- Returns:
Promoter instance
- get_mechanism(mechanism_type, optional_mechanism=False)[source]
Searches the Component for a Mechanism of the correct type.
If the Component does not have the mechanism, searches the Components’ Mixture for the Mechanism.
- Parameters:
mechanism_type
optional_mechanism – toggles whether an error is thrown if no mechanism is found
- Returns:
- get_orphan()[source]
returns a copy of this monomer, except with no parent. But it still has a position and direction
- get_parameter(param_name: str, part_id=None, mechanism=None, return_numerical=False, return_none=False, check_mixture=True) Parameter | Real[source]
Get a parameter from different objects that hold parameters.
- Hierarchy:
tries to find the Parameter in Component.parameter_database
tries to find the parameter in Component.mixture.parameter_database
- Parameters:
param_name
part_id
mechanism
return_numerical – numerical value or the parameter object is returned
return_none – returns None instead of throwing an error if a parameter isn’t found
check_mixture – toggle whether or not to check the Component’s Mixture as well
- Returns:
Parameter object or a Real number
- set_mixture(mixture) None[source]
Set the mixture the Component is in.
- Parameters:
mixture
- Returns:
None
- classmethod set_species(species: Species | str, material_type=None, compartment=None, attributes=None) Species[source]
Helper function that allows species to be set from strings, species, or Components
- Parameters:
species – Species, str, Component
material_type
compartment
attributes
- Returns:
Species
- update_component(internal_species=None, **keywords)[source]
returns a copy of this component, except with the proper fields updated
- update_parameters(parameter_file=None, parameters=None, parameter_database=None, overwrite_parameters=True)[source]
Updates the ParameterDatabase inside a Component
- Possible inputs:
parameter_file (string) parameters (dict) parameter_database (ParameterDatabase)
- class biocrnpyler.components.dna.promoter.CombinatorialPromoter(name, regulators, leak=False, assembly=None, transcript=None, length=0, mechanisms=None, parameters=None, protein=None, tx_capable_list=None, cooperativity=None, **keywords)[source]
A combinatorial promoter is something where binding multiple regulators result in qualitatively different transcription behaviour. For example, maybe it’s an AND gate promoter where it only transcribes if two regulators are bound, but not if either one is bound.
inputs
name: the name of the promoter regulators: a list of strings or species indicating all the possible regualtors that can bind
leak: if true, then a promoter with nothing bound will transcribe
assembly: a DNA_assembly object that contains this promoter
transcript: the transcript that this promoter makes
length: the length in nt? I don’t think this is used for anything at the moment
mechanisms: additional mechanisms. formatted with {“mechanism_type”:mechanismObject(),…}
parameters: promoter-specific parameters. Formatted as {(“identifier1”,”identifier2”):value,…}
- tx_capable_list: list of which combination of regulators bound will lead to transcription.
formatted as [[“regulator1”,”regulator2”],[“regulator1”],…] regulators can be strings or Species
cooperativity: a dictionary of cooperativity values. For example, {“regulator”:2,”regulator2”:1,….}
- add_mechanism(mechanism: Mechanism, mech_type=None, overwrite=False, optional_mechanism=False)[source]
adds a mechanism of type mech_type to the Component Mechanism dictionary.
- Parameters:
mechanism
mech_type
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- add_mechanisms(mechanisms: Mechanism | GlobalMechanism, overwrite=False, optional_mechanism=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
- Parameters:
mechanisms – Can take both GlobalMechanisms and Mechanisms
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- property compartment
The compartment of the Component.
- Returns:
Compartment
- enumerate_components(**keywords) List[source]
this is for component enumeration. Usually you will return a list of components that are copies of existing ones (first list) and new components (second list). For example, A DNA_construct makes a list of copies of its parts as the first output, and a list of RNA_constructs as the second output. An RNA_construct will make a list of copies of its parts as the first output, and a list of Protein components as its second output (if it makes any proteins)
- classmethod from_promoter(name, assembly, transcript, protein)[source]
Helper function to initialize a promoter instance from another promoter or str.
- Parameters:
name – either string or an other promoter instance
assembly
transcript
protein
- Returns:
Promoter instance
- get_mechanism(mechanism_type, optional_mechanism=False)[source]
Searches the Component for a Mechanism of the correct type.
If the Component does not have the mechanism, searches the Components’ Mixture for the Mechanism.
- Parameters:
mechanism_type
optional_mechanism – toggles whether an error is thrown if no mechanism is found
- Returns:
- get_orphan()[source]
returns a copy of this monomer, except with no parent. But it still has a position and direction
- get_parameter(param_name: str, part_id=None, mechanism=None, return_numerical=False, return_none=False, check_mixture=True) Parameter | Real[source]
Get a parameter from different objects that hold parameters.
- Hierarchy:
tries to find the Parameter in Component.parameter_database
tries to find the parameter in Component.mixture.parameter_database
- Parameters:
param_name
part_id
mechanism
return_numerical – numerical value or the parameter object is returned
return_none – returns None instead of throwing an error if a parameter isn’t found
check_mixture – toggle whether or not to check the Component’s Mixture as well
- Returns:
Parameter object or a Real number
- set_mixture(mixture) None[source]
Set the mixture the Component is in.
- Parameters:
mixture
- Returns:
None
- classmethod set_species(species: Species | str, material_type=None, compartment=None, attributes=None) Species[source]
Helper function that allows species to be set from strings, species, or Components
- Parameters:
species – Species, str, Component
material_type
compartment
attributes
- Returns:
Species
- update_component(internal_species=None, **keywords)[source]
returns a copy of this component, except with the proper fields updated
- class biocrnpyler.components.dna.promoter.Promoter(name, assembly=None, transcript=None, length=0, mechanisms=None, parameters=None, protein=None, dna_to_bind=None, **keywords)[source]
A basic Promoter class with no regulation. Needs to be included in a DNAassembly or DNAconstruct to function.
this represents a modular component sequence. These get compiled into working components
- add_mechanism(mechanism: Mechanism, mech_type=None, overwrite=False, optional_mechanism=False)[source]
adds a mechanism of type mech_type to the Component Mechanism dictionary.
- Parameters:
mechanism
mech_type
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- add_mechanisms(mechanisms: Mechanism | GlobalMechanism, overwrite=False, optional_mechanism=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
- Parameters:
mechanisms – Can take both GlobalMechanisms and Mechanisms
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- property compartment
The compartment of the Component.
- Returns:
Compartment
- enumerate_components(**keywords) List[source]
this is for component enumeration. Usually you will return a list of components that are copies of existing ones (first list) and new components (second list). For example, A DNA_construct makes a list of copies of its parts as the first output, and a list of RNA_constructs as the second output. An RNA_construct will make a list of copies of its parts as the first output, and a list of Protein components as its second output (if it makes any proteins)
- classmethod from_promoter(name, assembly, transcript, protein)[source]
Helper function to initialize a promoter instance from another promoter or str.
- Parameters:
name – either string or an other promoter instance
assembly
transcript
protein
- Returns:
Promoter instance
- get_mechanism(mechanism_type, optional_mechanism=False)[source]
Searches the Component for a Mechanism of the correct type.
If the Component does not have the mechanism, searches the Components’ Mixture for the Mechanism.
- Parameters:
mechanism_type
optional_mechanism – toggles whether an error is thrown if no mechanism is found
- Returns:
- get_orphan()[source]
returns a copy of this monomer, except with no parent. But it still has a position and direction
- get_parameter(param_name: str, part_id=None, mechanism=None, return_numerical=False, return_none=False, check_mixture=True) Parameter | Real[source]
Get a parameter from different objects that hold parameters.
- Hierarchy:
tries to find the Parameter in Component.parameter_database
tries to find the parameter in Component.mixture.parameter_database
- Parameters:
param_name
part_id
mechanism
return_numerical – numerical value or the parameter object is returned
return_none – returns None instead of throwing an error if a parameter isn’t found
check_mixture – toggle whether or not to check the Component’s Mixture as well
- Returns:
Parameter object or a Real number
- set_mixture(mixture) None[source]
Set the mixture the Component is in.
- Parameters:
mixture
- Returns:
None
- classmethod set_species(species: Species | str, material_type=None, compartment=None, attributes=None) Species[source]
Helper function that allows species to be set from strings, species, or Components
- Parameters:
species – Species, str, Component
material_type
compartment
attributes
- Returns:
Species
- update_component(internal_species=None, **keywords)[source]
returns a copy of this component, except with the proper fields updated
- class biocrnpyler.components.dna.promoter.RegulatedPromoter(name: str, regulators, leak=True, assembly=None, transcript=None, length=0, mechanisms=None, parameters=None, **keywords)[source]
A Promoter class with simple regulation. regulators = [list of species] Each regulator binds independently to the Promoter to regulate it.
this represents a modular component sequence. These get compiled into working components
- add_mechanism(mechanism: Mechanism, mech_type=None, overwrite=False, optional_mechanism=False)[source]
adds a mechanism of type mech_type to the Component Mechanism dictionary.
- Parameters:
mechanism
mech_type
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- add_mechanisms(mechanisms: Mechanism | GlobalMechanism, overwrite=False, optional_mechanism=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
- Parameters:
mechanisms – Can take both GlobalMechanisms and Mechanisms
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- property compartment
The compartment of the Component.
- Returns:
Compartment
- enumerate_components(**keywords) List[source]
this is for component enumeration. Usually you will return a list of components that are copies of existing ones (first list) and new components (second list). For example, A DNA_construct makes a list of copies of its parts as the first output, and a list of RNA_constructs as the second output. An RNA_construct will make a list of copies of its parts as the first output, and a list of Protein components as its second output (if it makes any proteins)
- classmethod from_promoter(name, assembly, transcript, protein)[source]
Helper function to initialize a promoter instance from another promoter or str.
- Parameters:
name – either string or an other promoter instance
assembly
transcript
protein
- Returns:
Promoter instance
- get_mechanism(mechanism_type, optional_mechanism=False)[source]
Searches the Component for a Mechanism of the correct type.
If the Component does not have the mechanism, searches the Components’ Mixture for the Mechanism.
- Parameters:
mechanism_type
optional_mechanism – toggles whether an error is thrown if no mechanism is found
- Returns:
- get_orphan()[source]
returns a copy of this monomer, except with no parent. But it still has a position and direction
- get_parameter(param_name: str, part_id=None, mechanism=None, return_numerical=False, return_none=False, check_mixture=True) Parameter | Real[source]
Get a parameter from different objects that hold parameters.
- Hierarchy:
tries to find the Parameter in Component.parameter_database
tries to find the parameter in Component.mixture.parameter_database
- Parameters:
param_name
part_id
mechanism
return_numerical – numerical value or the parameter object is returned
return_none – returns None instead of throwing an error if a parameter isn’t found
check_mixture – toggle whether or not to check the Component’s Mixture as well
- Returns:
Parameter object or a Real number
- set_mixture(mixture) None[source]
Set the mixture the Component is in.
- Parameters:
mixture
- Returns:
None
- classmethod set_species(species: Species | str, material_type=None, compartment=None, attributes=None) Species[source]
Helper function that allows species to be set from strings, species, or Components
- Parameters:
species – Species, str, Component
material_type
compartment
attributes
- Returns:
Species
- update_component(internal_species=None, **keywords)[source]
returns a copy of this component, except with the proper fields updated
- class biocrnpyler.components.dna.promoter.RepressiblePromoter(name, repressor, transcript=None, leak=False, **keywords)[source]
A class for a promoter which can be repressed by a single species, modelled as a negative hill function
this represents a modular component sequence. These get compiled into working components
- add_mechanism(mechanism: Mechanism, mech_type=None, overwrite=False, optional_mechanism=False)[source]
adds a mechanism of type mech_type to the Component Mechanism dictionary.
- Parameters:
mechanism
mech_type
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- add_mechanisms(mechanisms: Mechanism | GlobalMechanism, overwrite=False, optional_mechanism=False)[source]
This function adds a list or dictionary of mechanisms to the mixture.
- Parameters:
mechanisms – Can take both GlobalMechanisms and Mechanisms
overwrite – toggles whether the mechanism is added overwriting any mechanism with the same key.
optional_mechanism – toggles whether an error is thrown if a Mechanism is added that conflicts with an exising Mechanism
- Returns:
- property compartment
The compartment of the Component.
- Returns:
Compartment
- enumerate_components(**keywords) List[source]
this is for component enumeration. Usually you will return a list of components that are copies of existing ones (first list) and new components (second list). For example, A DNA_construct makes a list of copies of its parts as the first output, and a list of RNA_constructs as the second output. An RNA_construct will make a list of copies of its parts as the first output, and a list of Protein components as its second output (if it makes any proteins)
- classmethod from_promoter(name, assembly, transcript, protein)[source]
Helper function to initialize a promoter instance from another promoter or str.
- Parameters:
name – either string or an other promoter instance
assembly
transcript
protein
- Returns:
Promoter instance
- get_mechanism(mechanism_type, optional_mechanism=False)[source]
Searches the Component for a Mechanism of the correct type.
If the Component does not have the mechanism, searches the Components’ Mixture for the Mechanism.
- Parameters:
mechanism_type
optional_mechanism – toggles whether an error is thrown if no mechanism is found
- Returns:
- get_orphan()[source]
returns a copy of this monomer, except with no parent. But it still has a position and direction
- get_parameter(param_name: str, part_id=None, mechanism=None, return_numerical=False, return_none=False, check_mixture=True) Parameter | Real[source]
Get a parameter from different objects that hold parameters.
- Hierarchy:
tries to find the Parameter in Component.parameter_database
tries to find the parameter in Component.mixture.parameter_database
- Parameters:
param_name
part_id
mechanism
return_numerical – numerical value or the parameter object is returned
return_none – returns None instead of throwing an error if a parameter isn’t found
check_mixture – toggle whether or not to check the Component’s Mixture as well
- Returns:
Parameter object or a Real number
- set_mixture(mixture) None[source]
Set the mixture the Component is in.
- Parameters:
mixture
- Returns:
None
- classmethod set_species(species: Species | str, material_type=None, compartment=None, attributes=None) Species[source]
Helper function that allows species to be set from strings, species, or Components
- Parameters:
species – Species, str, Component
material_type
compartment
attributes
- Returns:
Species
- update_component(internal_species=None, **keywords)[source]
returns a copy of this component, except with the proper fields updated
- update_parameters(parameter_file=None, parameters=None, parameter_database=None, overwrite_parameters=True)[source]
Updates the ParameterDatabase inside a Component
- Possible inputs:
parameter_file (string) parameters (dict) parameter_database (ParameterDatabase)