HOME  ›   pipelines
If your question is not answered here, please email us at:  ${email.software}

10x Genomics
Visium Spatial Gene Expression

Space Ranger Installation

Table of Contents

Space Ranger is delivered as a single, self-contained tar file that can be unpacked anywhere on your system. It bundles all of its required software dependencies, which are pre-compiled to run on a wide range of Linux distributions.

For convenience, the reference data package required for Space Ranger is provided as a separate download.

Download and install

Step 1 – Download and unpack the Space Ranger file in any location. This example uses /opt.

$ cd /opt
[ download file from downloads page ]
$ tar -xzvf spaceranger-2.0.1.tar.gz

This unpacks Space Ranger, its dependencies, and the spaceranger script into a new directory called spaceranger-2.0.1.

Step 2 – Download and unpack any of the reference data files in a convenient location:

[ download file from downloads page ]
$ tar -xzvf refdata-gex-GRCh38-2020-A.tar.gz

This creates a new directory called refdata-gex-GRCh38-2020-A that contains a single reference (in this case, GRCh38). Each reference contains a set of pre-generated indices and other data required by Space Ranger.

Step 3 – Prepend the Space Ranger directory to your $PATH. This allows you to invoke the spaceranger command.

If you unpacked both Space Ranger and the reference data into /opt, then run the following command:

$ export PATH=/opt/spaceranger-2.0.1:$PATH

For convenience, you can add this command to your .bashrc

Site check script

Next, run the bundled site check script and send the output to 10x Genomics. If requested, we will review the information to ensure that Space Ranger runs smoothly once you have generated your own Visium data. Assuming you have installed Space Ranger as described above, run the following commands after replacing the code in red with your email:

$ spaceranger sitecheck > sitecheck.txt
$ spaceranger upload [email protected] sitecheck.txt

If you plan to run Space Ranger on a cluster, run and send us the output twice, once on a submit host and once on a cluster node.

If your system does not have direct internet connectivity, send the output files as attachments to [email protected].

Verify installation

To ensure that the spaceranger pipeline is installed correctly, use spaceranger testrun. This test can take up to 60 minutes on a sixteen-core workstation. Assuming you have installed Space Ranger into /opt, the command to run the test looks like:

$ export PATH=/opt/spaceranger-2.0.1:$PATH
$ spaceranger testrun --id=tiny
-----------------------------------------------------------------------------
Running preflight checks (please wait)...
Checking sample info...
Checking FASTQ folder...
Checking reference...
 
...
 
Pipestance completed successfully!

A tiny.mri.tgz file is created inside the tiny/ folder and contains diagnostic information 10x can use to help resolve any problems. It is generated whether the pipeline succeeds or fails. If the pipeline fails and you need troubleshooting assistance, you can send this file directly to us from the command line. Replace the code in red with your email:

$ spaceranger upload [email protected] tiny/tiny.mri.tgz

If your system does not have direct internet connectivity, you can also send the file as an attachment to [email protected].