Install should only have to occur once.
source("http://methylkit.googlecode.com/files/install.methylKit.R")
# installing the package with the dependencies
install.methylKit(ver="0.9.2",dependencies=TRUE)
library(methylKit)
library(data.table)
library(GenomicRanges)
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
##
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
##
## The following object is masked from 'package:stats':
##
## xtabs
##
## The following objects are masked from 'package:base':
##
## anyDuplicated, append, as.data.frame, as.vector, cbind,
## colnames, duplicated, eval, evalq, Filter, Find, get,
## intersect, is.unsorted, lapply, Map, mapply, match, mget,
## order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
## rbind, Reduce, rep.int, rownames, sapply, setdiff, sort,
## table, tapply, union, unique, unlist
##
## Loading required package: IRanges
## Loading required package: XVector
##
## Attaching package: 'GenomicRanges'
##
## The following object is masked from 'package:data.table':
##
## last
file.list <- list('/Volumes/web/cnidarian/YE_control_22sm_methkit.txt','/Volumes/web/cnidarian/YE_mix_22sm_methkit.txt')
myobj=read(file.list,sample.id=list("mix","control"),assembly="ensembl",treatment=c(1,0))
meth<-unite(myobj)
## Error: Join results in 24343272 rows; more than 5380020 =
## max(nrow(x),nrow(i)). Check for duplicate key values in i, each of which
## join to the same group in x over and over again. If that's ok, try
## including `j` and dropping `by` (by-without-by) so that j runs for each
## group to avoid the large allocation. If you are sure you wish to proceed,
## rerun with allow.cartesian=TRUE. Otherwise, please search for this error
## message in the FAQ, Wiki, Stack Overflow and datatable-help for advice.
nrow(meth)
## Error: error in evaluating the argument 'x' in selecting a method for function 'nrow': Error: object 'meth' not found