ovo.app.components.molstar_custom_component.contigs_parser¶
Module Contents¶
Classes¶
Class for parsing the contigs definition. |
API¶
- class ovo.app.components.molstar_custom_component.contigs_parser.ContigsParser¶
Class for parsing the contigs definition.
- get_chain_and_indices_fixed_region(region: str)¶
Get the chain and region residue indices. e.g.: From A123-131 return (A, 123, 131).
- get_output_chain(has_generated_before_chain_break: bool)¶
Get the output chain. Currently, we assume that anything with a “generated region” until there is a chain break results in chain A, otherwise returns chain B.
- parse_region_generated(region: str, last_parsed_res: int, has_generated_before_chain_break: bool)¶
Parse regions that are defined to be generated by RFdiffusion.
- parse_region_fixed_no_mapping(region: str)¶
Parse fixed regions with an identity mapping.
- parse_region_fixed(region: str, ref_indices: list[list[Union[str, numpy.int64, bool]]], new_indices: list[list[Union[str, numpy.int64, bool]]], has_generated_before_chain_break: bool)¶
Parse fixed regions with corresponding mapping defined in the .trb file.
- parse_contigs_str(contigs_string: str = '', include_generated=False) list[ovo.app.components.molstar_custom_component.dataclasses.ContigSegment]¶
- parse_contigs_trb(contigs_trb: str | dict = '') list[ovo.app.components.molstar_custom_component.dataclasses.ContigSegment]¶
Parse the contigs from a given .trb file or .trb parsed dictionary. Can be either an http(s) URL, a system path to the .trb file or parsed .trb file content directly (checked in this order).
- _parse_contigs_with_tuples(contigs: str, mapped_tuples: list = [], reference_tuples: list = [], include_generated=True) list[ovo.app.components.molstar_custom_component.dataclasses.ContigSegment]¶
Parse the contigs from the .trb file. If no .trb file path is defined, then the parser treats fixed regions with no mapping.
Parameters
contigs: str Contigs string definition (e.g.: A30-54/10/A70-75). mapped_tuples: list Mapped residues from the .trb contigs definition. reference_tuples: list Mapped reference residues from the .trb contigs definition.Returns
Parsed contig regions