biocrnpyler.components.dna.misc

Classes

DNABindingSite(name, binders[, ...])

an integrase attachment site binds to integrase

IntegraseSite(name[, site_type, integrase, ...])

an integrase attachment site binds to integrase

Operator(name[, binder])

an operator does nothing except look right when plotted

Origin(name, **keywords)

an origin does nothing except look right when plotted

UserDefined(name[, dpl_type])

a user defined part is a part that doesn't do anything, just exists as a label basically

class biocrnpyler.components.dna.misc.DNABindingSite(name, binders, no_stop_codons=None, assembly=None, **keywords)[source]

an integrase attachment site binds to integrase

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:

clone(position, direction, parent_dna)[source]

this defines where the part is in what piece of DNA

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_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:
  1. tries to find the Parameter in Component.parameter_database

  2. 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

get_species() None[source]

The subclasses should implement this method!

Returns:

None

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

unclone()[source]

removes the current part from anything

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)

update_reactions()[source]

The subclasses should implement this method!

Returns:

empty list

update_species()[source]

The subclasses should implement this method!

Returns:

empty list

class biocrnpyler.components.dna.misc.IntegraseSite(name, site_type='attB', integrase='int1', dinucleotide=1, no_stop_codons=None, integrase_binding=True, **keywords)[source]

an integrase attachment site binds to integrase

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:

clone(position, direction, parent_dna)[source]

this defines where the part is in what piece of DNA

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_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:
  1. tries to find the Parameter in Component.parameter_database

  2. 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

get_species() None[source]

The subclasses should implement this method!

Returns:

None

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

unclone()[source]

removes the current part from anything

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)

update_reactions()[source]

The subclasses should implement this method!

Returns:

empty list

update_species()[source]

The subclasses should implement this method!

Returns:

empty list

class biocrnpyler.components.dna.misc.Operator(name, binder=None, **keywords)[source]

an operator does nothing except look right when plotted

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:

clone(position, direction, parent_dna)[source]

this defines where the part is in what piece of DNA

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_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:
  1. tries to find the Parameter in Component.parameter_database

  2. 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

get_species() None[source]

The subclasses should implement this method!

Returns:

None

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

unclone()[source]

removes the current part from anything

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)

update_reactions()[source]

The subclasses should implement this method!

Returns:

empty list

update_species()[source]

The subclasses should implement this method!

Returns:

empty list

class biocrnpyler.components.dna.misc.Origin(name, **keywords)[source]

an origin does nothing except look right when plotted

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:

clone(position, direction, parent_dna)[source]

this defines where the part is in what piece of DNA

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_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:
  1. tries to find the Parameter in Component.parameter_database

  2. 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

get_species() None[source]

The subclasses should implement this method!

Returns:

None

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

unclone()[source]

removes the current part from anything

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)

update_reactions()[source]

The subclasses should implement this method!

Returns:

empty list

update_species()[source]

The subclasses should implement this method!

Returns:

empty list

class biocrnpyler.components.dna.misc.UserDefined(name, dpl_type=None, **keywords)[source]

a user defined part is a part that doesn’t do anything, just exists as a label basically

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:

clone(position, direction, parent_dna)[source]

this defines where the part is in what piece of DNA

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_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:
  1. tries to find the Parameter in Component.parameter_database

  2. 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

get_species() None[source]

The subclasses should implement this method!

Returns:

None

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

unclone()[source]

removes the current part from anything

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)

update_reactions()[source]

The subclasses should implement this method!

Returns:

empty list

update_species()[source]

The subclasses should implement this method!

Returns:

empty list