datafile<-system.file("extdata", package = "methylMnM")
filepath<-datafile[1]
file1<-paste(filepath,"/all_CpGsite_chr18.txt",sep="")
CpGsite<-read.table(file1, header=FALSE,skip=0, nrows=200, as.is=TRUE)
winbin<-CpGsite[1:100,1:4]
winbin[,2]<-seq(0,49500,500)
winbin[,3]<-winbin[,2]+500
winbin[,4]<-rpois(100, lambda=5)
winbinfile1<-paste(setwd(getwd()), "/winbinfile1.bed", sep = "")
write.table(winbin, winbinfile1,sep="\t", quote=FALSE, row.names =FALSE)
winbin1<-winbin
winbin1[,4]<-winbin[,4]+20
winbinfile2<-paste(setwd(getwd()), "/winbinfile2.bed", sep = "")
write.table(winbin1, winbinfile2,sep="\t", quote=FALSE, row.names =FALSE)
datafile<-c(winbinfile1,winbinfile2)
cpg<-winbin
cpg[,4]<-rpois(100, lambda=12)
cpgfile<-paste(setwd(getwd()), "/cpgfile.bed", sep = "")
write.table(cpg, cpgfile, sep="\t", quote=FALSE, row.names =FALSE)
f<-MnM.test(file.dataset=datafile,file.cpgbin=cpgfile)
Run the code above in your browser using DataLab