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

10x Genomics
Visium Spatial Gene Expression

Evaluating Sequencing Depth for Targeted Gene Expression Libraries with spaceranger targeted-depth

Overview

Space Ranger 1.2 includes targeted-depth, a lightweight program for summarizing a whole transcriptome analysis (WTA) dataset in the context of a hypothetical Targeted Gene Expression experiment. Given an existing WTA dataset and a target panel CSV file, targeted-depth computes the fraction of reads mapped to targeted genes from the panel. This metric can help in two ways when performing a Targeted Gene Expression experiment based on the analyzed whole transcriptome library (or one from a similar sample):

Usage

The targeted-depth tool requires two inputs:

The spaceranger targeted-depth command can be invoked as follows:

spaceranger targeted-depth \
--molecule-h5 sample345/outs/molecule_info.h5 \
--target-panel /opt/spaceranger-1.2.0/target_panels/pan_cancer_v1.0_GRCh38-2020-A.target_panel.csv

Instructions can also be seen by displaying the help text: spaceranger targeted-depth -h.

Output

Input Sample Metrics

The top section of output from spaceranger targeted-depth contains metrics relating to the WTA input sample:

Whole Transcriptome Analysis (WTA) Input Sample Metrics:
---------------------------------------------------------
Number of Tissue-Covered Spots                      7,742
Number of Reads                               502,358,896
Mean Reads per Spot                                64,887
Sequencing Saturation                               85.2%
Fraction of Reads from Targeted Genes               4.79%
Number of Reads from Targeted Genes            24,045,376
Mean Reads per Spot from Targeted Genes             3,105

The first four metrics are Gene Expression metrics that do not involve the target gene panel, but are shown to give context to the other results.

The next three metrics quantify the sample's target gene content:

Recommended Sequencing Depths

The final section of the output indicates recommended sequencing depths for a Targeted Gene Expression library enriched from the analyzed whole transcriptome library (or one from a similar sample):

NOTE: The recommended sequencing depth for Targeted Gene Expression Libraries with spaceranger is 5,000-10,000 reads per tissue-covered spot.
Targeted GEX Recommended Sequencing Depths: WTA Depth Mean Reads per Spot Total Reads Original 6,211 48,090,752 30k rps 4,786 37,057,032
The recommended Targeted Gene Expression sequencing depth is calculated as 2.0 * WTA Depth * Fraction of Reads from Targeted Genes. The 2.0 depth adjustment factor can help compensate for reads outside of tissue-covered spots, non-uniform read coverage, and reads that cannot be mapped confidently to targeted genes. These are approximate estimates, and final results may vary. rps = Reads per Tissue-Covered Spot.

The recommended depths in the two columns above are computed as follows, based on the targeted fraction and depth (Mean Reads per Spot) of the WTA sample:

Recommended Mean Reads per Tissue-Covered Spot = 2.0 * [WTA Depth] * [WTA Fraction of Reads from Targeted Genes]
Recommended Total Reads = [Recommended Mean Reads per Tissue-Covered Spot] * [WTA Number of Tissue-Covered Spots]

The recommended Mean Reads per Tissue-Covered Spot is also equal to twice the Mean Reads per Tissue-Covered Spot from Targeted Genes in the WTA sample. The depth adjustment factor of 2 is used to provide a conservative recommendation. For example, this WTA sample had 64,887 mean reads per tissue-covered spot (rps) and 4.79% of reads from targeted genes, translating to a recommendation of 6,211 rps for the Targeted Gene Expression library, or about 48 million reads if the number of detected tissue-covered spots matches the WTA sample.

Recommendations are also given to approximately match the sensitivity of a whole transcriptome library sequenced to a depth of 30k rps. In the case where the WTA sample has very high sequence depth, and thus the targeted depth will be high, the recommended maximum targeted rps is 15,000.

Saving Output to a File

Output can be saved to a file instead of output to the console by appending > followed by a filename:

spaceranger targeted-depth \
--molecule-h5 sample345/outs/molecule_info.h5 \
--target-panel /opt/spaceranger-1.2.0/target_panels/pan_cancer_v1.0_GRCh38-2020-A.target_panel.csv \
> sample345_pan_cancer_depth.txt

Common errors

Incompatible reference and target gene panel: The molecule info H5 file must be created using a reference genome compatible with the target gene panel. The current required reference version is GRCh38 2020-A, which can be obtained from the Downloads page. An incompatible reference genome generates an error like this:

error: The gene ENSG00000286522 from the target panel csv is not present
in the reference transcriptome used by the molecule info h5 file.

Space Ranger does not support fully-custom panels, but does support add-ons to pre-defined panels.