```
library(methylKit)
library(data.table)
library(GenomicRanges)
```
```
file.list <- list('/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_M1final.txt', '/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_M3final.txt','/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_T1D3final.txt','/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_T1D5final.txt','/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_T3D3final.txt', '/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_FilteredFiles/methylKit/methylkit_out_T3D5final.txt')
```
```
myobj<-read(file.list,pipeline=list(fraction=TRUE,header=T, chr.col=1,start.col=2,end.col=3,strand.col=4, coverage.col=5,freqC.col=6, freqT.col=7), sample.id=list("M1","M3"),assembly="v9",treatment=c(1,0,0,0,0,0))
```

```
meth<-unite(myobj,destrand=FALSE)
```
```
head(meth)
```
```
nrow(meth)
```
```
hc<- clusterSamples(meth, dist="correlation", method="ward", plot=T)
```
```
PCA<-PCASamples(meth)
```
```
getCorrelation(meth,plot=T)
```