Skip to main content
Mepylome Logo

PyPI version License: MIT PyPI - Python Version Documentation Status Open in Colab


Mepylome: Ultra-Fast Methylation Array Analysis Toolkit

Mepylome is a high-performance Python toolkit tailored for parsing, processing, and analyzing methylation array IDAT files. Serving as a versatile library, Mepylome supports a wide range of methylation analysis tasks. It also includes an interactive GUI that enables users to generate UMAP plots and CNV plots (Copy Number Variation) directly from collections of IDAT files. Mepylome is designed for large-scale cohort processing and delivers substantial speed improvements over existing methylation analysis pipelines.

✨ Key Highlights

  • Very fast processing engine
  • 🧬 Supports Illumina 450k, EPIC, EPICv2, 27k, MSA48, and MM285 arrays
  • 📊 CNV analysis with interactive Plotly visualizations
  • 🧹 Clean API for large-scale cohort processing
  • 🖥️ Optional GUI for UMAP + CNV exploration
  • 🎯 Data inference: tumor purity estimation, MLH1 promoter methylation reports, sex prediction, chondrosarcoma risk prediction (CHROME)
  • 🧪 Built-in QC including pOOBAH detection and quality metrics

Features

Data Processing

  • Parsing of IDAT files
  • Extraction of methylation signals

Copy Number Analysis

  • Calculation of Copy Number Variations (CNV) with visualization using plotly.
  • Interactive visualization using Plotly
  • CN-summary plots

Supported Array Types

  • Illumina EPIC / EPICv2
  • Illumina 450k
  • Illumina 27k
  • Illumina MSA48
  • Illumina MM285 (Mouse)

Performance

Quality Control

  • pOOBAH-based probe calculation
  • Quality metrics for samples and probes
  • Heatmap of beta values of a gene or genomic region

Data Inference

Derived, higher-level results computed from methylation data, beyond raw signals and CNV:

  • Tumor purity estimation from methylation beta values
  • MLH1 promoter methylation report pages (e.g. for Lynch syndrome / mismatch-repair-deficiency workups)
  • Interactive visualization of methylation across a gene or an arbitrary genomic region

GUI

  • Methylation analysis tool with a graphical browser interface for UMAP analysis, CNV plots and supervised classification
    • Can be run from the command line with minimal setup or customized through a Python script

Documentation

The mepylome documentation, including installation instructions, tutorial and API, is available at https://mepylome.readthedocs.io/

Usage

Methylation extraction and copy number variation plots

from pathlib import Path

from mepylome import CNV, MethylData

# Sample
analysis_dir = Path("/path/to/idat/directory")
sample_file = analysis_dir / "200925700125_R07C01"

# CNV neutral reference files
reference_dir = Path("/path/to/reference/directory")

# Get methylation data
sample_methyl = MethylData(file=sample_file)
reference_methyl = MethylData(file=reference_dir)

# Beta value
betas = sample_methyl.betas

# Print overview of processed data
print(sample_methyl)

# CNV anylsis
cnv = CNV.set_all(sample_methyl, reference_methyl)

# Visualize CNV in the browser
cnv.plot()

Methylation analysis: Command-line interface and GUI

Mepylome Logo

Basic usage:

Mepylome provides a command-line interface for launching a GUI and performing methylation analysis. Ensure you have an analysis directory, a CNV reference directory, and an annotation file (located within the analysis directory). Use the following command to initiate the analysis:

mepylome --analysis_dir /path/to/idats --reference_dir /path/to/ref

If you want to perform a quick test, use:

mepylome --tutorial

This command downloads sample IDAT files and provides a demonstration of the package's functionality.

You can try the tutorial directly in Google Colab-without downloading or installing anything-by clicking the link below. Please note that GUI support is limited in Colab.

Open in Colab

See https://mepylome.readthedocs.io/ for details.

Publication

This library is described in the following peer-reviewed publication:

https://doi.org/10.1002/aisy.202500778

Contributing

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue or submit a pull request.

License

This project is licensed under the MIT license.

Acknowledgements

Mepylome is strongly influenced by minfi and conumee2. Some functionalities, such as the manifest handler and parser, are adapted from methylprep.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mepylome-0.13.1.tar.gz (643.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mepylome-0.13.1-py3-none-any.whl (682.5 kB view details)

Uploaded Python 3

File details

Details for the file mepylome-0.13.1.tar.gz.

File metadata

  • Download URL: mepylome-0.13.1.tar.gz
  • Upload date:
  • Size: 643.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mepylome-0.13.1.tar.gz
Algorithm Hash digest
SHA256 c38f6100c3ad55e126a98de7c1b5153dbf97b00a4c311c157b339a0144f14fdf
MD5 a026f7b71c8749f3bf6f676871d319a4
BLAKE2b-256 6c49e09b7a11f0ca897e9035781c137a1570b9f0edaa8c1b7578f3f66ec21e33

See more details on using hashes here.

File details

Details for the file mepylome-0.13.1-py3-none-any.whl.

File metadata

  • Download URL: mepylome-0.13.1-py3-none-any.whl
  • Upload date:
  • Size: 682.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mepylome-0.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba97ee6ed2258b17aa573e233ec4e476f0ee4bca5b5b5a03ac9ba6163b06c182
MD5 441437bb47b9ade3847004fd6ccfc1b7
BLAKE2b-256 88f9dd7df59a3b5172100e9ba5bf3a3d5f8f13dc983cd3f8d9fabbd7565373d7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.13.1 This release

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.1

2 files

0.10.0

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.12

2 files

0.8.11

2 files

0.8.10

2 files

0.8.7

2 files

0.8.6

2 files

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.0

2 files

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