sequence_expansion
Position-safe expansion and reduction for semicolon-separated protein sequences.
Module Contents
- class sequence_expansion.ExpandedSequence
One protein-sequence candidate from an input row.
- class sequence_expansion.SequenceExpansionPlan
A positional mapping from input rows to split protein sequences.
- class sequence_expansion.TargetPredictionUnit
One flattened engine input unit after sequence/substrate adaptation.
- class sequence_expansion.TargetExpansionPlan
Position-safe mapping between engine units and original reaction rows.
- sequence_expansion.split_sequence_list(value: Any) list[str]
Split a semicolon-separated protein list, trimming empty fragments.
- sequence_expansion.count_multi_sequence_rows(values: Iterable[Any]) int
Return the number of rows containing more than one protein token.
- sequence_expansion.reduce_sequence_predictions(*, plan: TargetExpansionPlan, target: str, child_predictions: Sequence[Any], child_sources: Sequence[str], child_errors: dict[int, str] | None, child_details: Sequence[str] | None, reaction_count: int) ReducedSequenceResults
Reduce flattened sequence/substrate child results back to input rows.