Running spaceranger as cluster mode that uses Sun Grid Engine (SGE) as queuing.
There are 2 steps to analyze Spatial RNA-seq data1.
spaceranger mkfastq demultiplexes raw base call (
BCL) files generated by Illumina sequencers into FASTQ files.
spaceranger count takes FASTQ files from
spaceranger mkfastq and performs alignment, filtering, barcode counting, and UMI counting.
Running pipelines on cluster requires the following:
1. Load Space Ranger module (
spaceranger-1.0.0)1 or, download and uncompress spaceranger at your
$HOME directory and add PATH in
2. Update job config file (
spaceranger-1.0.0/external/martian/jobmanagers/config.json) for threads and memory. For example
3. Update template file (
#$ -pe smp __MRO_THREADS__
##$ -l mem_free=__MRO_MEM_GB__G (comment this line if your cluster do not support it!)
#$ -q b.q
#$ -S /bin/bash
#$ -m abe
#$ -M <e-mail>
source ../spaceranger-1.0.0/sourceme.bash (update with complete path)
For clusters whose job managers do not support memory requests, it is possible to request memory in the form of cores via the
--mempercore command-line option. This option scales up the number of threads requested via the
__MRO_THREADS__ variable according to how much memory a stage requires.
Read more at Cluster Mode
4. Download spatial gene expression, image file and reference genome datasets from 10XGenomics.
Output files will appear in the out/ subdirectory within this pipeline output directory.
For pipeline output directory, the
--id argument is used i.e Adult_Mouse_Brain.
spaceranger count --disable-ui \
6. Execute a command in screen and, detach and reconnect
screen command to get in/out of the system while keeping the processes running.
screen -S screen_name
If you want to exit the terminal without killing the running process, simply press
To reconnect to the screen:
screen -R screen_name
7. Monitor work progress through a web browser
_log file present in output folder
If you see serving UI as
http://cluster.university.edu:3600?auth=rlSdT_QLzQ9O7fxEo-INTj1nQManinD21RzTAzkDVJ8, then type the following from your laptop
ssh -NT -L 9000:cluster.university.edu:3600 firstname.lastname@example.org
Then access the UI using the following URL in your web browser