library(methylKit)
install.packages("data.table")
source("http://www.bioconductor.org/biocLite.R")
biocLite("GenomicRanges")
library(data.table)
library(GenomicRanges)
file.list <- list('BiGo_lar_M1_methylkit6.txt','BiGo_lar_T1D3_methylkit6.txt','BiGo_lar_T1D5_methylkit6.txt','BiGo_lar_T3D5_methylkit6.txt',"BiGo_lar_T3D3_methylkit6.txt","BiGo_lar_M3_methylkit6")
myobj<-read( file.list,pipeline=list(fraction=TRUE,chr.col=1,start.col=2,end.col=2,
coverage.col=4,strand.col=3,freqC.col=5 ),
sample.id=list("M1","T1D3",'T1D5','T3D5','T3D3','M3'),assembly="v9",treatment=c(1,0,0,0,0,0))
file.list <- list('BiGo_lar_M1_methylkit6.txt','BiGo_lar_T1D3_methylkit6.txt','BiGo_lar_T1D5_methylkit6.txt','BiGo_lar_T3D5_methylkit6.txt',"BiGo_lar_T3D3_methylkit6.txt","BiGo_lar_M3_methylkit6.txt")
myobj<-read( file.list,pipeline=list(fraction=TRUE,chr.col=1,start.col=2,end.col=2,
coverage.col=4,strand.col=3,freqC.col=5 ),
sample.id=list("M1","T1D3",'T1D5','T3D5','T3D3','M3'),assembly="v9",treatment=c(1,0,0,0,0,0))
meth<-unite(myobj,destrand=FALSE)
head(meth)
nrow(meth)
getCorrelation(methnew,plot=T)
getCorrelation(meth,plot=T)
pdf(file="graph_methylkit6.pdf")
getCorrelation(meth,plot=T)
dev.off()
file.list <- list('BiGo_lar_M1_methylkit6.txt','BiGo_lar_T1D3_methylkit6.txt','BiGo_lar_T1D5_methylkit6.txt','BiGo_lar_T3D5_methylkit6.txt',"BiGo_lar_T3D3_methylkit6.txt","BiGo_lar_M3_methylkit6.txt")
myobj<-read( file.list,pipeline=list(fraction=TRUE,chr.col=1,start.col=2,end.col=2,
coverage.col=4,strand.col=3,freqC.col=6 ),
sample.id=list("M1","T1D3",'T1D5','T3D5','T3D3','M3'),assembly="v9",treatment=c(1,0,0,0,0,0))
meth<-unite(myobj,destrand=FALSE)
head(meth)
nrow(meth)
pdf(file="graph_methylkit6.pdf")
getCorrelation(meth,plot=T)
dev.off()
getCorrelation(meth,plot=T)
