hyunhwan-jeong / CB2

CB2 is an R package which provides functions for hit gene identification and quantification of sgRNA (single-guided RNA) abundances for CRISPR (Clustered Regularly Interspaced Short Palindromic Repeats) pooled screen data analysis. Details are in Jeong et al. (2019) <doi:10.1101/gr.245571.118> and Baggerly et al. (2003) <doi:10.1093/bioinformatics/btg173>.
https://cran.r-project.org/web/packages/CB2/index.html
Other
7 stars 1 forks source link

Cluster setup failed. 31 of 31 workers failed to connect. #13

Closed monovich closed 1 year ago

monovich commented 2 years ago

R 4.1 has a nasty bug involving the parallel package that seems to have been giving me Cluster setup failed. 31 of 31 workers failed to connect. errors whenever I attempt to run run_sgrna_quant without first executing parallel:::setDefaultClusterOptions(setup_strategy = "sequential"). This fix however makes execution speed untenably slow, so I've had to abandon R 4.1 altogether for this package and am now running CB2 in a singularity container with a prior R version.

Somewhat related, you may want to investigate replacing the paralleldependency with parallely or BiocParallel. Some of the parallel functions used in CB2 (i.e. detectCores) are now deprecated, but have replacements in parallely and BiocParallel.

Edit: For anyone who is having trouble running CB2 on R 4.1, but doesn't want to mess with rolling back to a prior version, this Singularity environment works well:

Bootstrap: docker
From: rocker/tidyverse:4.0.5

%post
    # Linux Dependencies
    # apt-get quiet level 2 (implies -y)
    apt-get update -qq && apt-get -y --no-install-recommends install \
    # RcppArmadillo/conquer lib dependencies
    liblapack-dev \
    liblapack3 \
    libopenblas-base \
    libopenblas-dev && \
    rm -rf /var/lib/apt/lists/*

    # R stuff
    # CB2 dependency multtest
    R -e "if (!requireNamespace('BiocManager', quietly = TRUE)) { install.packages('BiocManager') }"
    R -e "BiocManager::install('multtest')"
    # CB2
    R -e "install.packages('CB2', method='wget')"

%environment
    export R_VERSION=4.0.5
    export TERM=xterm
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
    export R_HOME=/usr/local/lib/R
    export CRAN=https://packagemanager.rstudio.com/cran/__linux__/focal/2021-05-17
    export TZ=Etc/UTC
hyunhwan-jeong commented 2 years ago

Thanks for reporting this, @monovich.

I am going to check this quickly and will respond to you as soon as possible.

Best regards,

Hyun-Hwan Jeong

hyunhwan-jeong commented 1 year ago

Sorry, and it has been a while. Have you had any chance to use the package? If so, are you still having the problem?

Hyun-Hwan Jeong