using distinct versions of SEURAT on a SLURM cluster
3
0
Entering edit mode
21 months ago
Bogdan ★ 1.1k

Dear all, 'd appreciate having your suggestions on the following please :

I am running scRNA-seq analyses (in R 3.6.1) on a SLURM CLUSTER , and I do have 2 scripts :

a) a script that requires the package Seurat 2.3.4 (historically, for "compatibility" with older data), and

b) another script that requires (a newer version) Seurat 3.1.

When I submit the jobs to the SLURM cluster, how could specify in the R script the use of the library Seurat 2.3.4 versus Seurat 3.1 ?

(as we know, when we load the Seurat library , we just write : library("Seurat"), without specifying the version).

do I need to use a docker/singularity container for R.3.6.1 with Seurat 2.3.4, and another docker/singularity container with Seurat 3.1 ? thanks !

Seurat scRNAseq • 674 views
3
Entering edit mode
19 months ago

Consider using packrat for managing your environment: https://rstudio.github.io/packrat/

0
Entering edit mode

thank you very much ! stay healthy, be safe !

2
Entering edit mode
21 months ago
ATpoint 55k

I would probably make two separate environments, e.g. via conda and then install in each of them the version you need. You can then simply set RSCRIPT="/path/to/anaconda/environment(1/2)/bin/Rscript for the respective jobs. If possible I would try tough to convert the "older" data to a Seurat3 compatible format (just thinking aloud, you probably thought about that already).

0
Entering edit mode

thanks a lot for your suggestion on making 2 separate virtual environments ... very helpful !

1
Entering edit mode
21 months ago
GenoMax 108k

Sounds like your cluster does not use modules. Otherwise you could do this at that level when you submit SLURM jobs.

0
Entering edit mode

It does use modules ; typically, we do write "module load r/3.6"

0
Entering edit mode

Ah I see. You are referring to using distinct versions of seurat with same R. I suppose you could build two modules for R with two separate versions of seurat. Analogous to conda solution suggested below. I suppose you can use the conda solution on your own where as for the modules you will need to get your sys admins to do that.

0
Entering edit mode

thank you very much for your suggestion ;)