MHCXGraph.utils.tools.convert_edges_to_residues

MHCXGraph.utils.tools.convert_edges_to_residues(edges: set[frozenset], maps: dict) tuple[list, list, list][source]

Convert edge representations from node indices to residue labels.

Parameters:
  • edges (set[frozenset]) – Set of edges represented as frozensets of node indices.

  • maps (dict) –

    Mapping structure containing: - residue_maps_unique : dict[int, tuple]

    Mapping from node index to residue tuple.

    • possible_nodesdict

      Mapping from node index to node tuple.

Returns:

  • original_edges (list) – Original edge objects as provided in the input set.

  • edges_indices (list[tuple]) – Edge representation using tuples of node indices.

  • converted_edges (list[tuple]) – Edge representation where node indices are converted to residue labels of the form "CHAIN:RESNAME:RESNUM".