Coder Social home page Coder Social logo

Comments (1)

JEFworks avatar JEFworks commented on August 19, 2024

Hi Song,

Thanks for trying it out!

For processing such a large number of cells, there are a few steps/functions that I anticipate may take a long time. Here are a few tips on how to parallelize those steps to speed up runtime.

  1. Identifying potential CNVs

To identify CNVs, HoneyBADGER first uses a HMM model. Currently, you may be running the default pipeline as:

potentialCnvs <- calcGexpCnvBoundaries(gexp.norm, genes, m=0.15, chrs=paste0('chr', c(1:22)), min.traverse=3, t=1e-6, min.num.genes=3, trim=0.1, verbose=FALSE)

This can be parallelized by chromosome, though unfortunately the process is not built in:

# parallelize across 22 cores for 22 chromosomes
potentialCnvs <- mclapply(paste0('chr', c(1:22)), function(chr) {
    calcGexpCnvBoundaries(gexp.norm, genes, m=0.15, chrs=chr, min.traverse=3, t=1e-6, min.num.genes=3, trim=0.1, verbose=FALSE)
}, mc.cores=22)
  1. Testing individual CNVs in individual cells

Again, this component can also be parallelized across your identified potential CNVs though unfortunately the parallelization is not built in. For example:

results <- mclapply(potentialCnvs$region, function(region) {
    results <- calcGexpCnvProb(gexp.mats$gexp.norm, gexp.mats$genes, 
     mvFit, region=region, verbose=TRUE)
}, mc.cores=length(potentialCnvs$region))

Because HoneyBADGER leverages information across cells within a Bayesian framework to infer the posterior probability of CNVs within individual cells, I would not recommend parallelizing by splitting up your cells into many small groups for example.

Hope that helps,
Jean

from honeybadger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.