rapids-singlecell on Biowulf

Rapids-singlecell offers enhanced single-cell data analysis as a near drop-in replacement predominantly for scanpy, while also incorporating select functionalities from squidpy and decoupler. Utilizing GPU computing with cupy and Nvidia’s RAPIDS, it emphasizes high computational efficiency.

References:

Documentation
Important Notes

Interactive job
Interactive jobs should be used for debugging, graphics, or applications that cannot be run as batch jobs.

Allocate an interactive session and run the program.
Sample session (user input in bold):

[user@biowulf]$ sinteractive --gres=gpu:1,lscratch:10 --constraint="gpuv100|gpuv100x|gpua100" -c 8 --mem=32g 
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144 ~]$ module load rapids-singlecell

[user@cn3144 ~]$ cd /data/$USER/

[user@cn3144 ~]$ cp $RSC_TEST_DATA .

[user@cn3144 ~]$ python3-rsc
Python 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:36:13) [GCC 12.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import scanpy as sc
>>> import rapids_singlecell as rsc
>>> adata = sc.read("krasnow_hlca_10x.sparse.h5ad")
>>> rsc.get.anndata_to_GPU(adata)

[user@biowulf ~]$

Run rapids-singlecell with jupyter notebook on single node:
[user@biowulf]$ sinteractive --gres=gpu:1,lscratch:10 --constraint="gpuv100|gpuv100x|gpua100" -c 8 --mem=32g -T
salloc.exe: Pending job allocation 46116226
salloc.exe: job 46116226 queued and waiting for resources
salloc.exe: job 46116226 has been allocated resources
salloc.exe: Granted job allocation 46116226
salloc.exe: Waiting for resource configuration
salloc.exe: Nodes cn3144 are ready for job

[user@cn3144]$ module load rapids-singlecell
[user@cn3144]$ jupyter-rsc lab --ip localhost --port $PORT1 --no-browser

Batch job
Most jobs should be run as batch jobs.

Create a batch input file (e.g. rapids-singlecell.sh). For example:

#!/bin/bash
set -e
module load rapids-singlecell
cd /data/$USER
python3-rsc run-rsc.py 

Submit this job using the Slurm sbatch command.

sbatch [--cpus-per-task=#] [--mem=#] rapids-singlecell.sh