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
count<-matrix(rpois(600, lambda=5), nrow=100 )
count[,6]<-count[,5]
pvalue<-runif(100, min=0, max=1)
ts<-rnorm(100, mean=0, sd=1)
cpgpq<-cbind(winbin[,1:3],count,pvalue,ts)
colnames(cpgpq)=c("chr", "chrSt","chrEnd","Medip1","Medip2","MRE1",
"MRE2","cg","mrecg","pvalue",'Ts')
pvaluefile<-paste(setwd(getwd()), "/pvalue.bed", sep = "")
write.table(cpgpq, pvaluefile,sep="\t", quote=FALSE,row.names =FALSE)
f<-MnM.qvalue(datafile=pvaluefile)
Run the code above in your browser using DataLab