Space Ranger1.3, printed on 10/31/2024
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:
--fastqs
)
TIFF
or JPEG
format:
--image
for brightfield image--darkimage
for dark background fluorescence image--colorizedimage
for composite colored fluorescence image--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--transcriptome
)--target-panel
flagFor a list of accepted arguments, see the Command Line Argument Reference below, or run spaceranger count --help.
Select the tab 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 code in red indicates user specific inputs.
$ cd /home/jdoe/runs $ spaceranger count --id=sample345 \ #Output directory --transcriptome=/opt/refdata/GRCh38-2020-A \ #Path to Reference --target-panel=/opt/spaceranger-1.3.0/target_panels/immunology_v1.0_GRCh38-2020-A.target_panel.csv \ #Path to the Target Panel CSV --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \ #Path to FASTQs --sample=mysample \ #Sample name from FASTQ filename --image=/home/jdoe/runs/images/sample345TIFF \ #Path to brightfield image input --slide=V19J01-123 \ #Slide ID --area=A1 \ #Capture area --localcores=8 \ #Allowed cores in localmode --localmem=64 #Allowed memory (GB) in localmode
To generate spatial feature counts for a single library 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 code in red indicates user specific inputs.
$ cd /home/jdoe/runs $ spaceranger count --id=sample345 \ #Output directory --transcriptome=/opt/refdata/GRCh38-2020-A \ #Path to Reference --target-panel=/opt/spaceranger-1.3.0/target_panels/immunology_v1.0_GRCh38-2020-A.target_panel.csv \ #Path to the Target Panel CSV --fastqs=/home/jdoe/runs/HAWT7ADXX/outs/fastq_path \ #Path to FASTQs --sample=mysample \ #Sample name from FASTQ filename --image=/home/jdoe/runs/images/sample345TIFF \ #Path to brightfield image input --slide=V19J01-123 \ #Slide ID --area=A1 \ #Capture area --loupe-alignment=sample345.json \ #Manual alignment file --localcores=8 \ #Allowed cores in localmode --localmem=64 #Allowed memory (GB) in localmodeThe 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.
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 /opt/spaceranger-1.3.0
, then the target panel CSVs will be contained in /opt/spaceranger-1.3.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 from a Targeted Gene Expression analysis is generally similar to output from non-targeted analysis—see the table below for a comprehensive list of differences. The primary changes are:
The raw feature-barcode matrices and molecule info H5 file still provide information about all genes.
File Name | Description | Differences for Targeted Gene Expression |
---|---|---|
web_summary.html | Run summary metrics and charts in HTML format | Contains additional Targeted Gene Expression metrics |
metrics_summary.csv | Run summary metrics in CSV format | Contains additional Targeted Gene Expression metrics |
possorted_genome_bam.bam | Reads aligned to the genome and transcriptome annotated with barcode information | Reads not analyzed due to high sequencing depth and subsampling are unmapped and indicated using the xf:i:32 tag |
possorted_genome_bam.bam.bai | Index for possorted_genome_bam.bam | Generally unchanged |
filtered_feature_bc_matrix | Filtered feature-barcode matrices containing only tissue-associated barcodes in MEX format | Contains only targeted genes |
filtered_feature_bc_matrix.h5 | Filtered feature-barcode matrices containing only tissue-associated barcodes in HDF5 format | Contains only targeted genes* |
raw_feature_bc_matrices | Unfiltered feature-barcode matrices containing all barcodes in MEX format | Generally unchanged |
raw_feature_bc_matrix.h5 | Unfiltered feature-barcode matrices containing all barcodes in HDF5 format | Generally unchanged* |
analysis | Secondary analysis data including dimensionality reduction, spot clustering, and differential expression | Secondary analysis performed only on the targeted genes |
molecule_info.h5 | Molecule-level information used by secondary analysis spaceranger pipelines including aggr, targeted-compare and targeted-depth | Generally unchanged* |
cloupe.cloupe | Loupe Browser visualization and analysis file | Contains only targeted genes |
target_panel.csv | Target Panel CSV file | Only present for Targeted Gene Expression data |
spatial/ | Directory containing QC images for aligned fiducials and detetected tissue in jpg format, scalefactors_json.json , high and low resolution versions of the input image in png format, and tissue_positions_list.csv | Generally unchanged |
* HDF5 files now contain indices of the targeted genes within the features
HDF5 group.
Once spaceranger count has successfully completed, you can further explore the results by:
.cloupe
file in
Loupe BrowserThe list of all the relevant arguments are described in Single-Library Analysis with spaceranger count or run spaceranger count --help.
Argument | Description |
---|---|
--target-panel | Required for Targeted Gene Expression analysis. Path to a Target Panel CSV file declaring the target panel used. |
--rps-limit | Optional for Targeted Gene Expression analysis. Subsample to at most N mean reads under tissue per spot for targeted gene expression if N > 0, or disable subsampling if N = 0. Modifying this parameter is not recommended. The default value of N is 15,000 reads under tissue per spot for targeted gene expression. See Targeted Algorithms for details. |