10x Genomics Support/Space Ranger/Analysis/

Space Ranger Image Recommendations

Space Ranger supports two styles of microscopy images, either a brightfield image stained with hematoxylin and eosin (H&E), or a fluorescence image comprising one or more acquisitions or channels.

  • The typical brightfield image is a transmission image, illuminated from below with white light and imaged from above. Dense areas of the sample, where tissue and cells lie, attenuate the transmitted light, producing an image that has a bright background and a dark or colored foreground. For technical details on image capture for Visium, refer to the Visium Imaging Guidelines.
  • A fluorescence image comprises one or more grayscale intensity images and is often visualized as a single combined image with a different color assigned to each channel acquired. Each channel corresponds to a different fluorophore that binds to a different protein of interest. Fluorescence microscopy uses excitation with narrow band light and measures a signal emitted from either endogenous or added fluorophores, generating an image with a dark background and a bright foreground. See also the fluorescence imaging demonstrated protocol for Visium.
Brightfield ImageFluorescence Image Colorized
Fluorescence Image, channel 0Fluorescence Image, channel 1Fluorescence Image, channel 2

Space Ranger v2.0 added support for CytAssist-captured images. The CytAssist workflow enables the use of a CytAssist image, which contains the fiducial frame, analysis, with the option to add a high resolution microscope image of the same tissue section in either brightfield and fluorescence image formats.

CytAssist Image, 6.5 mm Capture AreaCytAssist Image, 11 mm Capture Area

Here is a summary of image input types and formats:

Image
Format
Space Ranger ArgumentsAutomatic
Fiducial
Alignment
Automatic
Image
Registration
Brightfield Image24-bit color TIFF/BigTIFF
or a JPEG

16-bit
grayscale TIFF/BigTIFF
or a JPEG
--imageSupportedSupported#
Fluorescence Image8 or 16-bit
grayscale single,
multi-page TIFF/BigTIFF

8 or 16-bit grayscale multiple
single-page TIFF/BigTIFF
or a JPEG
--darkimage
--dapi-index
Not
Supported

(must use manual fiducial alignment in Loupe Browser)
Supported#
Fluorescence Image24-bit single
colored image
TIFF/BigTIFF
or a JPEG
--colorizedImage
--dapi-index
Not
Supported

(must use manual fiducial alignment in Loupe Browser)
Supported#
CytAssist Image24-bit color TIFF--cytaimageSupportedSupported#

# Optionally can use manual alignment in Loupe Browser.

Depending on the slide type, Space Ranger requires images that meet minimum dimension requirements. In order to ensure uniform performance of the image processing in Space Ranger across a range of input resolutions, the input image is downsampled based on the slide version on which the tissue section was imaged. Space Ranger's automatic processing will not perform well on smaller images, and they are explicitly rejected from processing. Note that any downsampling performed internally in Space Ranger does not impact visualization in Loupe Browser, which always uses the full-resolution input image.

Slide VersionMinimum Input Image SizeSpace Ranger Downsampled Size
(tissue_hires_image.png)
Visium Spatial Gene Expression slide (v1, 6.5 mm).2,000 pixels in either dimension2,000 pixels in either dimension
Visium CytAssist Spatial Gene Expression slide (v2, 6.5 mm)CytAssist image at 3,000 pixels in both dimensions2,000 pixels in both dimensions
Visium CytAssist Spatial Gene Expression slide (v2, 11 mm)CytAssist image at 3,000 pixels in both dimensions2,000 pixels in both dimensions
Visium HD slide (6.5 mm)CytAssist image at 3,200 x 3,000 pixels6,000 pixels in both dimensions

If the input image from a Visium Spatial Gene Expression slide (v1, 6.5 mm) has significant whitespace to the left or right of the capture area, or if the image includes a portion of the capture area either above or below the area being analyzed, the capture area in the input image may be downsampled too much in order to accommodate the extra white space. If the fiducial alignment or tissue detection results are not as expected for such images, we recommend cropping the images in order to remove the extraneous image area outside of the fiducial border. Images that are too tall or too wide can be cropped with tools such as ImageJ/Fiji.

Too WideToo TallCorrect

The image supplied to Space Ranger must contain only one capture area from the Visium slide. The exact capture area of the supplied image is specified using the --area argument in the spaceranger count pipeline.

IncorrectCorrect

The CytAssist-captured image is fixed at 3,000 pixels in both dimensions and is an important check for Space Ranger to identify and process the inputs. The CytAssist image dimension requirement also applies to Loupe Browser when using the manual image registration workflow.

Automatic image registration attempts to align the tissue section in the CytAssist image with the tissue section in the microscope image. In cases where there is more tissue in the microscope image than the CytAssist image, such as when the tissue section is larger than the CytAssist field of view, we recommend using the manual image registration workflow in Loupe Browser instead. Symmetrical tissue sections (e.g. circular punches) without any discernible morphological features may also initialize improperly during automatic image registration and require manual image registration.

10x Genomics does not recommend modifying the CytAssist image, which contains valuable metadata including the slide serial number and capture area. Use of a modified version of the CytAssist image may also lead to errors when running spaceranger count.

Brightfield images are specified in spaceranger count using the --image argument. In addition to these basic file type requirements, the automatic image processing pipeline in Space Ranger can be used for brightfield and fluorescence images that meet the additional restrictions outlined below. If these restrictions cannot be met, you can still process your data using the manual alignment and tissue selection process in Loupe Browser.

Brightfield microscopy input images for use with Visium must be 24-bit color TIFF/BigTIFF, 16-bit grayscale TIFF/BigTIFF, or JPEG format.

Images destined for automatic processing in Space Ranger should be oriented such that the hourglass fiducial marker is the in upper-left corner of the image. The image must be roughly axis-aligned, although slight rotations (e.g. less than 15 degrees) should be fine.

Properly OrientedCorner with Hourglass Fiducial

From Space Ranger 2.0 onwards, the pipeline will automatically rotate the fiducial frame and mirror the image to the expected orientation. This option can also be made explicit by using the --reorient-images=true flag supplied to spaceranger count. If this process fails, you can also correct for image rotation and mirroring either by using the manual alignment step in Loupe Browser or by correcting the image using freely available tools such as ImageJ/Fiji or Image Magick prior to processing with Space Ranger.

The automatic image processing in Space Ranger relies on the detection of spots in the fiducial frame. This process may perform poorly if the images are overexposed. Because the fiducial spots are slightly darker at the edges, very overexposed fiducials will appear as rings instead of solid circles. In general, poorly exposed images cannot be corrected after acquisition. If such images fail to process properly in the automatic pipeline, you can process such data through the manual alignment and tissue selection process in Loupe Browser prior to running Space Ranger.

Correct ExposureOver-exposed

Fluorescence images can be provided to the pipeline either as individual grayscale acquisitions or as a single combined color image. There are three possible input modes:

  1. One or more acquisitions stored in a single, multi-page TIFF/BigTIFF file, where each page encodes an acquisition in grayscale at 8 or 16-bit depth, up to six total pages. All pages must be the same dimensions in pixels and the same bit depth. This type of image input is specified in spaceranger count using the --darkimage argument.
  2. One or more acquisitions each stored in individual, single-page greyscale 8 or 16-bit depth TIFF/BigTIFF files, or as JPEG files with up to six total files. All files must be the same size and bit depth. These types of image inputs are specified in spaceranger count by either providing the file names as a a comma separated list (--darkimage=channel_1.tiff,channel_2.tiff,channel_3.tiff,...) or by listing mutliple --darkimage arguments (--darkimage=channel_1.tiff --darkimage=channel_2.tiff ... ).
  3. A color image where the user has colored and combined the individual acquisitions into a single image. This format can be specified as either a 24-bit color TIFF/BigTIFF or a JPEG file. With the options above, Loupe Browser will allow you to combine and color the images during visualization. This option is provided for users who wish to perform this function externally in software such as Photoshop or ImageJ/Fiji. This type of image input is specified in spaceranger count using the --colorizedimage argument. Space Ranger will not accept images in other formats at this time, but 10x Genomics is open to feature requests for preferred image formats.
Processing of fluorescence microscope images (Visium v1, direct placement) requires using manual alignment in Loupe Browser. The same constraint does not apply for CytAssist-enabled analysis (Visium v2, Visium HD) with a fluorescence microscope image input. This is because the CytAssist image, which has the fiducial frame, is used for fiducial alignment and tissue detection and is compatible with automatic image processing in Space Ranger.

Space Ranger v1.2.2 and Loupe Browser v5.0.1 introduced the ability to use TIFF images that contain multiple resolutions. This covers both pyramid format TIFF images that encode a progressive range of image resolutions, and images with a single, low-resolution preview image. This feature is implemented by identifying the highest resolution (largest number of pixels) in a single page within the file, then extracting all pages with the same shape (rows and columns). With this strategy, the other rules for TIFF files, as described above, remain in place and the software will accommodate file structures that include multiple fluorescence filter channels as well as a multi-resolution encoding. TIFF images where the highest resolution page is ambiguous (e.g., a file with one 6000x4000 page and a second 4000x6000 page) cannot be read.

Space Ranger v2.0 and Loupe v6.2 add support for QPTIFF images which are a type of pyramid TIFF, and a format used by whole slide imaging systems such as the Vectra Polaris™. Note that the QPTIFF image should correspond to a single Capture Area.

Space Ranger v2.1 and Loupe v6.5 extend the support for BigTIFF images with file extensions *.tf2, *.tf8 and *.btf.