diff --git a/docker/cellbender/0.3.0/Dockerfile b/docker/cellbender/0.3.0/Dockerfile new file mode 100644 index 00000000..d9b370cd --- /dev/null +++ b/docker/cellbender/0.3.0/Dockerfile @@ -0,0 +1,50 @@ +# Start from nvidia-docker image with drivers pre-installed to use a GPU +FROM nvcr.io/nvidia/cuda:11.7.1-base-ubuntu22.04 + +LABEL description="This docker is modified from the official BSD-3-Clause licensed CellBender dockerfile (https://github.com/broadinstitute/CellBender/blob/master/docker/Dockerfile)." + +# Install curl and sudo and git and miniconda and pytorch, cudatoolkit, pytables, and cellbender +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + curl \ + wget \ + rsync \ + ca-certificates \ + unzip + +RUN curl -so miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-py37_23.1.0-1-Linux-x86_64.sh && \ + bash miniconda.sh -b -p /opt/miniconda3 && \ + rm miniconda.sh + +ENV PATH=/opt/miniconda3/bin:$PATH \ + DOCKER=true \ + CONDA_AUTO_UPDATE_CONDA=false + +RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \ + apt-get update -y && apt-get install -y google-cloud-cli + +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.15.10.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install && \ + rm awscliv2.zip + +RUN pip install stratocumulus==0.2.1 + +RUN wget https://github.com/broadinstitute/CellBender/archive/refs/tags/v0.3.0.tar.gz && \ + tar -xzf v0.3.0.tar.gz && \ + rm v0.3.0.tar.gz && \ + mkdir /software && \ + mv CellBender-0.3.0 /software/CellBender && \ + cd /software/CellBender && \ + pip install -e . + +RUN apt-get -qq -y autoremove && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /var/log/dpkg.log + +ADD https://raw.githubusercontent.com/lilab-bcb/cumulus/master/docker/monitor_script.sh /software +RUN chmod a+rx /software/monitor_script.sh + +# Add cellbender command to PATH +ENV PATH=/software:$PATH diff --git a/docs/cellbender.rst b/docs/cellbender.rst index 31aeb5ae..837c9560 100644 --- a/docs/cellbender.rst +++ b/docs/cellbender.rst @@ -63,13 +63,15 @@ Below are inputs for *CellBender* workflow. Notice that required inputs are **in - "gs://fc-e0000000-0000-0000-0000-000000000000/my-project/cellbender_output" - * - expected_cells - - Number of cells expected in the dataset (a rough estimate within a factor of 2 is sufficient). + - | Number of cells expected in the dataset (a rough estimate within a factor of 2 is sufficient). + | **Notice:** If *cellbender_version* is ``0.3.0``, no need to specify this parameter. - 2048 - - ``None`` + - Automatically inferred from data * - total_droplets_included - - The number of droplets from the rank-ordered UMI plot that will be analyzed. The largest *total_droplets_included* droplets will have their cell probabilities inferred as an output. - - 25000 + - | The number of droplets from the rank-ordered UMI plot that will be analyzed. The largest *total_droplets_included* droplets will have their cell probabilities inferred as an output. + | **Notice:** If *cellbender_version* is ``0.3.0``, no need to specify this parameter. - 25000 + - Automatically inferred from data * - model - Which model is being used for count data: @@ -127,9 +129,9 @@ Below are inputs for *CellBender* workflow. Notice that required inputs are **in - "quay.io/cumulus" - "quay.io/cumulus" * - cellbender_version - - CellBender version to use. Currently available: ``0.2.0``. - - "0.2.0" - - "0.2.0" + - CellBender version to use. Currently available: ``0.3.0``, ``0.2.0``. + - "0.3.0" + - "0.3.0" * - zones - Google cloud zones to consider for execution. Only works if *backend* is ``gcp``. - "us-east1-d us-west1-a us-west1-b" diff --git a/workflows/cellbender/cellbender.wdl b/workflows/cellbender/cellbender.wdl index 32eb3508..7856eec3 100644 --- a/workflows/cellbender/cellbender.wdl +++ b/workflows/cellbender/cellbender.wdl @@ -12,8 +12,8 @@ workflow cellbender { String output_directory # Docker image for cellbender remove-background version String docker_registry = "quay.io/cumulus" - # Cellbender version to use. Currently support: 0.2.0 - String cellbender_version = "0.2.0" + # Cellbender version to use. Currently support: 0.3.0, 0.2.0 + String cellbender_version = "0.3.0" # Expected cells Int? expected_cells @@ -156,7 +156,7 @@ task run_cellbender_remove_background_gpu { ~{"--learning-rate " + learning_rate} \ ~{true="--exclude-antibody-capture" false=" " exclude_antibody_capture} - strato cp --backend ~{backend} ~{sample_name}_out* ~{output_directory}/~{sample_name}/ + strato cp ~{sample_name}_out* ~{output_directory}/~{sample_name}/ } output {