biocrnpyler.components.TxExplorer

class biocrnpyler.components.TxExplorer(name='TxExplorer', direction='forward', possible_directions=('forward', 'reverse'))[source]

Bases: ConstructExplorer

Methods

check_loop

Check for loops in plasmids (?).

enumerate_components

Enumerate new components from an input component.

initialize_loop

iterate_part

The explorer sees a dna_part.

reset_enumerator

Clear accumulator variables from the numerator.

return_components

terminate_loop

check_loop()[source]

Check for loops in plasmids (?).

If we already went around the plasmid, then what we’re checking for is continuing transcripts or proteins. We do not want to start making new transcripts because we already checked this area for promoters.

enumerate_components(component, previously_enumerated=None)[source]

Enumerate new components from an input component.

This method creates new components based on the input component. The base implementation returns an empty list and issues a warning. Subclasses should override this method to provide specific enumeration behavior.

Parameters:

component (Component, optional) – The input component to enumerate from. Can be None for enumerators that do not require an input component.

Returns:

List of newly enumerated components. Base implementation returns an empty list.

Return type:

list of Component

Warns:

UserWarning – Issues a warning when the default implementation is called, indicating that a subclass should override this method.

See also

Component.enumerate_components

Component-level enumeration method.

Notes

This method is called during CRN compilation as part of the component enumeration phase. Subclasses should implement specific logic to generate derived components.

iterate_part(part, reading_direction)[source]

The explorer sees a dna_part.

  1. it calculates effective direction of part relative to transcription direction

  2. it adds parts to growing transcripts

  3. it makes new transcripts and terminates growing transcripts.

reset_enumerator()[source]

Clear accumulator variables from the numerator.

MUST BE SUBCLASSED