Module Cell Ranger

Module Cell Ranger

Interactive job

Open an interactive session to a compute node. Adjust the number of CPUs (--cpus-per-task 32) and the amount of memory (--mem 112G) needed for your job.

srun --cpus-per-task 32 --mem 112G --pty bash

Load Cell Ranger module (optionally, load sratoolkit for additional functions such as fasterq-dump). 

There are multiple versions of Cell Ranger installed on the cluster (6.0.2, 7.2.0, 8.0.1, 9.0.1, and 10.1.0). Run the command "module avail cellranger" to see the versions available. The following scripts assume version 7.2.0.

module load cellranger/7.2.0 module load sratoolkit/3.0.7

Run Cell Ranger (parameters will vary per job type).

cellranger count --id=$id --fastqs=$fastqs --sample=$sample --transcriptome=$transcriptome --localcores 32 --localmem 112
[user@athena1 ~]$ srun --cpus-per-task 32 --mem 112G --pty bash [user@athena101 ~]$ module load cellranger/7.2.0 [user@athena101 ~]$ module load sratoolkit/3.0.7 [user@athena101 ~]$ cellranger count --id=$id --fastqs=$fastqs --sample=$sample --transcriptome=$transcriptome --localcores 32 --localmem 112

Batch job

Create the Slurm script file. Adjust the number of CPUs (--cpus-per-task 32) and the amount of memory (--mem 112G) needed for your job.

CellRanger_slurm_script.sh
#!/bin/bash #SBATCH --job-name CellRanger_job #SBATCH --output CellRanger_job_output.log #SBATCH --error CellRanger_job_error.log #SBATCH --cpus-per-task 32 #SBATCH --mem 112G module load R/7.2.0 module load sratoolkit/3.0.7 id=... fastqs=... sample=... transcriptome=... cellranger count --id=$id --fastqs=$fastqs --sample=$sample --transcriptome=$transcriptome --localcores $SLURM_CPUS_PER_TASK --localmem $SLURM_MEM_PER_NODE

Submit the job to Slurm.

sbatch CellRanger_slurm_script.sh

Monitor the execution of your job in the Slurm queue.

squeue -u $USER

The job may show up in the queue as running (R) or pending (PD). When the job completes, it will disappear from the queue and you can check the output.

[user@athena1 ~]$ sbatch CellRanger_slurm_script.sh Submitted batch job 123 [user@athena1 ~]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## Job is running with JOBID 123 123 cpu CellRanger_job user R 0:01 1 athena101 [user@athena1 ~]$ squeue -u $USER JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) ## JOBID 123 completed and exited the queue [user@athena1 ~]$ cat CellRanger_job_output.log ...