Skip to main content

Python package for processing Infinum DNA methylation arrays

Project description

Mepylome Logo

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


Mepylome: Methylation Array Analysis Toolkit

Mepylome is an efficient 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.

Features

  • Parsing of IDAT files
  • Extraction of methylation signals
  • Calculation of Copy Number Variations (CNV) with visualization using plotly.
  • Support for the following Illumina array types: 450k, EPIC, EPICv2, MSA48
  • Significantly faster compared to minfi and conumee2.
  • 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
  • CN-summary plots

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.

C++ parser

Mepylome also includes a C++ parser. See https://mepylome.readthedocs.io/ for details.

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.

Project details


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.9.0.tar.gz (922.7 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.9.0-py3-none-any.whl (948.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mepylome-0.9.0.tar.gz
  • Upload date:
  • Size: 922.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mepylome-0.9.0.tar.gz
Algorithm Hash digest
SHA256 b55c4e8657b4394f33454d75b6edb53878dfdf4acc31f3f9ec3925c83dd389ab
MD5 5151501eb6f5653ed91e97a832f88ec7
BLAKE2b-256 bd7230745ee7775b25a3ea8503b060d907c60eb523c6ff8b5e80ca2be68b27b3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mepylome-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 948.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for mepylome-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0930de532f40b531a26d1251c7ea8d58b02751f58ebc246b8aa674ed1c2f3f0
MD5 44a9338e44f4d0f135eb2dda3d4004c2
BLAKE2b-256 7f4594816a0a753cea0b9df38f5c078a766ea874ff900b68d0579de136dcbd62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page