Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

ALMA v2

Use ALMA3 for new classification analyses

ALMA v3 is now available in the ALMA3 repository.

This repository contains ALMA v2 (legacy), preserved for reproducing earlier results.

Nat Commun Downloads Python versions Docker pulls Research Use Only

Epigenomic diagnosis of acute leukemias and prognosis of AML.

Models

  1. ALMA Subtype: Classifies 27 subtypes of acute leukemia according to WHO 2022 + healthy control
  2. 38CpG AML Signature: Risk stratification using targeted 38 CpG panel
  3. AML Epigenomic Risk (v0.1.4 only): Predicts 5-year mortality probability for AML patients

What's New

  • ALMA Subtype v2
    • Autoencoder–transformer architecture
    • Near-perfect accuracy across methylation arrays and nanopore epigenomes
    • v0.1.4 classifiers (from the publication) remain available in pip and docker.

Installation

docker pull fmarchi/alma-classifier:0.2.1

Python 3.11

pip install --extra-index-url https://download.pytorch.org/whl/cpu "torch==2.8.0+cpu"
pip install alma-classifier

If you have a CUDA-enabled system, want GPU acceleration, and don't mind the extra dependency weight, install the matching CUDA build instead with pip install torch>=2.8.0.

Usage

Docker

Run demo:

docker run --rm -v "$(pwd)":/work -w /work fmarchi/alma-classifier:0.2.1 \
  alma-classifier --demo

Run using your data:

# Transfer your input data to current working directory
docker run --rm -v "$(pwd)":/work -w /work fmarchi/alma-classifier:0.2.1 \
  alma-classifier -i /work/your_data.pkl

Python 3.11 (CLI)

Run demo:

alma-classifier --demo

Run using your data:

alma-classifier -i path/to/your_data.pkl

Input Formats

Illumina Methylation450k or EPIC

Prepare a .pkl (or csv.gz) dataset with the following structure:

  • Rows: Samples
  • Columns: CpG sites
  • Values: Beta values (0-1)

Got .idat files? Use our automatic platform or process manually with SeSAMe first.

Nanopore whole genome sequencing

Follow the standard bedMethyl format with these key columns:

  • Column 1: chrom - Chromosome name
  • Column 2: start_position - 0-based start position
  • Column 4: modified_base_code - Single letter code for modified base
  • Column 11: fraction_modified - Percentage of methylation (0-100)

Got .bam files? Use our automatic platform or process manually with modkit first:

modkit pileup \
"$bam_file" \
"$bed_file" \
-t $threads \
--combine-strands \
--cpg \
--ignore h \
--ref ref/hg38.fna \
--no-filtering

CLI options

usage: alma-classifier [-h] [-i INPUT_DATA] [-o OUTPUT] [--download-models] [--demo] [--all_probs]

🩸🧬 ALMA Classifier – Epigenomic diagnosis of acute leukemia (research use only) 🧬🩸

options:
  -h, --help            show this help message and exit
  -i INPUT_DATA, --input_data INPUT_DATA
                        Input file: .pkl with β‑values, .csv/.csv.gz with β‑values, or .bed/.bed.gz nanopore file
  -o OUTPUT, --output OUTPUT
                        .csv output (default: alongside input data)
  --download-models     Download model weights from GitHub release
  --demo                Run demo with example dataset
  --all_probs           Include all subtype/class probabilities as separate columns in the output

Output

Results include subtype classification, risk prediction, and confidence scores.

Important limitations

  • The diagnostic model does not currently recognize: AML with Down Syndrome, juvenile myelomonocytic leukemia, transient abnormal myelopoiesis, low-risk MDS, or lymphomas. We need reference methylation data for these patient populations.
  • Follow preprocessing as instructed in "Input Formats" above. Different or erroneous preprocessing may lead to poor performance. This applies to bad wet-lab handling of samples.
  • The models will attempt to work with missing CpGs. Ideally, use Methylation Array 450k,EPIC or WGS Nanopore Seq with >5x coverage. Anything below that may compromise performance.

Datasets

Our datasets are publicly available for research:

Citation

Marchi, F., Shastri, V.M., Marrero, R.J. et al. Epigenomic diagnosis and prognosis of Acute Myeloid Leukemia. Nat Commun 16, 6961 (2025). https://doi.org/10.1038/s41467-025-62005-4

Metadata

Release files for alma-classifier 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alma-classifier 0.2.3
File Size Uploaded Provenance Actions
alma_classifier-0.2.3.tar.gz 3.9 MB Without provenance Details for alma_classifier-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for alma-classifier 0.2.3
File Interpreter ABI Platform Actions
alma_classifier-0.2.3-py3-none-any.whl Python 3 none any Details for alma_classifier-0.2.3-py3-none-any.whl

Total release size: 7.8 MB

Release files / alma_classifier-0.2.3.tar.gz

Download URL alma_classifier-0.2.3.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
1916b34a04a4fd93736d4b603eace4afc3268b8b8bf57ce1163c80f9c80c5461
BLAKE2b-256 checksum
How to use checksums
626eb25bd0fef63a48052922d2d885a29833802ba9d5c37494d61c3982667a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / alma_classifier-0.2.3-py3-none-any.whl

Download URL alma_classifier-0.2.3-py3-none-any.whl
Size 3.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f9055aed200f97e134e290e596ccccf0aebaa71d03ddc8c9240bf0ca8c4b0e87
BLAKE2b-256 checksum
How to use checksums
c9c8e85ba93a78bbf04a7ec829e04e8eba13b0f8ea114ed8fa0d4194d58901ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Security for alma-classifier 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page