Import Space Ranger
Import Space Ranger can import spatial transcriptomics data from Space Ranger spatial outputs containing processed tissue images and barcode locations in those images. The importer produces a Spatial Transcriptomics Plot (
The importer can be found here:
Import () | Single Cell Data (
) | Import Spatial Transcriptomics (
) | Import Space Ranger (
)
The following options are available:
- Tissue positions. A file in one of the following formats:
- CSV format: extension .csv and comma separated columns. The file contains one row per barcode. It may optionally contain headers.
- Parquet format: extension .parquet. The file contains one record per barcode.
Information is extracted from the following columns in the file, using the column names for CSV files with headers and Parquet files, or column numbers for CSV files without headers:
barcode
(column 1): the barcode.in_tissue
(column 2): zero or one indicating whether the barcode is present in the tissue. Rows with zero are ignored.pxl_row_in_fullres
(column 5): the y position in the full resolution image.pxl_col_in_fullres
(column 6): the x position in the full resolution image.
- Include image. Include a processed tissue image when checked.
- Processed image file. A processed tissue image in png format.
- Scale factors file. A JSON file containing a map of scale factors for processed tissue images. The scale factor with the map key matching the tissue image file name is used. Both the file name and map keys are split into components using "_", and matching is based on identical components. For example, for a tissue image file
tissue_hires_image.png
, the key is typicallytissue_hires_scalef
.
- Cell format and Sample. How cells are identified, see Cell format in importers for more details.
- Matrix (Optional). The sample name will be obtained from the supplied matrix. The importer does not check that the barcodes present in the input file match those in the matrix. If the matrix contains multiple samples, the importer will fail with a relevant message.
The sample name has to be defined through either Cell format, Sample, or Matrix. The sample name can be set using only one of these three options.
It is important that the Spatial Transcriptomics Plot and corresponding Expression Matrix/Dimensionality Reduction Plot have the same sample name, see The Spatial Transcriptomics Plot element. |
The importer can be used in workflows. See On-the-fly import in workflows for details. Note that if Use archive file is checked, then:
- If Include image is checked and there are multiple processed image files, the smallest image is used, i.e., the image with the smallest scale factor.
- The sample name can be omitted from Cell format, Sample, and Matrix. In this case, it will be based on the archive file name.