CpG CHG CHH含义 1.甲基化的C的类型就是前面提到的CpG, CHG, CHH 3种类型 2.比对情况包括比对到四条链上OT, OB, CTOT, CTOB 4种情况 在bismark中,将基因组的正链定义为top strand , 简称OT, 负链定义为bottom strand, 简称OB; 亚硫酸氢盐处理后,正负链之间并不是完全的反向互补的,将OT链的反向互补链定义为CTOT, 将OB链的反向互补链定义为CTOB。对于链特异性文库而言,由于插入序列为单链,只需要比对OT和OB两条链即可,大大减少了运算量,所以目前illumina的标准BS-seq protocol构建的文库都是链特异性文库,新版的bismark默认的运行方式也是针对链特异性文库的。 1.流程文件 dna-meth.tar导入镜像 2.未找到流程脚本--已下载3.缺少基本命令4.运行pipeline脚本5.docker中时间与宿主机时间不一致(相差8小时)解决方法docker cp /etc/localtime ef8f1c5e7533:/etc/localtime 1.环境配置docker start 5fbb826d9572
docker exec -it 5fbb826d9572 /bin/bash
docker stop 5fbb826d9572
docker commit 5fbb826d9572 dna-meth:v4
docker build -t dna-meth:v4 .
中文格式设置
export LANG='C.UTF-8'
source /etc/profile
2.主要流程1.参考基因组建立索引 1、质控
2、BisMark比对$bismark_path/bismark -p 4 --non_directional --genome $genome_path --path_to_bowtie2 $bowtie_path --samtools_path $samtools_path -1 $1 -2 $2
# 比对到基因组
$bismark_path/deduplicate_bismark -p --samtools_path $samtools_path --bam $1
# 去重复
3.甲基化分析
4.DMR区域分析#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args)<3) {
stop('At least two inputs are needed input file, outFile and config JSON', call.=FALSE)
}
suppressPackageStartupMessages(library(dmrseq))
suppressPackageStartupMessages(library('BiocParallel'))
suppressPackageStartupMessages(library(rjson))
register(MulticoreParam(4))
df = read.table(args[1])
files <- c()
for(file in df$V1){
files <-c(files,file)
}
in_json = fromJSON(file = args[3], method = 'C', unexpected.escape = 'error', simplify = TRUE )
outFileName = args[2]
test = read.bismark(files = files,rmZeroCov = TRUE, strandCollapse = FALSE, verbose = TRUE)
#sampleNames<- c('control_R1','control_R2','treat_R1','treat_R2')
sampleNames <- c(strsplit(in_json$samplenames, ' ')[[1]])
#cellType<- c('control','control','treat','treat')
cellType<- c(c(strsplit(in_json$CellType, ' ')[[1]]))
pData(test)$CellType <- cellType
pData(test)$Replicate <- sampleNames
loci.idx <- which(DelayedMatrixStats::rowSums2(getCoverage(test, type='Cov')==0) == 0)
sample.idx <- which(pData(test)$CellType %in% unique(cellType))
test.filtered <- test[loci.idx, sample.idx]
testCovariate <- 'CellType'
regions <- dmrseq(test.filtered,testCovariate=testCovariate)
#regions <- dmrseq(test.filtered, cutoff = 0.05, testCovariate=testCovariate)
out <- as(regions, 'data.frame')
write.table(out, file = outFileName , sep='\t', col.names=TRUE, row.names=FALSE, quote=FALSE )
本次流程主要软件已安装,直接测试,后续增加功能--GO与KEGG富集分析。测试通过后,整理报告模板,docker打包并部署。 |
|
来自: 刘得光3p6n6zqq > 《甲基化》