[BioC] multicore and GRangesList

Stefano Calza stefano.calza at med.unibs.it
Tue Jan 11 15:52:01 CET 2011


Hi,

you cannot do that. lapply, sapply, ecc. methods for GRangesLists are specific, not standard ones.

I've been using it but afaik requires some hacking (unless you coerce the object to a list, which took long time for me...and didn't like).

maybe someone has better suggestion

Stefano

On Tue, Jan 11, 2011 at 03:34:46PM +0100, arne.mueller at novartis.com wrote:
<arne.mueller>Dear All,
<arne.mueller>
<arne.mueller>Has anybody experience using the multicore package with GRangesLists from 
<arne.mueller>the GenomicRanges package? I can't get it working ..., here's an example:
<arne.mueller>
<arne.mueller>> a = GRanges(seqnames="A", ranges=IRanges(start=1:3, width=5))
<arne.mueller>> b = GRanges(seqnames="A", ranges=IRanges(start=c(10,20,30), width=5))
<arne.mueller>> grl = GRangesList(a, b)
<arne.mueller>> sapply(grl, length)
<arne.mueller>[1] 3 3
<arne.mueller>> mclapply(grl, length, mc.cores=2)
<arne.mueller>[[1]]
<arne.mueller>[1] "Error in as.list.default(X) : \n  no method for coercing this S4 
<arne.mueller>class to a vector\n"
<arne.mueller>
<arne.mueller>[[2]]
<arne.mueller>[1] "Error in as.list.default(X) : \n  no method for coercing this S4 
<arne.mueller>class to a vector\n"
<arne.mueller>
<arne.mueller>
<arne.mueller>> sessionInfo()
<arne.mueller>R version 2.13.0 Under development (unstable) (2010-12-20 r53870)
<arne.mueller>Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
<arne.mueller>
<arne.mueller>locale:
<arne.mueller>[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
<arne.mueller>
<arne.mueller>attached base packages:
<arne.mueller>[1] stats     graphics  grDevices utils     datasets  methods   base 
<arne.mueller>
<arne.mueller>other attached packages:
<arne.mueller>[1] multicore_0.1-3     GenomicRanges_1.3.7 IRanges_1.9.17 
<arne.mueller>
<arne.mueller>loaded via a namespace (and not attached):
<arne.mueller>[1] tools_2.13.0
<arne.mueller>
<arne.mueller>    thanks a lot for hints ..
<arne.mueller>
<arne.mueller>   arne
<arne.mueller>	[[alternative HTML version deleted]]
<arne.mueller>
<arne.mueller>_______________________________________________
<arne.mueller>Bioconductor mailing list
<arne.mueller>Bioconductor at r-project.org
<arne.mueller>https://stat.ethz.ch/mailman/listinfo/bioconductor
<arne.mueller>Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
Stefano Calza, PhD
Researcher/Assistent Professor - Biostatistician

*Sezione di Statistica Medica e Biometria
 Dipartimento di Scienze Biomediche e Biotecnologie
 Università degli Studi di Brescia - Italy
 Viale Europa, 11 25123 Brescia

 email: stefano.calza at med.unibs.it
        stefano.calza at biostatistics.it

 pec: stefano.calza at pec.biostatistics.it

 Phone: +390303717653
 Fax: +390303717488



More information about the Bioconductor mailing list