Space Ranger1.2, printed on 11/13/2024
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.
These are the command line arguments (also accessible by running spaceranger targeted-compare --help):
Argument | Description |
---|---|
--id=ID | A unique run ID string: e.g. TGTCMP123 |
--targeted=MOL_INFO_H5 | Path to a molecule_info.h5 file from a Targeted Gene Expression Analysis. |
--parent=MOL_INFO_H5 | Path to a molecule_info.h5 file from a Spatial Gene Expression Analysis. |
--target-panel=CSV | Target panel CSV file from the targeting experiment. Must be the same target set used as the --target-panel flag used in the targeted gene expression analysis. |
Resuming the above example, run spaceranger targeted-compare as follows:
$ 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:
2020-06-29 12:25:58 [runtime] (join_complete) ID.TGTCMP123.TARGETED_COMPARE_CS.TARGETED_COMPARE.SUMMARIZE_COMPARISON Outputs: - 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. TGTCMP123/runs/outs
) will contain the following files:
File Name | Description |
---|---|
web_summary.html | Run summary metrics and charts in HTML format. |
metrics_summary.csv | Run summary metrics in CSV format. |
barcode_summary.csv | Per-barcode data in the Targeted and Parent samples. |
feature_summary.csv | Per-gene data in the Targeted and Parent samples. |
See Targeted-Compare Outputs for more information on these output files.