workflows/ingestion/spaceranger_mapping
Description
A pipeline for running Space Ranger (4.1.0) mapping.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--id | string required | ID of the sample. |
--input | file required multiple | The fastq.gz files to align. Can also be a single directory containing fastq.gz files. Individual FASTQ files should follow the naming convention of 10x Genomics: [Sample Name]_S[Sample Number]_L[Lane Number]_[Read Type]_001.fastq.gz Where: [Sample Name] is the name assigned during sample preparation/sequencing S[Sample Number] is the sample index (usually S1, S2, etc.) L[Lane Number] identifies the sequencing lane (L001, L002, etc.) [Read Type] will be one of: R1 - Read 1 (contains the spatial barcode and UMI) R2 - Read 2 (contains the actual cDNA sequence) |
--gex_reference | file required | Path of folder containing 10x-compatible reference |
--probe_set | file | CSV file specifying the probe set used. Required for probe-based assays (FFPE / standard Visium and Visium HD). Omit for Visium HD 3' data. |
--cytaimage | file | Brightfield image generated by the CytAssist instrument. When using CytAssist workflow, either this or --image must be provided. |
--image | file | H&E or fluorescence microscope image in TIFF or JPG format. Required for standard Visium workflow, optional when using --cytaimage for CytAssist workflow. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output_raw | file required output | Location where the output folder from Cell Ranger will be stored. |
--output_h5mu | file required output | The output from Cell Ranger, converted to h5mu. |
--output_type | string | Which Cell Ranger output to use for converting to h5mu. |
--uns_metrics | string | Name of the .uns slot under which to QC metrics (if any). |
--uns_probe_set | string | Name of the .uns slot under which to store probe set information (if any). |
--obsm_coordinates | string | Name of the .obsm slot under which to store the cell centroid coordinates. |
--output_compression | string | Compression to use when writing the h5mu file. |
Image Options
Name | Type & Properties | Description |
|---|---|---|
--darkimage | file | Multi-channel, dark-background fluorescence image |
--colorizedimage | file | Color image representing pre-colored dark-background fluorescence images |
--dapi_index | integer | Index of DAPI channel (1-indexed) of fluorescence image |
--image_scale | double | Microns per microscope image pixel |
--reorient_images | boolean | Whether to rotate and mirror image to align fiducial pattern |
--loupe_alignment | file | Alignment file produced by the Loupe Browser manual alignment step. Overrides automatic fiducial and tissue detection. The image used to generate this file must match --image or --cytaimage. |
Slide Information
Name | Type & Properties | Description |
|---|---|---|
--slide | string | Visium slide serial number (e.g., 'V10J25-015') |
--area | string | Visium capture area identifier (e.g., 'A1') |
--unknown_slide | string | Use this option if the slide serial number and area were entered incorrectly on the CytAssist instrument and the correct values are unknown. Not compatible with --slide, --area, or --slide-file options |
--slidefile | file | Slide design file for offline use |
--override_id | boolean_true | Overrides the slide serial number and capture area provided in the Cytassist image metadata |
SpaceRanger arguments
Name | Type & Properties | Description |
|---|---|---|
--create_bam | boolean required | Enable or disable BAM file generation |
--nosecondary | boolean_true | Disable secondary analysis (e.g., clustering) |
--r1_length | integer | Hard trim the input Read 1 to this length before analysis |
--r2_length | integer | Hard trim the input Read 2 to this length before analysis |
--filter_probes | boolean | Whether to filter the probe set using the "included" column |
--custom_bin_size | integer | Bin Visium HD data to specified size in microns (4-100, even values only) in addition to the standard binning size (2 µm, 8 µm, 16 µm) |
--include_introns | boolean | Include intronic reads in the count. When unset, Space Ranger applies its own default (true for Visium HD 3' and Visium v1, false otherwise). |
Segmentation Options
Name | Type & Properties | Description |
|---|---|---|
--nucleus_segmentation | boolean | Enable or disable nucleus and cell segmentation for Visium HD / HD 3' H&E samples. When unset, Space Ranger runs segmentation by default if an H&E image is provided. |
--custom_segmentation_file | file | Custom nucleus segmentation mask to use instead of the built-in algorithm. Requires --nucleus_expansion_distance_micron. |
--nucleus_expansion_distance_micron | double | Distance in microns to expand each nucleus to approximate the cell boundary. |
--max_nucleus_diameter_px | integer | Maximum nucleus diameter in pixels, for samples with exceptionally large cells. |
--umi_registration | boolean | Enable or disable UMI-based registration that aligns the microscope image to the UMI count data for Visium HD. When unset, Space Ranger applies its default. |
--umi_to_image_offset | string | Supply a custom offset (as accepted by Space Ranger) to override UMI-to-image registration when automatic convergence is incorrect. |
Cell Annotation
Name | Type & Properties | Description |
|---|---|---|
--cell_annotation_model | string | Cloud-based cell type annotation model to use (Visium HD / HD 3' only, requires segmentation), which requires --tenx_cloud_token_path. When left out, Space Ranger still annotates human samples with the bundled Pan-Human Azimuth model, which runs locally and needs no token. |
--tenx_cloud_token_path | file | Path to a 10x Cloud token JSON, required for cloud-based annotation models. |
--disable_cell_annotation | boolean_true | Disable cell type annotation. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
id: "run"
output_raw: "$id.$key.output_raw.output_dir"
output_h5mu: "$id.$key.output_h5mu.h5mu"
output_type: [ "raw" ]
uns_metrics: [ "metrics_summary" ]
uns_probe_set: [ "probe_set" ]
obsm_coordinates: [ "spatial" ]
reorient_images: [ true ]
create_bam: [ true ]
filter_probes: [ true ]
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline_spatial.git \
-revision v0.6.0 \
-main-script target/nextflow/workflows/ingestion/spaceranger_mapping/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
workflows/ingestion/spaceranger_mappingopenpipeline_spatial v0.6.0