pool | R Documentation |
The function sums up coverage, numCs and numTs values within each group so one representative sample for each group will be created in a new methylBase object
pool(obj, sample.ids, chunk.size = 1e+06, save.db = FALSE, ...)
## S4 method for signature 'methylBase'
pool(obj, sample.ids, chunk.size = 1e+06, save.db = FALSE, ...)
## S4 method for signature 'methylBaseDB'
pool(obj, sample.ids, chunk.size = 1e+06, save.db = TRUE, ...)
obj |
methylBase or methylBaseDB object with two groups or more and each group should have multiple samples |
sample.ids |
a character vector of new sample.ids ex:c("test","control"), should follow the same order as unique treatment vector, and should be equal to the length of the unique treatment vector |
chunk.size |
Number of rows to be taken as a chunk for processing the
|
save.db |
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
|
a methylBase or methylBaseDB object depending on class of input object
The parameter chunk.size
is only used when working with
methylBaseDB
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
methylBaseDB
,
while being per default FALSE for methylBase
. 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 want to change the value of this parameter.
Altuna Akalin
data(methylKit)
# methylBase.obj has two groups, each group has two samples,
# the following function will pool the samples in each group
# so that each group will be represented by one pooled sample
pooled.methylBase=pool(methylBase.obj,sample.ids=c("test","control"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.