Runs full computational-pathology workflows with PathML: whole-slide-image analysis, multiplexed immunofluorescence (CODEX, Vectra, MERFISH), nucleus segmentation/classification (HoVer-Net, HACTNet), tissue/cell-graph construction, HDF5 dataset management, and deep-learning model training.
PathML is a comprehensive Python toolkit for computational pathology workflows, designed to facilitate machine learning and image analysis for whole-slide pathology images. The framework provides modular, composable tools for loading diverse slide formats, preprocessing images, constructing spatial graphs, training deep learning models, and analyzing multiparametric imaging data from technologies like CODEX and multiplex immunofluorescence.
Apply this skill for:
| Scenario | Use Instead |
|---|---|
| Lightweight H&E preprocessing, tissue masking, Random/Grid/Score tile extraction | alterlab-histolab |
| Spatial transcriptomics neighborhood stats on Visium/Xenium/MERFISH tables | alterlab-squidpy-spatial |
| Single-cell expression analysis of the resulting cell x marker matrix | alterlab-scanpy |
| Training a general vision model with no pathology-specific I/O or transforms | alterlab-pytorch-lightning |
| Graph neural networks on a graph you already built | alterlab-torch-geometric |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-histolab) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
PathML provides six major capability areas documented in detail within reference files:
Load whole-slide images from 160+ proprietary formats including Aperio SVS, Hamamatsu NDPI, Leica SCN, Zeiss ZVI, DICOM, and OME-TIFF. PathML automatically handles vendor-specific formats and provides unified interfaces for accessing image pyramids, metadata, and regions of interest.
See: references/image_loading.md for supported formats, loading strategies, and working with different slide types.
Build modular preprocessing pipelines by composing transforms for image manipulation, quality control, stain normalization, tissue detection, and mask operations. PathML's Pipeline architecture enables reproducible, scalable preprocessing across large datasets.
Key transforms:
StainNormalizationHE - Macenko/Vahadane stain normalizationTissueDetectionHE, NucleusDetectionHE - Tissue/nucleus segmentationMedianBlur, GaussianBlur - Noise reductionLabelArtifactTileHE - Quality control for artifactsSee: references/preprocessing.md for complete transform catalog, pipeline construction, and preprocessing workflows.
Construct spatial graphs representing cellular and tissue-level relationships. Extract features from segmented objects to create graph-based representations suitable for graph neural networks and spatial analysis.
See: references/graphs.md for graph construction methods, feature extraction, and spatial analysis workflows.
Train and deploy deep learning models for nucleus detection, segmentation, and classification. PathML integrates PyTorch with pre-built models (HoVer-Net, HACTNet), custom DataLoaders, and ONNX support for inference.
Key models:
See: references/machine_learning.md for model training, evaluation, inference workflows, and working with public datasets.
Analyze spatial proteomics and gene expression data from CODEX, Vectra, MERFISH, and other multiplex imaging platforms. PathML provides specialized slide classes and transforms for processing multiparametric data, cell segmentation with Mesmer, and quantification workflows.
See: references/multiparametric.md for CODEX/Vectra workflows, cell segmentation, marker quantification, and integration with AnnData.
Efficiently store and manage large pathology datasets using HDF5 format. PathML handles tiles, masks, metadata, and extracted features in unified storage structures optimized for machine learning workflows.
See: references/data_management.md for HDF5 integration, tile management, dataset organization, and batch processing strategies.
PathML needs native dependencies present first — OpenSlide and a JDK (Bio-Formats is driven through JPype/javabridge) — so the maintainers recommend a conda environment; pure-pip installs commonly fail on those native deps.
Give PathML its own environment, because 3.0.8 pins much of the scientific stack to exact or upper-bounded versions:
| Pinned by PathML 3.0.8 | Current elsewhere |
|---|---|
numpy<2 | 2.5.x |
pandas<=2.1.4 | 3.0.x |
scanpy==1.9.6, anndata<=0.10.3 | scanpy 1.12.x, anndata 0.13.x |
scikit-image<=0.22.0, networkx<=3.2.1, h5py==3.10.0 | all newer |
torch==2.12.0, torch-geometric==2.8.0 | torch 2.14.x |
Installing PathML next to alterlab-scanpy or alterlab-squidpy-spatial will either fail to
resolve or silently downgrade those skills' stack. Move results between environments as files
(HDF5/AnnData written by PathML, read by a current-scanpy env) rather than trying to satisfy
both pin sets.
# In a dedicated env, with OpenSlide and a JDK already installed.
uv venv .venv-pathml && source .venv-pathml/bin/activate
uv pip install pathml
from pathml.core import HESlide
from pathml.preprocessing import Pipeline, StainNormalizationHE, TissueDetectionHE
# Load a whole-slide image. Use the HESlide convenience class for H&E,
# or SlideData(filepath=..., slide_type=types.HE) for the generic constructor.
# (There is no SlideData.from_slide.)
wsi = HESlide("path/to/slide.svs", name="example")
# Create preprocessing pipeline
pipeline = Pipeline([
TissueDetectionHE(),
StainNormalizationHE(target="normalize", stain_estimation_method="macenko"),
])
# Run the pipeline on the slide (SlideData.run handles tiling + transforms)
wsi.run(pipeline)
# Access processed tiles
for tile in wsi.tiles:
processed_image = tile.image
tissue_mask = tile.masks["tissue"]
H&E Image Analysis:
Multiparametric Imaging (CODEX):
CODEXSlideCollapseRunsCODEXSegmentMIF (Mesmer)QuantifyMIFslide.counts for single-cell analysisTraining ML Models:
pathml.datasets DataModule (e.g. PanNukeDataModule) or a TileDatasetHoVerNet (or another model) with a standard PyTorch looppost_process_batch_hovernetLoad the relevant reference for detailed API, workflows, and gotchas:
references/image_loading.md - WSI formats, slide classes, loading strategiesreferences/preprocessing.md - transform catalog, pipeline construction, stain normalizationreferences/graphs.md - graph builders, feature extraction, spatial analysisreferences/machine_learning.md - HoVer-Net/HACTNet, training, datasets, ONNX inferencereferences/multiparametric.md - CODEX/Vectra/multiplex IF, cell segmentation, quantificationreferences/data_management.md - h5path storage, tile management, batch processingPathML's API surface shifts between releases; treat the reference code as workflow scaffolding and confirm exact class/method names against the version you have installed (python -c "import pathml; print(pathml.__version__)") and the official API docs at https://pathml.readthedocs.io/.
evals/evals.json (opens in a new tab)references/data_management.md (opens in a new tab)references/graphs.md (opens in a new tab)references/image_loading.md (opens in a new tab)references/machine_learning.md (opens in a new tab)references/multiparametric.md (opens in a new tab)references/preprocessing.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite./alterlab-accreditation-aolScaffolds program-level Assurance-of-Learning (AoL) documentation for AACSB (Standard 5 in the 2020 standards and the 2026 Global Standards) and ABET (Criterion 3 Student Outcomes, Criterion 4 Continuous Improvement) accreditation — program learning outcomes / competency goals, curriculum-to-outcome mapping matrices, direct- and indirect-assessment plans, rubric design, and closing-the-loop continuous-improvement narratives — and validates the structure of an outcome-mapping matrix with scripts/aol_matrix.py. Use when the user needs AACSB or ABET assurance-of-learning material, a program-learning-outcomes set, a curriculum/outcome map or coverage matrix, a direct/indirect assessment plan, a closing-the-loop report, or accreditation self-study text. For single-course design or course rubrics prefer alterlab-teaching-design; for post-award grant reports prefer alterlab-grant-reporting. Part of the AlterLab Academic Skills suite./alterlab-adaptyvPrepares and validates Adaptyv Bio Foundry protein-testing submissions with no account — optimizes and pre-screens sequences locally (NetSolP/SoluProt heuristics, SolubleMPNN, ESM), assembles the experiment payload, and validates it offline against the Foundry's own type/method/sequence rules so it is ready and correct before it costs anything. Submitting to the Foundry, browsing the target catalog, tracking status and retrieving results run through the Foundry API with the user's own ADAPTYV_API_KEY (experiments cost money and take weeks). Use when designing proteins for wet-lab validation (binding/affinity, expression, thermostability, fluorescence), preparing or validating a Foundry submission, pre-screening sequences, or tracking an Adaptyv experiment. Triggers on "Adaptyv", "Foundry API", "cloud lab", "biolayer interferometry / BLI", "wet-lab validation". Part of the AlterLab Academic Skills suite./alterlab-aeonRuns time series machine learning with the aeon library — classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search via scikit-learn compatible APIs. Use when working with temporal data, sequential patterns, or time-indexed observations (univariate or multivariate) that need specialized algorithms beyond standard ML approaches. Part of the AlterLab Academic Skills suite./alterlab-ai-use-disclosureHelps faculty and researchers disclose generative-AI use and comply with the rules for manuscripts, grant proposals, peer review, theses and figures. Walks a venue → policy → placement decision tree over policies verified on 2026-09-23 (ICMJE, Springer Nature/Nature, Elsevier, Wiley, Taylor & Francis, Sage, IEEE, PLOS, arXiv; NIH NOT-OD-25-132 and NOT-OD-23-149, NSF, UKRI, ERC, TÜBİTAK; YÖK's 2024 ethics guide; EU AI Act Article 50), drafts English and Turkish statements, and ships scripts/disclosure_builder.py to emit a statement plus warnings where a policy forbids the use. Use when the request mentions an AI or ChatGPT disclosure or declaration, whether and where AI use must be declared, AI in peer review or grant review, AI-generated figures, AI rules for a thesis, or 'yapay zekâ kullanım beyanı'. For course AI policies and APA/MLA citations of ChatGPT prefer alterlab-syllabus-ai-policy; for writing the paper itself prefer alterlab-scientific-writing. Part of the AlterLab Academic Skills suite.Other plugins' skills for the same job