Metadata-Version: 2.4
Name: MethylVerse
Version: 1.2.1
Summary: Python package for methylation data
License: GPL-2.0-or-later
License-File: LICENSE.md
Keywords: WGBS,450k,850k,EPIC,methylation
Author: Kyle S. Smith
Author-email: kyle.smith@stjude.org
Maintainer: Kyle S. Smith
Maintainer-email: kyle.smith@stjude.org
Requires-Python: >=3.10
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: ailist (>=2.1.7)
Requires-Dist: bokeh (>=3.1.0,<4.0.0)
Requires-Dist: cython (>=3.0.0,<4.0.0)
Requires-Dist: h5py (>=3.12.1)
Requires-Dist: hmmlearn (>=0.3.3)
Requires-Dist: joblib (>=1.4.2)
Requires-Dist: linear_segment (>=1.2.1,<2.0.0)
Requires-Dist: matplotlib (>=3.7.1,<4.0.0)
Requires-Dist: numpy (>=1.23.5)
Requires-Dist: onnxruntime (>=1.20.0)
Requires-Dist: pandas (>=2.0.0,<3.0.0)
Requires-Dist: pysam (>=0.23.1)
Requires-Dist: scikit-learn (>=1.2.2)
Requires-Dist: scikit-network (>=0.33.0)
Requires-Dist: scipy (>=1.9.1)
Requires-Dist: seaborn (>=0.12.2)
Requires-Dist: statsmodels (>=0.14.0)
Project-URL: Documentation, https://www.biosciencestack.com/static/MethylVerse/docs/index.html
Project-URL: Repository, https://github.com/kylessmith/MethylVerse
Description-Content-Type: text/markdown

# MethylVerse

[![Build Status](https://travis-ci.org/kylessmith/MethylVerse.svg?branch=master)](https://travis-ci.org/kylessmith/MethylVerse) [![PyPI version](https://badge.fury.io/py/MethylVerse.svg)](https://badge.fury.io/py/MethylVerse)
[![Coffee](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee&color=ff69b4)](https://www.buymeacoffee.com/kylessmith)

<img src="MethylVerse_logo.png" width="300" />
Library to work with WGBS, EM-seq, and/or methylation array data in one interface.


## Install

If you dont already have numpy and scipy installed, it is best to download
`Anaconda`, a python distribution that has them included.  
```
    https://continuum.io/downloads
```

PyPI install, presuming you have all its requirements installed:
```
    pip install ngsfragments
	pip install MethylVerse
```

The developmental version of MethylVerse can also be install from GitHub.
```
    pip install git+https://github.com/kylessmith/MethylVerse/
```

First use of the MethylVerse software will initialize a download of necessary reference
data. Raw reference data is also available at on Zenodo.
```
    https://zenodo.org/records/16580408
    https://zenodo.org/records/16581863
```


## Usage

General useage:

```python
import MethylVerse as mv

beta_values = mv.core.read_methylation("path/to/methylation")

classifier = mv.tools.classifiers.MPACT.MPACT_classifier_torch.MPACT_classifier()
predictions = classifier.predict(beta_values)

```

Run the M-PACT classifier from the cammandline
```
python -m MethylVerse MPACT example.bedgraph --impute --regress --call_cnvs --verbose
```

Additional options can be viewed:
```
python -m MethylVerse MPACT -h

usage: __main__.py MPACT [-h] [--impute] [--regress] [--probability_threshold PROBABILITY_THRESHOLD]
                         [--max_contamination_fraction MAX_CONTAMINATION_FRACTION] [--call_cnvs] [--out OUT] [--verbose]
                         input_data

positional arguments:
  input_data            Input data, idat name, nanopore bed file, or MethylDackel bedGraph

options:
  -h, --help            show this help message and exit
  --impute              Impute data missing CpGs
  --regress             Whether to regress data and remove background CSF/Immune
  --probability_threshold PROBABILITY_THRESHOLD
                        Probability threshold for M-PACT classification (default: 0.7)
  --max_contamination_fraction MAX_CONTAMINATION_FRACTION
                        Max contamination fraction for M-PACT classification (aggressiveness of removing background, default=0.3)
  --call_cnvs           Call CNVs from the methylation file
  --out OUT             Output file
  --verbose             Verbose output
```

[methylverse_docs]: https://www.biosciencestack.com/static/MethylVerse/docs/index.html
