poolFromGRlist {MethylIT} | R Documentation |
This function will build a GRanges methylation pool from a list of GRanges objects
poolFromGRlist(LR, stat = "sum", num.cores = 1, tasks = 0L, prob = FALSE, column = 1L, verbose = TRUE, ...)
LR |
list of GRanges objects to build a virtual individual (methylation pool) |
stat |
statistic used to estimate the methylation pool: row sum, row mean or row median of methylated and unmethylated read counts across individuals |
num.cores |
The number of cores to use, i.e. at most how many child processes will be run simultaneously (see bplapply function from BiocParallel package). |
tasks |
integer(1). The number of tasks per job. Value must be a scalar integer >= 0L. In this documentation a job is defined as a single call to a function, such as bplapply, bpmapply etc. A task is the division of the X argument into chunks. When tasks == 0 (default), X is divided as evenly as possible over the number of workers (see MulticoreParam from BiocParallel package). |
prob |
Logic. Whether the variable for pooling is between 0 and 1 (a probability), e.g., methylation levels. If TRUE, then Fisher's transformation is applied, the row mean is computed for each cytosine site and returned in the original measurement scale between 0 and 1 by using the inverse of Fisher's transformation. |
column |
If prob == TRUE, then the 'column' from the LR metacolumns where the prob values are found must be provided. Otherwise, column = 1L. |
verbose |
If TRUE, prints the function log to stdout |
... |
Additional parameters for 'uniqueGRanges' function. |
The list of GRanges objects (LR) provided to build a virtual methylome should be an output of the function 'readCounts2GRangesList' or at least each GRanges must have the columns named "mC" and "uC", for the read counts of methylated and unmethylated cytosines, respectively.
A GRanges object
gr1 <- makeGRangesFromDataFrame( data.frame(chr = "chr1", start = 11:15, end = 11:15, strand = '*', mC = 1, uC = 1:5), keep.extra.columns = TRUE) gr2 <- makeGRangesFromDataFrame( data.frame(chr = "chr1", start = 11:15, end = 11:15, strand = '*', mC = 1, uC = 1:5), keep.extra.columns = TRUE) answer <- poolFromGRlist(list(gr1, gr2), stat = 'sum', verbose = FALSE)