Python package for DMseg: detecting differential methylation regions in DNA methylome data
Project description
DMseg: detecting differential methylation regions (DMRs) in methylome
This is a Python package to search through methylome-side CpGs sites for DMRs between two biological conditions. The algorithm executes the following analysis steps:
- A linear regression model is fitted to the beta values for each CpG, using the user-input covariates: the first variable is the group label of interest.
- Nominal p-values from individual CpG associations are used to define the DMR: more than or equal to two consecutive CpGs with p-value <0.05 will be considered as candidate DMR. A likelihood ratio statistic (LRT) is computed for a candidate DMR.
- Group labels will be permuted for
Btimes, step1and2are repeated for each permuation dataset. Family-wise error rate is computed using the null distribution of LRT based on permutation.
To install the package:
python -m pip install DMseg
To run the python package, one can first port in the package and the core function file DMseg.py, then call the pipeline function DMseg_pipeline
import DMseg
from DMseg import DMseg
result = DMseg.DMseg_pipeline(betafile, colDatafile, postionfile, maxgap=500, sd_cutoff=0.025, beta_diff_cutoff=0.05, zscore_cutoff=1.96, B=500, seed=1001)
The inputs for the function DMseg_pipeline are
betafile: the file location for the n x p matrix of methylation beta values (n is the number of samples, p is the number of CpG sites)colDatafile: the file location for the covariates for regression analysispostionfile: the file location for the chromosomal positions of CpGsmaxgapis the maximal base pairs between two adjacent CpGs that can be considered as within the same DMRsd_cutoffis the minimal inter-sample standard deviation for a CpG to be considered for differential methylationbeta_diff_cutoffis the minimal mean differences between the two comparison groups for a CpG to be considered for differential methylationzscore_cutoffis the minimal z-score for a CpG to be considered for differential methylationBis the number permutations to compute family-wise error rateseedis the seed for the random number generator when permuting the group labels
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file DMseg-1.0.2.tar.gz.
File metadata
- Download URL: DMseg-1.0.2.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55faff8542d9f445ec8281561ecd2057545f107bffe83a90866e1f6d5bd9b35d
|
|
| MD5 |
f2ea97f381634ad3fea77b37aa5d86e0
|
|
| BLAKE2b-256 |
132f63850650b05873322f04450a36a50283b48e223d651cec37a618a7effaf1
|
File details
Details for the file DMseg-1.0.2-py3-none-any.whl.
File metadata
- Download URL: DMseg-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17b09d1091d2968d3d6587d37a3003e74c7612b5d2ab3a53932b87f025e13b45
|
|
| MD5 |
ef280ecf6c2c403ac270304207757262
|
|
| BLAKE2b-256 |
7fdbd31c7e4e476bcbb1ba63ee17b91b14cbeb8f542bb0e1db43dd47008d8b7e
|