alleleTools.plot.graph_phewas module
PheWAS Visualization Module.
This module provides functionality to create PheWAS (Phenome-Wide Association Study) Manhattan plots for HLA alleles. It processes data from the PheWAS catalog and generates publication-quality visualizations showing disease associations across different phenotype categories.
Data source: https://phewascatalog.org/phewas/#hla The input file should be downloaded from the PheWAS catalog.
Author: Nicolás Mendoza Mejía (2025)
- alleleTools.plot.graph_phewas.call_function(args)[source]
Execute PheWAS plot generation.
- Parameters:
args – Parsed command line arguments containing: - input: Path to PheWAS catalog CSV file - output: Path to output image file - allele_name: Name of allele for plot title
- alleleTools.plot.graph_phewas.create_phewas_plot(input_file: str, output_file: str, figsize: Tuple[float, float] = (15, 6), significance_threshold: float = 1e-05, allele_name: str = '')[source]
Create a PheWAS Manhattan plot from PheWAS catalog data.
Generates a Manhattan plot showing disease associations for an HLA allele across different phenotype categories. Points are colored by category and sized by significance level.
- Parameters:
input_file (str) – Path to CSV file from PheWAS catalog
output_file (str) – Path for output image file
figsize (Tuple[int, ...]) – Figure size in inches (default: (15, 6))
significance_threshold (float) – P-value threshold for significance line (default: 1e-5)
allele_name (str) – Allele name to include in plot title (default: ‘’)
Note
Input CSV should contain columns: ‘phecode’, ‘phenotype’, ‘p’, ‘category’ as provided by the PheWAS catalog (https://phewascatalog.org/phewas/#hla)