MHCXGraph.utils.analysis.node_similarity_for_protein

MHCXGraph.utils.analysis.node_similarity_for_protein(frame: dict[str, Any], original_graphs: dict[str, Any], protein_keys: list[str], p: int) dict[str, Any] | None[source]

Compute node coverage metrics for a single protein in one frame.

Parameters:
  • frame (dict) – Frame entry from the JSON payload built from AssociatedGraph.

  • original_graphs (dict) – Mapping from protein key to original graph data.

  • protein_keys (list of str) – Ordered protein keys.

  • p (int) – Index of the protein to evaluate.

Returns:

Coverage metrics for this protein and frame, or None if there are no nodes.

Return type:

dict or None