biocrnpyler.components.membrane
Classes
|
A class to represent transmembrane proteins or integral membrane proteins. |
|
A class to represent transmembrane proteins or integral membrane proteins. |
|
A class to represent membrane channels. |
|
A class to represent membrane pumps or transporters that require ATP. |
|
A class to represent a two-component system (TCS) membrane sensor. |
- class biocrnpyler.components.membrane.DiffusibleMolecule(substrate: Species | str | Component, internal_compartment: str | Compartment = 'Internal', external_compartment: str | Compartment = 'External', attributes=None, **keywords)[source]
A class to represent transmembrane proteins or integral membrane proteins. This membrane class is to classify a membrane channel that will intergrate into the membrane. By default, a DiffusibleMolecule uses a mechanism called “diffusion”.
Initialize a DiffusibleMolecule object to store molecule/substance related information. :param substrate: name of the diffusible substrate, reference to an Species or Component :param internal_compartment: name of internal compartment :param external_compartment: name of external compartment :param attributes: Species attribute, passed to Component :param keywords: pass into the parent’s (Component) initializer
- 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)
- 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_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
- class biocrnpyler.components.membrane.IntegralMembraneProtein(membrane_protein: Species | str | Component, product: Species | str | Component, direction: str = None, size: int = None, compartment: str | Compartment = 'Internal', membrane_compartment: str | Compartment = 'Membrane', attributes=None, **keywords)[source]
A class to represent transmembrane proteins or integral membrane proteins. This membrane class is to classify a membrane channel that will intergrate into the membrane. Uses a mechanism called “membrane_insertion”. Size is used to indicate number of repeating components to create oligomer. Dimer = 2, Trimers = 3, etc.
Initialize a IntegralMembraneProtein object to store membrane channel related information. :param product: name of the membrane channel, reference to an Species or Component :param direction: transport direction (str), set to “Passive” by default, undirectional unless specified :param size: number of monomers needed for channel used in Membrane_Protein_Integration(Mechanism) :param internal_compartment: name of internal compartment :param membrane_compartment: name of membrane compartment :param attributes: Species attribute. :param keywords: pass into the parent’s (Component) initializer
- 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)
- 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_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
- class biocrnpyler.components.membrane.MembraneChannel(integral_membrane_protein: Species | str | Component, substrate: Species | str | Component, direction: str = None, internal_compartment: str | Compartment = 'Internal', external_compartment: str | Compartment = 'External', attributes=None, **keywords)[source]
A class to represent membrane channels.
The membrane channel transports substrates across the membrane following the concentration gradient. Direction and mechanism will be based on the specific transporter.
Uses a mechanism called “transport”.
Initialize a MembraneChannel object to store transport membrane related information.
- Parameters:
substrate – substrate to be transported (str, Species, Component)
direction – direction of transport based on transporter action
internal_compartment – name of internal compartment
external_compartment – name of external compartment
attributes – Species attribute
keywords – pass into the parent’s (Component) initializer
- 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)
- 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_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
- class biocrnpyler.components.membrane.MembranePump(membrane_pump: Species | str | Component, substrate: Species | str | Component, direction: str = None, internal_compartment: str | Compartment = 'Internal', external_compartment: str | Compartment = 'External', ATP: int = None, attributes=None, **keywords)[source]
A class to represent membrane pumps or transporters that require ATP. The membrane pump transports substrates unidirectionally across the membrane, independent of the concentration gradient. Uses a mechanism called “transport”.
Initialize a MembranePump object to store Transport membrane related information. :param substrate: name of the substrate, reference to an Species or Component :param direction: give direction of transport ref to vesicle :param internal_compartment: name of internal compartment :param external_compartment: name of external compartment :param ATP: indicates the number of ATP required for transport :param attributes: Species attribute :param keywords: pass into the parent’s (Component) initializer
- 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)
- 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_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
- class biocrnpyler.components.membrane.MembraneSensor(membrane_sensor_protein: Species | str | Component, response_protein: Species | str | Component, assigned_substrate: Species | str | Component, signal_substrate: Species | str | Component, product: Species | str | Component = None, internal_compartment: str | Compartment = 'Internal', external_compartment: str | Compartment = 'External', ATP: int = 2, attributes=None, **keywords)[source]
A class to represent a two-component system (TCS) membrane sensor. The membrane sensor protein senses the signal substrate and added the assigned substrate to the response protein. Uses a mechanism called “membrane_sensor”.
Initialize a MembraneSensor object to store Transport membrane related information. :param membrane_sensor_protein: name of the membrane protein in the TCS, reference to an Species or Component :param response_protein: name of the response protein in the TCS, reference to an Species or Component :param assigned_substrate: name of the assigned substrate in the TCS, reference to an Species or Component :param signal_substrate: name of the signal substrate in the TCS, reference to an Species or Component :param product: name of the product in the TCS, reference to an Species or Component :param internal_compartment: name of internal compartment :param external_compartment: name of external compartment :param ATP: indicates the number of ATP required for transport :param attributes: Species attribute :param keywords: pass into the parent’s (Component) initializer
- 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)
- 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_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