MHCXGraph.utils.tools.create_coherent_matrices

MHCXGraph.utils.tools.create_coherent_matrices(nodes, matrices: dict, maps: dict, threshold: float | dict = 3.0)[source]

Compute coherence matrices across proteins using a memory-efficient streaming approach.

Parameters:
  • nodes (list) – Node index lists representing aligned nodes across proteins.

  • matrices (dict) – Dictionary containing distance matrices.

  • maps (dict) – Residue mapping dictionary.

  • threshold (float or dict, default=3.0) – Distance difference threshold used to determine coherence.

Returns:

  • new_matrices (dict) – Dictionary containing coherence masks and standard deviation matrices.

  • maps (dict) – Updated node mapping dictionary.