Support homeSpace Ranger 2.1Analysis
Comparing Targeted and Parent Samples with spaceranger targeted-compare

Comparing Targeted and Parent Samples with spaceranger targeted-compare

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

Targeted Gene Expression libraries are derived by performing hybrid capture on a Spatial Gene Expression library. This starting input library, referred to as the [parent library], therefore contains the molecules present in the targeted library. While it is not necessary to sequence this parent sample when analyzing Targeted Gene Expression data, if both the targeted and parent samples have been sequenced, the targeted-compare pipeline may be used to directly compare the two datasets. This pipeline can be used to assess targeting performance with greater accuracy than when only the targeted data are known. This comparative analysis provides quality control metrics to verify the extent to which targeted genes were enriched and the parent sample data were recovered.

First, run spaceranger count on the parent sample (see [Single-Library Analysis with Space Ranger]). Then run spaceranger count --target-panel target_panel.csv (see [Targeted Gene Expression Analysis]). The targeted and parent samples must be run using the same transcriptome reference. For example:

cd /home/jdoe/runs spaceranger count --id=targeted_sample --target-panel=target_panel.csv ... # wait for pipeline to finish spaceranger count --id=parent_sample ... # wait for pipeline to finish

After the above two analyses are complete, run targeted-compare as outlined in the following section.

For a list of accepted arguments, see the [Command Line Argument Reference], or run spaceranger targeted-compare --help.

cd /home/jdoe/runs spaceranger targeted-compare --id=TGTCMP123 \ --targeted=targeted_sample/outs/molecule_info.h5 \ --parent=parent_sample/outs/molecule_info.h5 \ --target-panel target_panel.csv

The pipeline will begin to run, creating a new folder named with the ID you specified (e.g. /home/jdoe/runs/TGTCMP123) for its output. If this folder already exists, spaceranger will assume it is from an incomplete targeted-compare run and attempt to resume running it.

A successful run should conclude with a message similar to this:

- Sample comparison summary HTML: /home/jdoe/runs/TGTCMP123/outs/web_summary.html - Sample comparison summary CSV: /home/jdoe/runs/TGTCMP123/outs/metrics_summary.csv - Per barcode metrics CSV: /home/jdoe/runs/TGTCMP123/outs/barcode_summary.csv - Per feature metrics CSV: /home/jdoe/runs/TGTCMP123/outs/feature_summary.csv Pipestance completed successfully!

The output folder (e.g. /runs/TGTCMP123/outs) will contain the following files.

File NameDescription
web_summary.htmlRun summary metrics and charts in HTML format.
metrics_summary.csvRun summary metrics in CSV format.
barcode_summary.csvPer-barcode data in the Targeted and Parent samples.
feature_summary.csvPer-gene data in the Targeted and Parent samples.

See [Targeted-Compare Outputs] for more information on these output files.