Support homeSpace Ranger 2.1Analysis
Targeted Gene Expression Analysis

Targeted Gene Expression Analysis

Important
After June 30, 2023, new Space Ranger releases will no longer support Targeted Gene Expression analysis.

Space Ranger provides the same interface and features for both Targeted and Whole Transcriptome Analysis (WTA) Gene Expression data, as described in [Single-Library Analysis with spaceranger count]. The workflow diagram shows all the required inputs and the corresponding spaceranger count flags for Targeted Gene Expression analysis:

The spaceranger count is run on each individual Capture Area in the Visium slide. The required inputs are:

  • The FASTQ files for a given capture area (--fastqs)
    • If starting with Illumina BCL output folder, follow the [instructions on running spaceranger mkfastq] to generate FASTQ files
    • For help on which arguments to use to target a particular set of FASTQs, consult Specifying Input FASTQ Files for 10x Pipelines
  • The corresponding [capture area image] in either TIFF, QPTIFF or JPEG format
    • --image for brightfield image
    • --darkimage for dark background fluorescence image
    • --colorizedimage for composite colored fluorescence image
  • The [slide layout GPR file] specified by
    • --slide & --area if spaceranger has access to internet
    • --slidefile, --slide & --area if spaceranger has no access to internet. The slide layout file is directly [downloaded]
    • --unknown-slide if visium slide details are unknown
  • The [reference transcriptome] for the species from which the sample was obtained
    (--transcriptome)
  • The relevant Target Panel CSV file specified using the --target-panel flag

For a list of accepted arguments, see the [Command Line Argument Reference], or run spaceranger count --help. The following code examples assume compute platforms are connected to the internet wherespaceranger uses the value of the --slide argument to automatically download the slide layout file in gpr format. In absence of internet connectivity to the compute platform, the user can download the slide specific layout file in gpr format and provide it to spaceranger using the --slidefile argument. Refer to the [Running spaceranger count (FF)] tutorial for detailed walkthrough.

Select the section corresponding to the imaging workflow.

To generate spatial feature counts for a single library using automatic fiducial alignment and tissue detection on a brightfield image input, run spaceranger count with the following arguments. The highlighted code indicates inputs that need not be changed.

1cd /home/jdoe/runs 2spaceranger count --id=sample345 \ #Output directory 3 --transcriptome=/home/jdoe/refdata/GRCh38-2020-A \ #Path to Reference 4 --target-panel=/home/jdoe/spaceranger-1.3.0/target_panels/immunology_v1.0_GRCh38-2020-A.target_panel.csv \ #Path to the Target Panel CSV 5 --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \ #Path to FASTQs 6 --sample=mysample \ #Sample name from FASTQ filename 7 --image=/home/jdoe/runs/images/sample345.tiff \ #Path to brightfield image 8 --slide=V19J01-123 \ #Slide ID 9 --area=A1 \ #Capture area 10 --localcores=8 \ #Allowed cores in localmode 11 --localmem=64 #Allowed memory (GB) in localmode

Following a set of preflight checks to validate input arguments, spaceranger count pipeline stages will begin to run.

To generate spatial feature counts for a single library FFPE sample using a fiducial alignment and tissue assignment JSON file generated in Loupe Browser on a brightfield image input, run spaceranger count with the following arguments. The highlighted code indicates inputs that need not be changed.

1cd /home/jdoe/runs 2spaceranger count --id=sample345 \ #Output directory 3 --transcriptome=/home/jdoe/refdata/GRCh38-2020-A \ #Path to Reference 4 --target-panel=/home/jdoe/spaceranger-1.3.0/target_panels/immunology_v1.0_GRCh38-2020-A.target_panel.csv \ #Path to the Target Panel CSV 5 --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \ #Path to FASTQs 6 --sample=mysample \ #Sample name from FASTQ filename 7 --image=/home/jdoe/runs/images/sample345.tiff \ #Path to brightfield image 8 --slide=V19J01-123 \ #Slide ID 9 --area=A1 \ #Capture area 10 --loupe-alignment=sample345.json \ #Manual fiducial alignment file 11 --localcores=8 \ #Allowed cores in localmode 12 --localmem=64 #Allowed memory (GB) in localmode

The arguments to specify the fluorescence image can be either --darkimage or
--colorizedimage depending on the image format. Details about the different supported fluorescence image formats are described in Image Recommendations.

Following a set of preflight checks to validate input arguments, spaceranger count pipeline stages will begin to run.

Target panel CSV files corresponding to predesigned gene panels can be found within the target_panels directory in the Space Ranger package. Spatial Gene Expression does not include support for fully custom panels.

target_panels/ ├── gene_signature_v1.0_GRCh38-2020-A.target_panel.csv ├── immunology_v1.0_GRCh38-2020-A.target_panel.csv ├── neuroscience_v1.0_GRCh38-2020-A.target_panel.csv └── pan_cancer_v1.0_GRCh38-2020-A.target_panel.csv

For example, if you installed Space Ranger to /home/jdoe/spaceranger-2.0.0, then the target panel CSVs will be contained in /home/jdoe/spaceranger-2.0.0/target_panels.

For the target panel CSV files, go to:

  • The Panel Selection page for information about each panel as well as direct downloads of all the accompanying files.
  • The Panel File Descriptions page for detailed documentation on all the file formats used in targeted analysis.

The output of the pipeline is contained in a folder named with the sample ID you specified (such as sample345). If this folder already exists, in a rerun with the original parameters, spaceranger will assume it is an existing pipestance and attempt to resume running it. The subfolder named outs contains the [main pipeline outputs].