biocrnpyler.components.construct_explorer

Classes

ConstructExplorer(name[, direction, ...])

TlExplorer([name, direction, ...])

TxExplorer([name, direction, ...])

class biocrnpyler.components.construct_explorer.ConstructExplorer(name, direction='forward', possible_directions=('forward', 'reverse'))[source]
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:
componentComponent, optional

The input component to enumerate from. Can be None for enumerators that do not require an input component.

Returns:
list of Component

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

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.

reset_enumerator()[source]

Clear accumulator variables from the numerator.

MUST BE SUBCLASSED

class biocrnpyler.components.construct_explorer.TlExplorer(name='TlExplorer', direction='forward', possible_directions=('forward',))[source]
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:
componentComponent, optional

The input component to enumerate from. Can be None for enumerators that do not require an input component.

Returns:
list of Component

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

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

class biocrnpyler.components.construct_explorer.TxExplorer(name='TxExplorer', direction='forward', possible_directions=('forward', 'reverse'))[source]
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:
componentComponent, optional

The input component to enumerate from. Can be None for enumerators that do not require an input component.

Returns:
list of Component

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

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