10x
Support
Search Support
Contact us
10x Genomics Support/Space Ranger/Analysis/

Space Ranger Command Line Arguments

For a list of subcommands, run spaceranger --help. The Martian runtime arguments are available to all the subcommands.

Count gene expression and protein expression reads from a single capture area.

Usage: spaceranger count [OPTIONS] --id <ID> --transcriptome <PATH> --image <IMG>| --darkimage <IMG> |--colorizedimage <IMG> |--cytaimage <IMG>

spaceranger count -h | --help | --version

OptionDescription
--id <ID>A unique run id and output folder name [a-zA-Z0-9_-]+
--description <TEXT>Sample description to embed in output files
--image <IMG>Single H&E brightfield image in either TIFF or JPG format
--darkimage <IMG>Multi-channel, dark-background fluorescence image as either a single, multi-layer TIFF file, or multiple TIFF or JPEG files
--colorizedimage <IMG>Color image representing pre-colored dark-background fluorescence images as either a single-layer TIFF or single JPEG file
--cytaimage <IMG>Brightfield image generated by the CytAssist instrument
--dapi-index <NUM>Index of DAPI channel (1-indexed) of fluorescence image
--slide <TEXT>Visium slide serial number, for example 'V10J25-015'
--area <TEXT>Visium area identifier, for example 'A1' (or, e.g. 'A' for 11 mm capture area slides)
--transcriptome <PATH>Path of folder containing 10x-compatible reference
--probe-set <CSV>CSV file specifying the probe set used, if any
--target-panel <CSV>The target panel CSV file declaring the target panel used, if any
--filter-probes <true OR false>Whether to filter the probe set using the "included" column of the probe set CSV. (default: true) Filtering probes is recommended. See online documentation for details
--rps-limit <NUM>Subsample to at most NUM mean reads under tissue per spot for targeted gene expression if NUM is greater than 0, or disable subsampling if NUM=0. Modifying this parameter is not recommended. (default: 15000)
--fastqs <PATH>Path to input FASTQ data
--project <TEXT>Name of the project folder within a mkfastq or bcl2fastq-generated folder from which to pick FASTQs
--sample <PREFIX>Prefix of the filenames of FASTQs to select
--lanes <NUMS>Only use FASTQs from selected lanes
--libraries <CSV>CSV file declaring input library data sources
--feature-ref <CSV>Feature reference CSV file corresponding to the antibody panel used to prepare the protein expression library
--unknown-slide <visium-1 OR visium-2 OR visium-2-large>Use this option if the slide serial number and area identifier have been lost. You must still tell the pipeline which slide type you are using. Please see the online documentation for more information. Not compatible with --slide, --area, or --slide-file options. (possible values: visium-1, visium-2, visium-2-large)
--reorient-images <true OR false>Whether the pipeline should rotate and mirror the image to align the “upright hourglass” fiducial pattern in the top left corner. Only set this to false if you are certain your image is already oriented with the “upright hourglass” in the top left corner. (default: true)
--slidefile <GPR>Spot design file for your slide, downloaded from 10x Genomics. NOTE: this is only required if your machine doesn't have internet access. You must still pass --slide and --area when using this argument
--loupe-alignment <PATH>Alignment file produced by the manual Loupe alignment step
--no-bamSet --no-bam to not generate the BAM file. This will reduce the total computation time for the pipestance and the size of the output directory. If unsure, we recommend not to use this option. BAM file could be useful for troubleshooting and downstream analysis
--nosecondaryDisable secondary analysis, e.g. clustering. Optional
--r1-length <NUM>Hard trim the input Read 1 to this length before analysis
--r2-length <NUM>Hard trim the input Read 2 to this length before analysis
--no-librariesProceed with processing using a --feature-ref but no protein expression libraries specified with the --libraries flag
--dryDo not execute the pipeline. Generate an pipeline invocation (.mro) file and stop
--jobmode <MODE>Job manager to use. Valid options: local (default), sge, lsf, slurm or path to a .template file. Search for help on "Cluster Mode" at support.10xgenomics.com for more details on configuring the pipeline to use a compute cluster (default: local)
--localcores <NUM>Set max cores the pipeline may request at one time. Only applies to local jobs
--localmem <NUM>Set max GB the pipeline may request at one time. Only applies to local jobs
--localvmem <NUM>Set max virtual address space in GB for the pipeline. Only applies to local jobs
--mempercore <NUM>Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies to cluster jobmodes
--maxjobs <NUM>Set max jobs submitted to cluster at one time. Only applies to cluster jobmodes
--jobinterval <NUM>Set delay between submitting jobs to cluster, in ms. Only applies to cluster jobmodes
--overrides <PATH> The path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem. Contact support for an example override file
--uiport <PORT>Serve web UI at http://localhost:PORT
--disable-uiDo not serve the web UI
--noexitKeep web UI running after pipestance completes or fails
--nopreflightSkip preflight checks
-h, --helpPrint help information

Aggregate data from multiple 'spaceranger count' runs.

Usage: spaceranger aggr [OPTIONS] --id <ID> --csv <CSV>

OptionDescription
``-h, --help`Print help information
-V, --versionPrint version information
--id <ID> A unique run id and output folder name [a-zA-Z0-9_-]+
--description <TEXT>Sample description to embed in output files (default: )
--csv <CSV>Path of CSV file enumerating 'spaceranger count' outputs
--normalize <MODE>Library depth normalization mode (default: mapped; possible values: mapped, none)
--dryDo not execute the pipeline. Generate an pipeline invocation (.mro) file and stop
--jobmode <MODE>Job manager to use. Valid options: local (default), sge, lsf, slurm or path to a .template file. Search for help on "Cluster Mode" at support.10xgenomics.com for more details on configuring the pipeline to use a compute cluster (default: local)
--localcores <NUM>Set max cores the pipeline may request at one time. Only applies to local jobs
--localmem <NUM>Set max GB the pipeline may request at one time. Only applies to local jobs
--localvmem <NUM>Set max virtual address space in GB for the pipeline. Only applies to local jobs
--mempercore <NUM>Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies to cluster jobmodes
--maxjobs <NUM>Set max jobs submitted to cluster at one time. Only applies to cluster jobmodes
--jobinterval <NUM>Set delay between submitting jobs to cluster, in ms. Only applies to cluster jobmodes
--overrides <PATH>The path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem. Consult https://support.10xgenomics.com/ for an example override file
--uiport <PORT>Serve web UI at http://localhost:PORT
--disable-uiDo not serve the web UI
--noexitKeep web UI running after pipestance completes or fails
--nopreflightSkip preflight checks

Run Illumina demultiplexer on sample sheets that contain 10x-specific sample index sets, and generate 10x-specific quality metrics after the demultiplex. Any bcl2fastq argument will work (except a few that are set by the pipeline to ensure proper trimming and sample indexing). The FASTQ output generated will be the same as when running bcl2fastq directly.

These bcl2fastq arguments are overridden by this pipeline:

  • --fastq-cluster-count
  • --minimum-trimmed-read-length
  • --mask-short-adapter-reads

Usage: spaceranger mkfastq --run=PATH [options] spaceranger mkfastq -h | --help | --version

OptionDescription
--run=PATHPath of Illumina BCL run folder (required).
--id=NAMEName of the folder created by mkfastq. If not supplied, will default to the name of the flowcell referred to by the --run argument.
--csv=PATH OR --samplesheet=PATH OR --sample-sheet=PATHPath to the sample sheet. The sample sheet can either be a simple CSV with lane, sample and index columns, or an Illumina Experiment Manager-compatible sample sheet. Sample sheet indexes can refer to 10x sample index set names (e.g., SI-GA-A12).
--simple-csv=PATHDeprecated. Same meaning as --csv.
--force-single-indexIf 10x-supplied i7/i5 paired indices are specified, but the flowcell was run with only one sample index, allow the demultiplex to proceed using the i7 half of the sample index pair.
--filter-single-indexOnly demultiplex samples identified by an i7-only sample index, ignoring dual-indexed samples. Dual-indexed samples will not be demultiplexed.
--filter-dual-indexOnly demultiplex samples identified by i7/i5 dual-indices (e.g., SI-TT-A6), ignoring single-index samples. Single-index samples will not be demultiplexed.
--rc-i2-override=BOOL Indicates if the bases in the I2 read are emitted as reverse complement by the sequencing workflow. Set to 'true' for the Reverse Complement Workflow (Workflow B)/ NovaSeq Reagent Kit v1.5 or greater. Set to 'false' for the Forward Strand Workflow (Workflow A) / older NovaSeq Reagent Kits. NOTE: this parameter is autodetected and should only be passed in special circumstances.
--delete-undeterminedDelete the Undetermined FASTQ files left by bcl2fastq. Useful if your sample sheet is only expected to match a subset of the flowcell.
--output-dir=PATHSame as in bcl2fastq. Folder where FASTQs, reports and stats will be generated.
--project=NAMECustom project name, to override the samplesheet or to use in conjunction with the --csv argument.
--jobmode=MODE Job manager to use. Valid options: local (default), sge, lsf, or a .template file
--localcores=NUM Set max cores the pipeline may request at one time. Only applies to local jobs.
--localmem=NUMSet max GB the pipeline may request at one time. Only applies to local jobs.
--localvmem=NUMSet max virtual address space in GB for the pipeline. Only applies to local jobs.
--mempercore=NUM Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies in cluster jobmodes.
--maxjobs=NUM Set max jobs submitted to cluster at one time. Only applies in cluster jobmodes.
--jobinterval=NUMSet delay between submitting jobs to cluster, in ms. Only applies in cluster jobmodes.
--overrides=PATH The path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem. Consult the 10x support website for an example override file.
--uiport=PORTServe web UI at http://localhost:PORT
--disable-uiDo not serve the UI.
--noexitKeep web UI running after pipestance completes or fails.
--nopreflightSkip preflight checks.
-h --help Show this message.
--version Show version.

Execute the count pipeline on a small test dataset.

Usage: spaceranger testrun [OPTIONS] --id <ID>

OptionDescription
--id <ID>A unique run id and output folder name [a-zA-Z0-9_-]+
--description <TEXT>Sample description to embed in output files
--dryDo not execute the pipeline. Generate a pipeline invocation (.mro) file and stop
--no-internetSet this if no internet connection is available on the processing computer/node/HPC
--jobmode <MODE>Job manager to use. Valid options: local(default), sge, lsf, slurm or path to a .template file. Search for help on "Cluster Mode" at support.10xgenomics.com for more details on configuring the pipeline to use a compute cluster (default: local)
--localcores <NUM>Set max cores the pipeline may request at one time. Only applies to local jobs
--localmem <NUM>Set max GB the pipeline may request at one time.Only applies to local jobs
--localvmem <NUM>Set max virtual address space in GB for the pipeline. Only applies to local jobs
--mempercore <NUM>Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies to cluster jobmodes
--maxjobs <NUM>Set max jobs submitted to cluster at one time. Only applies to cluster jobmodes
--jobinterval <NUM>Set delay between submitting jobs to cluster, inms. Only applies to cluster jobmodes
--overrides <PATH>The path to a JSON file that specifiesstage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem. Consult https://support.10xgenomics.com/ for an example override file
--uiport <PORT>Serve web UI at http://localhost:PORT
--disable-uiDo not serve the web UI
--noexitKeep web UI running after pipestance completes or fails
--nopreflightSkip preflight checks
--helpPrint help information

Tool for converting feature-barcode matrices from sparse format to dense.

Usage: mat2csv <input_path> <output_csv> [--genome=GENOME] mat2csv -h | --help | --version

OptionDescription
input_pathPath to a Space Ranger feature-barcode matrix. Can be either a feature-barcode h5 file (recommended) or a path to a MEX Space Ranger output folder.
output_csvOutput CSV file
--genome=GENOMESpecify which genome to extract. This only applies to multi-genome h5 input files.
--helpShow this message.
--versionShow version.

Prepare a reference for use with 10x analysis software. Requires a GTF and FASTA.

Usage:

spaceranger mkref [OPTIONS] --genome <GENOME_NAMES> --fasta <FASTA_FILES> --genes <GTF_FILES>

OptionDescription
--genome <GENOME_NAMES>Unique genome name, used to name output folder [a-zA-Z0-9_-]+. Specify multiple genomes by specifying this argument multiple times; the output folder will be <name1> and <name2>
--fasta <FASTA_FILES>Path to FASTA file containing your genome reference. Specify multiple genomes by specifying this argument multiple times
--genes <GTF_FILES>Path to genes GTF file containing annotated genes for your genome reference. Specify multiple genomes by specifying this argument multiple times
--nthreads <NUM_THREADS>Number of threads used during STAR genome index generation. Defaults to 1
--memgb <MEM_GB>Maximum memory (GB) used. Defaults to 16
--ref-version <REF_VERSION>Optional reference version string to include with reference
--dryDo not execute the pipeline. Generate a pipeline invocation (.mro) file and stop
--jobmode <MODE>Job manager to use. Valid options: local (default), sge, lsf, slurm or path to a .template file. Search for help on "Cluster Mode" at support.10xgenomics.com for more details on configuring the pipeline to use a compute cluster (default: local)
--localcores <NUM>Set max cores the pipeline may request at one time. Only applies to local jobs
--localmem <NUM>Set max GB the pipeline may request at one time. Only applies to local jobs
--localvmem <NUM>Set max virtual address space in GB for the pipeline. Only applies to local jobs
--mempercore <NUM>Reserve enough threads for each job to ensure enough memory will be available, assuming each core on your cluster has at least this much memory available. Only applies to cluster jobmodes
--maxjobs <NUM>Set max jobs submitted to cluster at one time. Only applies to cluster jobmodes
--jobinterval <NUM>Set delay between submitting jobs to cluster, in ms. Only applies to cluster jobmodes
--overrides <PATH>The path to a JSON file that specifies stage-level overrides for cores and memory. Finer-grained than --localcores, --mempercore and --localmem. Consult https://support.10xgenomics.com/ for an example override file
--uiport <PORT>Serve web UI at http://localhost:PORT
--disable-uiDo not serve the web UI
--noexitKeep web UI running after pipestance completes or fails
--nopreflightSkip preflight checks
--helpPrint help information

Genes GTF tool for 10x Genomics Space Ranger. Filter user-supplied GTF files for use as a Space Ranger-compatible genes files for mkref tool.

Usage:

mkgtf <input_gtf> <output_gtf> [--attribute=KEY:VALUE...] mkgtf -h | --help | --version

OptionDescription
input_gtfPath to input genes GTF file.
output_gtfPath to filtered output genes GTF file.
--attribute=<key:value>Key-value pair in attributes field to be kept in the GTF file.
--helpShow this message.
--versionShow version.

Upload a file to the 10x Genomics support team.

Usage:

spaceranger upload <your_email> <file>

Check your system to check for compatibility with Space Ranger system requirements.

Usage: sitecheck sitecheck -h | --help | --version

OptionDescription
--helpShow this message.
--versionShow version.