This functions unites methylRawList and methylRawListDB
 objects that only bases with coverage from all samples are retained.
The resulting object is either of class methylBase or 
methylBaseDB depending on input.
unite(object, destrand = FALSE, min.per.group = NULL, chunk.size = 1e+06,
  mc.cores = 1, save.db = FALSE, ...)# S4 method for methylRawList
unite(object, destrand = FALSE,
  min.per.group = NULL, chunk.size = 1e+06, mc.cores = 1,
  save.db = FALSE, ...)
# S4 method for methylRawListDB
unite(object, destrand = FALSE,
  min.per.group = NULL, chunk.size = 1e+06, mc.cores = 1,
  save.db = TRUE, ...)
a methylRawList or methylRawListDB object to be merged by common locations covered by reads
if TRUE, reads covering both strands of a CpG dinucleotide will be merged, do not set to TRUE if not only interested in CpGs (default: FALSE). If the methylRawList object contains regions rather than bases setting destrand to TRUE will have no effect.
an integer denoting minimum number of samples per replicate needed to cover a region/base. By default only regions/bases that are covered in all samples are united as methylBase object, however by supplying an integer for this argument users can control how many samples needed to cover region/base to be united as methylBase object. For example, if min.per.group set to 2 and there are 3 replicates per condition, the bases/regions that are covered in at least 2 replicates will be united and missing data for uncovered bases/regions will appear as NAs.
Number of rows to be taken as a chunk for processing the 
methylRawListDB objects, default: 1e6
number of cores to use when processing methylRawListDB
objects, default: 1, but always 1 for Windows)
A Logical to decide whether the resulting object should be saved as flat file database or not, default: explained in Details sections
optional Arguments used when save.db is TRUE
suffix
      A character string to append to the name of the output 
      flat file database, 
      only used if save.db is true, default actions: append 
      “_filtered” to current filename 
      if database already exists or generate new file with 
      filename “sampleID_filtered”
      
dbdir 
      The directory where flat file database(s) should be stored, 
      defaults
      to getwd(), working directory for newly stored databases
      and to same directory for already existing database
      
dbtype
      The type of the flat file database, currently only 
      option is "tabix"
      (only used for newly stored databases)
a methylBase or methylBaseDB object depending on input
The parameter chunk.size is only used when working with 
methylRawDB or methylRawListDB objects, 
as they are read in chunk by chunk to enable processing large-sized 
objects which are stored as flat file database.
Per default the chunk.size is set to 1M rows, which should work 
for most systems. If you encounter memory problems or 
have a high amount of memory available feel free to adjust the 
chunk.size.
The parameter save.db is per default TRUE for methylDB objects as 
methylRawListDB, 
while being per default FALSE for methylRawList. 
If you wish to save the result of an 
in-memory-calculation as flat file database or if the size of the database 
allows the calculation in-memory, 
then you might change the value of this parameter.
# NOT RUN {
 data(methylKit)
 ## Following 
 my.methylBase=unite(methylRawList.obj) 
 my.methylBase=unite(methylRawList.obj,destrand=TRUE)
 
 
# }
Run the code above in your browser using DataLab