scvitools:Probabilistic models for single-cell omics data
scvi-tools (single-cell variational inference tools) is a package for end-to-end analysis of single-cell omics data primarily developed and maintained by the Yosef Lab at UC Berkeley. scvi-tools has two components
Documentation
Important Notes
- Module Name: scvitools (see the modules page for more information)
- python-scvitools scvitools wrapper for python
- scvitools can only run on P100 or newer GPUs
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@biowulf]$ sinteractive --mem=4g --gres=gpu:p100:1 [user@cn3144 ~]$ module load scvitools/1.0.4.gpu
[user@cn3144 ]$ cd /data/$USER; [user@cn3144 ]$ python-scvitools >>> import os >>> import tempfile >>> >>> import scanpy as sc >>> import scvi /usr/local/apps/scvitools/conda/envs/scvi-env/lib/python3.9/site-packages/scvi/_settings.py:63: UserWarning: Since v1.0.0, scvi-tools no longer uses a random seed by default. Run `scvi.settings.seed = 0` to reproduce results from previous versions. self.seed = seed /usr/local/apps/scvitools/conda/envs/scvi-env/lib/python3.9/site-packages/scvi/_settings.py:70: UserWarning: Setting `dl_pin_memory_gpu_training` is deprecated in v1.0 and will be removed in v1.1. Please pass in `pin_memory` to the data loaders instead. self.dl_pin_memory_gpu_training = ( >>> import torch >>> scvi.settings.seed = 0 [rank: 0] Global seed set to 0 >>> print("Last run with scvi-tools version:", scvi.__version__) Last run with scvi-tools version: 1.0.4 >>> >>> import torch >>> torch.cuda.is_available() True >>> import jax >>> jax.default_backend() 'gpu'
Batch job
Most jobs should be run as batch jobs.
Create a batch input file (e.g. scvitools.sh). For example:
#!/bin/bash
#SBATCH --partition=gpu
#SBATCH --mem=40G
#SBATCH --cpus-per-task=8
#SBATCH --time=02:00:00
#SBATCH --gres=gpu:p100:1
#SBATCH --job-name=scvitools_test
module load scvitoos/1.0.4.gpu
set -e
cd /data/$USER/scvitools_test/
python-scvitools scit_xxx.py
Submit this job using the Slurm sbatch command.
sbatch --cpus-per-task=2 --mem=10g --partition=gpu --gres=gpu:v100x:1 scvitools.sh