MHCXGraph.scripts.create_heatmaps¶
Generate clustered heatmaps for MHCXGraph component-count results.
SciPy’s experimental Array API backend support is explicitly disabled before SciPy or Seaborn is imported. All arrays passed to SciPy are converted to NumPy ndarrays, so this module does not use PyTorch.
- MHCXGraph.scripts.create_heatmaps.build_component_matrix(comp_df)[source]¶
Build a symmetric matrix containing total component-node counts.
- MHCXGraph.scripts.create_heatmaps.build_ratio_matrix(comp_df)[source]¶
Build a symmetric similarity matrix with a diagonal of 1.0.
- MHCXGraph.scripts.create_heatmaps.calculate_linkage(distance_dataframe)[source]¶
Calculate average-linkage hierarchical clustering with SciPy.
The explicit NumPy conversion prevents alternative array backends from being selected even if a caller supplied another array-like object.
- MHCXGraph.scripts.create_heatmaps.create_distance_matrix(csv_path)[source]¶
Create a symmetric dissimilarity matrix from pairwise similarity ratios.
- MHCXGraph.scripts.create_heatmaps.create_heatmap(args)[source]¶
Generate the clustered heatmap and its supporting CSV matrices.
- MHCXGraph.scripts.create_heatmaps.extract_original_graph_info(file_path)[source]¶
Read original graph sizes and protein names from a graph JSON file.
- MHCXGraph.scripts.create_heatmaps.extract_unique_aminoacids(file_path)[source]¶
Extract unique residues per component and consolidate totals per protein.
- MHCXGraph.scripts.create_heatmaps.process_directories(directory_path, output_path)[source]¶
Process graph JSON files and create the component-count CSV files.
Functions¶
|
Build a symmetric matrix containing total component-node counts. |
|
Build a symmetric similarity matrix with a diagonal of 1.0. |
|
Calculate average-linkage hierarchical clustering with SciPy. |
|
Create a symmetric dissimilarity matrix from pairwise similarity ratios. |
|
Generate the clustered heatmap and its supporting CSV matrices. |
|
Read original graph sizes and protein names from a graph JSON file. |
|
Extract unique residues per component and consolidate totals per protein. |
|
|
|
Process graph JSON files and create the component-count CSV files. |