MHCXGraph.utils.preprocessing.get_exposed_residues

MHCXGraph.utils.preprocessing.get_exposed_residues(graph: Graph, rsa_filter: float, asa_filter: float, selection_params=None) Graph[source]

Generate a filtered subgraph containing exposed residues.

The function creates a residue subgraph based on solvent exposure criteria and optional structural or logical filters defined in the manifest.

Parameters:
  • graph (Graph) – Graph representation of the protein structure.

  • rsa_filter (float) – Relative solvent accessibility threshold.

  • asa_filter (float) – Absolute solvent accessibility threshold.

  • selection_params (dict[str, Any], optional) – Additional selection constraints such as chains, residues, secondary structure elements, or logical expressions.

Returns:

subgraph – Filtered graph containing the selected residues.

Return type:

networkx.Graph

Raises:

Exception – If no residues satisfy the filtering conditions.