[Bioc-devel] memory inefficiency problem of building MSPC packages
Gabe Becker
becker.gabe at gene.com
Mon Aug 8 22:33:55 CEST 2016
Jurat,
Have you tried posting on the bioconductor support site (
support.bioconductor.org)? That is the appropriate venue for usage
questions such as yours, and I suspect you may get a better response there.
The bioc-devel mailinglist is intended for a different type of question.
Best,
~G
On Mon, Aug 1, 2016 at 11:53 PM, Jurat Shayidin <juratbupt at gmail.com> wrote:
> Bioc-devel:
> I haven been developing Bioconductor Package for multiple sample peak
> calling, and all unit test for my packages is done efficiently. However, I
> have one minor problem that cause memory inefficiency when building the
> packages in my machines. To get straight, I am going to find overlap for
> multiple GRanges objects simultaneously and proceed joint analysis for
> multiple ChIP-Seq sample to rescue weak enriched region by helping with
> co-localized evidence of multiple GRanges . After I reviewed all my source
> code, indeed some paired overlap repeated many times that cause unnecessary
> memory usage.
> This is my custom function that I developed, it works perfectly in my
> current workflow, but cause memory inefficiency problem.
>
> grs <- GRangeslist(gr1, gr2, gr3, gr4, ...)
>
> overlap <- function(grs, idx=1L, FUN=which.min) {
> chosen <- grs[[idx]]
> que.hit <- as(findOverlaps(chosen), "List")
> sup.hit <- lapply(grs[-idx], function(ele_) {
> ans <- as(findOverlaps(chosen, ele_), "List")
> out.idx0 <- as(FUN(extractList(ele_$p.value, ans)), "List")
> out.idx0 <- out.idx0[!is.na(out.idx0)]
> ans <- ans[out.idx0]
> })
> res <- c(list(que.hit), sup.hit)
> return(res)
> }
>
> How can I optimize my custom function without memory inefficiency? How can
> I get rid of repeated overlapped paired GRanges? How can I efficiently
> solve this issue? Can anyone propose possible ideas to get through this
> problem? Thanks a lot
>
>
>
> --
> Jurat Shahidin
> Ph.D. candidate
> Dipartimento di Elettronica, Informazione e Bioingegneria
> Politecnico di Milano
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
>
--
Gabriel Becker, Ph.D
Associate Scientist
Bioinformatics and Computational Biology
Genentech Research
[[alternative HTML version deleted]]
More information about the Bioc-devel
mailing list