生信修炼甲基化生信相关

DNA甲基化

2019-07-23  本文已影响35人  六六_ryx

DNA甲基化是表观遗传学研究中的一个重要一个分支,符合表观遗传学DNA的序列信息没有改变的特地点,而是DNA的碱基发生了化学修饰。最常见的一种修饰如5-甲基胞嘧啶(5-methylcytosine, 5mC)。相关研究有关注于甲基化与基因表达调控、基因印记、X染色体失活、胚胎发育、肿瘤发生等。

甲基化的研究技术

总体上来说可以分为两类:一种是测序,一种是芯片。

甲基化分析流程

上游分析的主要目的提取甲基化位点,得到差异甲基化位点和甲基化区域(DML/DMR, DNA methylation loci/region),下游分析比较灵活,甲基化分析通常与其他组学联合分析,如:

STEP1:比对,提取甲基化位点

对于BS-seq甲基化位点的提取,常用的软件有Bismark,bismark可以将bisulfite处理的reads比对到参考基因组上,同时提取甲基化位点。输出结果可以直接导入到基因组浏览器(如IGV, SeqMonk)中查看甲基化水平。主要特点可以概括为以下几个方面:

使用方法
主要分为3步:

bismark_genome_preparation --path_to_aligner /usr/bin/bowtie2/ --verbose /data/genomes/homo_sapiens/GRCh38/
bismark --bowtie2 -N 0 -L 20  -o mapping-out ref data.fastq
# ref:是参考基因组的文件夹
# -o: mapping-out输出文件夹
# --bowtie2:默认模式,可选参数

在提取甲基化位点前需要先去重, 不过对RRBS, amplicon以及靶向测序不建议去重。
USAGE: ./deduplicate_bismark [options] filename(s)

deduplicate_bismark -s mapping-out/test_data_bismark_bt2.bam

call DML/DMR

mkdir CpGout
bismark_methylation_extractor -s --gzip --bedGraph --buffer_size 1G \
--cytosine_report --genome_folder ref/ test_data_bismark_bt2.deduplicated.bam

输出结果:

STEP2:差异甲基化区域分析

差异甲基化位点和区域(DML/DMR)的区别


差异甲基化区域的分析工具很多,这里介绍两个R包,一个是edmr, 一个是DSS
edmr

edmr是基于双峰正态分布模型和区域甲基化分析的成本函数优化DMR分析https://github.com/ShengLi/edmr](https://github.com/ShengLi/edmr

# Step 1. Load add-on packages and example data

library(edmr)
library(GenomicRanges)
library(IRanges)
library(mixtools)
library(data.table)
data(edmr)
# Step 2. myDiff evalution and plotting

# fitting the bimodal normal distribution to CpGs distribution
myMixmdl=myDiff.to.mixmdl(myDiff, plot=T, main="example")

# plot cost function and the determined distance cutoff
plotCost(myMixmdl, main="cost function")

# Step 3. Calculate DMRs

# calculate all DMRs candidate
mydmr=edmr(myDiff, mode=1, ACF=TRUE)

# further filtering the DMRs
mysigdmr=filter.dmr(mydmr)

## annotation
# get genebody annotation GRangesList object
#genebody=genebody.anno(file="http://edmr.googlecode.com/files/hg19_refseq_all_types.bed")
genebody.file=system.file("extdata", "chr22.hg19_refseq_all_types.bed.gz", package = "edmr")
genebody=genebody.anno(file=genebody.file)

# plot the eDMR genebody annotation
plotdmrdistr(mysigdmr, genebody)

# get CpG islands and shores annotation
#cpgi=cpgi.anno(file="http://edmr.googlecode.com/files/hg19_cpgisland_all.bed")
cpgi.file=system.file("extdata", "chr22.hg19_cpgisland_all.bed.gz", package = "edmr")
cpgi=cpgi.anno(file=cpgi.file)

# plot the eDMR CpG islands and shores annotation
plotdmrdistr(mysigdmr, cpgi)

# 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
DSS

DSS是基于贝塔二项分布,可以用于分析DML/DMRs), 包括三个模块: -两组比较(有重复) ,两组比较(无重复) ,多组比较,参考https://www.bioconductor.org/packages/release/bioc/html/DSS.html
DSS的输入格式如下:

library(DSS)
# 创建BSseq对象
if(T){
 sn[c(1,11,2,12)]
 BSobj <- makeBSseqData(allDat[c(1,11,2,12)],sn[c(1,11,2,12)])[1:5000,]
 BSobj 
 save(BSobj,file = 'group-BSobj.Rdata')
 dmlTest <- DMLtest(BSobj,   group1=c("A0R_d0_rep1","A0R_d0_rep2"),
 group2=c("A3R_d0_rep1","A3R_d0_rep2"),smoothing=F)
 head(dmlTest) 
}
##  call DML/DMR
# using callDML function to call DML
# call DML
dmls = callDML(dmlTest, p.threshold=0.001)
head(dmls)
# call DMR
dmrs = callDMR(dmlTest, p.threshold=0.01)
head(dmrs)
# visulization
showOneDMR(dmrs[1,], BSobj)

甲基化芯片的分析可以参考:https://www.jianshu.com/p/6411e8acfab3

相关参考文章

使用DSS包多种方式检验差异甲基化信号区域

上一篇下一篇

猜你喜欢

热点阅读