Skip to main content

sci-dmg

codecov.io PyPI DOI

Link to docs

Differentially Methylated Genes

This package aims to consolidate DMRs (differentially methylated regions) and DMCs (differentially methylated cytosines) and most importantly, develop a consistent, unbiased method for assigning a change in DNA methylation to a gene. See the docs for detail.

The user provides a DMR file, a file with the percentage of DNA Methylation, and also the DMCs. Using these, sci-DMG consolidates the DMR's and DMC's that are consistent. DMR regions (significant q <= 0.1) with at least 60% of DMCs (q < 0.1) agreeing with the DMR change in methylation direction were kept. Genes with multiple DMRs were removed if the DMRs were not in agreement (meth. Diff. direction). If the DMRs were in agreement, the CpG with the highest DNA methylation difference in the direction of change is assigned as the methylation value (change and padj) for that gene i.e. as the driver CpG behind the gene’s change in DNA methylation. Note the cutoff values are all adjustable.

Any tool can be used to produce the DMC's and DMR's, two such tools are MethylKit and MethylSig many others exist.

Note: The CpGs and DMRs must have already been assigned to genes, this tool consolidates the DMRs and DMCs after they have been assigned to genes.

Example format for Methylsig

idx,seqnames,start,end,gene_idx,meth_diff,uid,pvalue,fdr,ensembl_gene_id,external_gene_name,chromosome_name,start_position,end_position,strand
1,chr1,10,100,1,-0.6,dmr_1,0.001,0.01,ENSG00000278267,AC114488.2,chr1,1,30,-1

Example format for MethylKit

idx,chr,start,end,gene_idx,meth.diff,uid,pvalue,qvalue,ensembl_gene_id,external_gene_name,chromosome_name,start_position,end_position,strand
1,chr1,1,1,1,-0.6,dmc_1,0.001,0.01,ENSG00000278267,AC114488.2,chr1,1,1,-1

Example output

--------------------------------------------------------------------------------
                  Length of all merged methylation data: 	16	                   
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
            Length of merged methylation data grouped by region: 	6	            
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                Number of CpGs to keep based on the regions: 	4	                
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Length of filtered methylation dataframe: 	7	
Number of genes with Methylation:	3	
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                 Dropping any genes with disagreeing DMRs: 	1	                  
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
     Length of dataframe filtered to only keep top DMC mapped to genes:	2	      
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                               Printing stats: 	                                
--------------------------------------------------------------------------------
Length grouped by DMRs 6
Number of CpGs to keep from grouped DMRs 4
Length of merged DMR and DMC 16
Length grouped by Genes 3
Number of Genes with DMRs that disagree in direction 1

Example output file

,idx_dmc,chr,start_dmc,end_dmc,gene_idx_dmc,meth.diff,uid_dmc,pvalue_dmc,qvalue,ensembl_gene_id_dmc,external_gene_name,chromosome_name_dmc,start_position_dmc,end_position_dmc,strand_dmc,gene_dmc-uid_dmc,WT_1,WT_2,WT_3,KO_1,KO_2,KO_3,idx_dmr,seqnames,start_dmr,end_dmr,gene_idx_dmr,meth_diff,uid_dmr,pvalue_dmr,fdr,ensembl_gene_id_dmr,chromosome_name_dmr,start_position_dmr,end_position_dmr,strand_dmr,gene_dmc-uid_dmr,CpGsToKeep,abs_logfc
14,7,chr1,1,1,7,-0.1,dmc_8,0.01,0.001,ENSG00000116273,HOXA1,chr4,2,12,1,HOXA1 dmc_8,0.98,0.9,0.64,0.18,0.06,0.51,5,chr1,123,190,2,-0.1,dmr_5,0.01,0.001,ENSG00000116273,chr4,2,12,1,HOXA1 dmr_5,1,0.1

Other

Please post questions and issues related to sci-dmg on the Issues <https://github.com/ArianeMora/scidmg/issues>_ section of the GitHub repository.

Release files for scidmg 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scidmg 1.0.0
File Size Uploaded
scidmg-1.0.0.tar.gz 21.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scidmg 1.0.0
File Interpreter ABI Platform
scidmg-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.3 kB

Release files / scidmg-1.0.0.tar.gz

Download URL scidmg-1.0.0.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e7c92a7fe16d76ec11ecaf4ef875d73076f9414e24cb5d228c4c60d3a60e6c55
BLAKE2b-256 checksum
How to use checksums
eac81a249f5fbf358a5cc3a85f2a99ba6005cd7b1e88dc46ca3e468081e5902a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release files / scidmg-1.0.0-py3-none-any.whl

Download URL scidmg-1.0.0-py3-none-any.whl
Size 34.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
866706bac81c219bc3faa6c4b0479b58183807a2666b401ecd89338a139eb3b1
BLAKE2b-256 checksum
How to use checksums
ce5e92c6967ddcbc1291f6c514f28ec01bc3c94272fa42a2d35efe2aa7b5dfb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

1.0.0 This release

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