cool_seq_tool.utils#

Provide a small set of general helper functions.

cool_seq_tool.utils.get_inter_residue_pos(start_pos, end_pos, residue_mode)[source]#

Return equivalent inter-residue position.

Generally, we prefer to work with inter-residue coordinates where possible. Our rationale is detailed in an appendix to the VRS docs. This function is used internally to shift user-provided coordinates accordingly.

>>> from cool_seq_tool.utils import get_inter_residue_pos
>>> from cool_seq_tool.schemas import ResidueMode
>>> get_inter_residue_pos(10, ResidueMode.RESIDUE)
((9, 9), None)
Parameters:
  • start_pos (int) – Start position

  • end_pos (int) – End position

  • residue_mode (ResidueMode) – Residue mode for start_pos and end_pos

Return type:

Tuple[int, int]

Returns:

Inter-residue coordinates

cool_seq_tool.utils.service_meta()[source]#

Return description of request and service, including parameters like software version for reproducibility.

Return type:

ServiceMeta

Returns:

ServiceMeta object