parSegment {ParDNAcopy} | R Documentation |
Parallel implementation of segment
function of DNAcopy
Description
There are three key differences between this function and the original
segment
function of package DNAcopy
. First, the execution can be
parallelized, either by using multiple cores of the present host or by
invoking a grid engine to run on multiple hosts. Secondly, random number
generator may be re-initialized, with the same seed, for each sample. Finally,
there is a "skinny" option for the value, i.e., a DNAcopy
object with no
data
item.
Usage
parSegment(CNAobj, ranseed = NULL, distrib = c("vanilla", "Rparallel"),
njobs = 1, out = c("full", "skinny"), ...)
Arguments
CNAobj |
An object of class |
ranseed |
A single integer to seed the random number generator. |
distrib |
One of "vanilla" (default) and "Rparallel" to choose a parallelization option: no parallelization ("vanilla"), parallelization on multiple cores of the local host ("Rparallel"). |
njobs |
An integer specifying the desired number of parallel jobs. |
out |
One of "full" (default) or "skinny" to specify the form of the value, an object
of class |
... |
Arguments other than |
Value
An object of class DNAcopy
. If out == "skinny"
the data
item of the value will not be returned in order to reduce the memory use.
Author(s)
Alex Krasnitz
See Also
Package DNAcopy
.
Examples
data(coriell)
#prepare data for segmentation
CNA.object <- CNA(genomdat=coriell[,c(4,5)],coriell$Chromosome,coriell$Position,
data.type="logratio",sampleid=dimnames(coriell)[[2]][4:5])
#equivalent to "segment" of DNAcopy
parseg<-parSegment(CNA.object,undo.splits="sdundo")
#Random number generator to be re-seeded for each sample
parsegrep<-parSegment(CNA.object,ranseed=123,undo.splits="sdundo")
#multi-core execution but the result should not change
parsegrep1<-parSegment(CNA.object,ranseed=123,distrib="Rparallel",njobs=2,
undo.splits="sdundo")