bcl2fastq

Docker

Read this tutorial if you are new to Docker and don’t know how to write your Dockerfile.

First, you need to download bcl2fastq software from its official website, which requires your registration. After registration, choose its Linux rpm format file for downloading.

Then for a Debian based docker (e.g. continuumio/miniconda3), add the lines below into its Dockerfile to install bcl2fastq:

RUN apt-get install --no-install-recommends -y alien unzip
ADD bcl2fastq2-v2-20-0-linux-x86-64.zip /software/
RUN unzip -d /software/ /software/bcl2fastq2-v2-20-0-linux-x86-64.zip && alien -i /software/bcl2fastq2-v2.20.0.422-Linux-x86_64.rpm && rm /software/bcl2fastq2-v2*

where bcl2fastq2-v2-20-0-linux-x86-64.zip is located in the same directory of your Dockerfile file.

You can host your private docker images in the Google Container Registry.

Workflows

Workflows such as cellranger_workflow and dropseq_workflow provide the option of running bcl2fastq. We provide dockers containing bcl2fastq that are accessible only by members of the Broad Institute. Non-Broad Institute members will have to provide their own docker images.

Example

In this example we create a docker image for running cellranger mkfastq version 3.0.2.

  1. Create a GCP project or reuse an existing project.

  2. Enable the Google Container Registry

  3. Clone the cumulus repository:

    git clone https://github.com/klarman-cell-observatory/cumulus.git
    
  4. Add the lines to cumulus/docker/cellranger/3.0.2/Dockerfile to include bcl2fastq (see Docker).

  5. Ensure you have Docker installed

  6. Download cellranger from https://support.10xgenomics.com/single-cell-gene-expression/software/downloads/3.0

  7. Build, tag, and push the docker. Remember to replace PROJECT_ID with your GCP project id:

    cd cumulus/docker/cellranger/3.0.2/
    docker build -t cellranger-3.0.2 .
    docker tag cellranger-3.0.2 gcr.io/PROJECT_ID/cellranger:3.0.2
    gcr.io/PROJECT_ID/cellranger:3.0.2
    
  8. Import cellranger_workflow workflow to your workspace (see cellranger_workflow steps), and enter your docker registry URL (in this example, "gcr.io/PROJECT_ID/") in cellranger_mkfastq_docker_registry field of cellranger_workflow inputs.