差异甲基化分析eDMR软件分析说明

511,099

软件链接地址:https://code.google.com/p/edmr/

该软件是可以基于对methylkit 软件包进行 进一步处理的,在处理和找寻差异甲基化为点和区域,分析的要比 methylkit更加细致。建议使用methylkit主要是对样本间甲基化水平的各种评估,但是寻找差异还是建议使用edmr软件包。

使用的相关脚本如下:

#############################################

library(edmr)

library(methylKit)

library(GenomicRanges)

library(mix tools)

#首先使用bismark,然后使用methylkit(具体可参见:https://www.plob.org/2014/10/22/8831.html)

file.list=list( "1h_CpG.txt","HL_CpG.txt")

myobj=read(file.list,sample.id=list("h0","L0"),assembly="hg19",treatment=c(0,1))

meth=unite(myobj, destrand=FALSE)

myDiff=calculateDiffMeth(meth,num.cores=8)

# fitting the bimodal normal distribution to CpGs distribution

tiff("h0_VS_L0.tiff")

myMixmdl=myDiff.to.mixmdl(myDiff, plot=T, main="h0_VS_L0")

dev.off()

# plot cost function and the determined distance cutoff

tiff("h0_VS_L0_cost_function.tiff")

plotCost(myMixmdl, main="cost function")

dev.off()

# calculate all DMRs candidate

mydmr=edmr(myDiff, mode=1, ACF=TRUE)

# further filtering the DMRs

mysigdmr=filter.dmr(mydmr)

## annotation加载注释文件这两个文件可以在edmr上下载

# get genebody annotation GRangesList object

genebody=genebody.anno(file="/DG/home/fyc/methylation/eDMR/hg19_refseq_all_types.bed")

# get CpG islands and shores annotation

cpgi=cpgi.anno(file="/DG/home/fyc/methylation/eDMR/hg19_cpgisland_all.bed")

# plot the eDMR genebody annotation

tiff("eDMR_genebody_annotation")

plot.dmr.distr(mysigdmr, genebody, main="eDMR genebody annotation", xlab="DMR count")

dev.off()

# plot the eDMR CpG islands and shores annotation

tiff("eDMR_CpG_annotation")

plot.dmr.distr(mysigdmr, cpgi, main="eDMR CpG islands and shores annotation", xlab="DMR count")

dev.off()

# prepare genes for pathway analysis with significant DMRs at its promoter regions

dmr.genes=get.dmr.genes(myDMR=mysigdmr, subject=genebody$promoter, id.type="gene.symbol")

dmr.genes

###########

原文来自:http://blog.sina.com.cn/s/blog_83f77c940102v7js.html

评论  5  访客  5
    • xuan 0

      您好,
      我现在在做BS甲基化的课题研究,在筛选差异位点和区域时遇到了困难,对methylKit和eDMR有一些问题请教:
      1.两个R包对BS和RRBS均适用吗?
      2.这两个包是对染色体适用还是对全基因组适用,还是二者均可适用。
      我曾经分别将全基因组的相关文件和每条染色体相关文件作为输入,得到的结果是不同的,但是又不知道怎么解释两种方法哪一种是正确的。
      希望您能在百忙之中不吝赐教。
      谢谢!

        • amii 0

          @ xuan 我想问一下您使用edmr是cpg岛的注释文件是如何生成的呢

        • lvl_2001 0

          为什么只能分析CpG呢?做植物的怎么用软件找DMR啊?DMR一般都是什么标准?我看不同的文献用的标准不一样呢

          • 请输入您的QQ号 0

            cpg岛的bed注释文件使用什么软件生成呢?

            • JShan 0

              您好!想问一下在对DMR进行基因和cpgi注释时,这两个注释文件我应该如何得到。希望您能在百忙之中不吝赐教。
              非常谢谢!

            发表评论

            匿名网友