Skip to main content

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:

  1. 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.

  2. 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.

  3. Group labels will be permuted for B times, step 1 and 2 are 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 analysis

  • postionfile: the file location for the chromosomal positions of CpGs

  • maxgap is the maximal base pairs between two adjacent CpGs that can be considered as within the same DMR

  • sd_cutoff is the minimal inter-sample standard deviation for a CpG to be considered for differential methylation

  • beta_diff_cutoff is the minimal mean differences between the two comparison groups for a CpG to be considered for differential methylation

  • zscore_cutoff is the minimal z-score for a CpG to be considered for differential methylation

  • B is the number permutations to compute family-wise error rate

  • seed is the seed for the random number generator when permuting the group labels

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

DMseg-1.0.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

DMseg-1.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file DMseg-1.0.1.tar.gz.

File metadata

  • Download URL: DMseg-1.0.1.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

Hashes for DMseg-1.0.1.tar.gz
Algorithm Hash digest
SHA256 69b5f142dca1e30c03f19f6e38ae3b83d1aa77ccb50f4cd7012fe423f165a282
MD5 82a570d3c8fdc1c5bc11eb40267a670d
BLAKE2b-256 f5a036af586d2afa70868ad68225ff18a1587839a83344baea7c4b49c62c80ec

See more details on using hashes here.

File details

Details for the file DMseg-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: DMseg-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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

Hashes for DMseg-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f21a10759fc6eeb099d8698578b3759d07b5f740563c6c9e89bf571cdd275f2
MD5 a753dc5e11964b99e9279721108fe6df
BLAKE2b-256 d09b5086225f9538c28ae4b7b13c7a0db48c5ef566324fc7e4adc905be9b8b3f

See more details on using hashes here.

Supported by

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