sbol_utilities.calculate_sequences

Module Contents

Functions

calculate_sequences(doc: sbol3.Document) → List[sbol3.Sequence]

Attempt to calculate missing sequences of Components from their features

compute_sequence(component: sbol3.Component) → sbol3.Sequence

Compute the sequence of a component and add this information into the Component in place

main()

Main wrapper: read from input file, invoke calculate_sequences, then write to output file

order_subcomponents(component: sbol3.Component) → Union[Tuple[List[sbol3.Feature], bool], None]

Attempt to find a sorted order of features in an SBOL Component, so its sequence can be calculated from theirs

ready_to_resolve(component: sbol3.Component, resolved: Iterable[str])

resolved_dna_component(component: sbol3.Component) → bool

Check if a DNA component still needs its sequence calculated

calculate_sequences(doc: sbol3.Document) List[sbol3.Sequence]

Attempt to calculate missing sequences of Components from their features

Parameters

doc – Document where sequences will be calculated

Returns

list of newly computed sequences

compute_sequence(component: sbol3.Component) sbol3.Sequence

Compute the sequence of a component and add this information into the Component in place

Parameters

component – Component whose sequence is to be computed

Returns

Sequence that has been computed

main()

Main wrapper: read from input file, invoke calculate_sequences, then write to output file

order_subcomponents(component: sbol3.Component) Union[Tuple[List[sbol3.Feature], bool], None]

Attempt to find a sorted order of features in an SBOL Component, so its sequence can be calculated from theirs Conduct the sort by walking through one meet relation at a time (excepting a circular component)

Parameters

component – Component whose features are to be oreered

Returns

if the features can be ordered, return a list of features in the order that they should be joined and

a boolean indicating if it’s circular. If the features cannot be ordered, return None

ready_to_resolve(component: sbol3.Component, resolved: Iterable[str])
resolved_dna_component(component: sbol3.Component) bool

Check if a DNA component still needs its sequence calculated

Parameters

component – SBOL Component to check

Returns

True if it has a DNa sequence; false otherwise