SAW 参数命令

可在命令行输入saw --help | -h,查看具体分析流程和参数设置信息,通过 saw --version 检查软件版本信息。

SAW count

将时空转录组测序数据转换为空间特征表达矩阵。

运行方式: saw count [Parameters] --id <ID> --sn <SN> --omics <OMICS> --kit-version <TEXT> --sequencing-type <TEXT>--reference <PATH> --image <IMG> --fastqs <PATH>

saw count -h | --help

ParameterDescription
--id <ID>(Optional, default to None) A unique task id ([a-zA-Z0-9_-]+) which will be displayed as the output folder name and the title of HTML report. If the parameter is absent, --sn will play the same role.
--description <TEXT>(Optional, default to None) Description for chip, or sample, or analysis run.
--sn <SN>(Required, default to None) SN (serial number) of the Stereo-seq chip.
--omics <OMICS>(Required, default to "transcriptomics") Omics information. When it comes to multi-omics analysis, please provide a list of omics, like "transcriptomics,proteomics" for Stereo-CITE analysis.
--kit-version <TEXT>(Required, default to None) The version of the product kit. More in count pipeline introduction.
--sequencing-type <TEXT>(Required, default to None) Sequencing type of FASTQs which is recorded in the sequencing report.
--chip-mask <MASK>(Required, default to None) Stereo-seq chip mask file, recording the spatial location information and the corresponding CID for each spot.
--organism <TEXT> (Optional, default to None) Organism type of sample, usually referring to species.
--tissue <TEXT> (Optional, default to None) Physiological tissue of sample.
--reference <PATH>(Optional, default to None) Path to the reference folder, containing SAW-compatible index files and GTF/GFF, built by SAW makeRef.
--ref-libraries <CSV>(Optional, default to None) Path to a ref_libraries.csv which declares reference indexes, built by SAW makeRef. Not compatible with --reference.
--fastqs <PATH>(Required, default to None) Path(s) to folder(s), containing all needed FASTQs. If FASTQs are stored in multiple directories, use it as: --fastqs=/path/to/directory1,/path/to/directory2,.... Notice that all FASTQ files under these directories will be loaded for analysis.
--adt-fastqs <PATH>(Optional, default to None) Path(s) to folder(s), containing all ADT FASTQs. If FASTQs are stored in multiple directories, use it as: --adt-fastqs=/path/to/directory1,/path/to/directory2,.... Notice that all FASTQ files under these directories will be loaded for analysis. Also, use --fastqs specifies all gene expression FASTQs.
--microorganism-detect(Optional, default to None) Whether to perform analysis related to microorganisms. Notice that the detection only works for FFPE assay currently.
--uniquely-mapped-only(Optional, default to None) Only annotate on uniquely mapped reads during read annotation.
--rRNA-remove(Optional, default to None) Whether to remove rRNA. Before turning the switch on, make sure that the necessary rRNA information has been added to FASTA, using SAW makeRef.
--skip-cellbin(Optional, default to None) Whether to skip the processing of cellbin level, including image cell segmentation, cell border expansion, clustering based on cellbin expression matrices and so on. This switch is default to be off, to output cellbin analysis results.
--skip-clustering(Optional, default to None) Whether to skip the second analysis based on spatial expression matrices, which mainly includes preprocessing, clustering, and differential expression analysis.
--summary-display-bin-size <INT>(Optional, default to 50) Set an appropriate bin size, from [20,50,100], to effectively display the analysis results within the summary tabs of each omics category, including statistical cards, the spatial expression heatmap, and saturation plots.
--custom-bin-size <LIST>(Optional, default to 20,50) A custom bin list (up to 2) to perform analysis, like --custom-bin-size=20,50. It is mainly used for secondary analysis and report presentation. Currently, bin20, 50, 100 are supported, which will be added to.
--clean-reads-fastq(Optional, default to None) Whether to output the Clean Reads (before RNA alignment) in FASTQ format, which have undergone CID mapping, RNA filtering, and MID filtering.
--unmapped-STAR-fastq(Optional, default to None) Whether to output unmapped reads in FASTQ format.
--unmapped-fastq(Optional, default to None) Whether to output unmapped reads in FASTQ format (not including "too many loci" reads from STAR).
--no-bam(Optional, default to None) Not to output the BAM file after reads annotation, for storage reduction.
--create-gem(Optional, default to None) Whether to output feature expression matrices in GEM format, after finishing pipelines.
--image <TIFF>(Optional, default to None) TIFF image for QC (quality control), combined with expression matrix for analysis. Please do not provide a relative file path for this parameter.
Name rule for input TIFF :
a. <SN>_<stain_type>.tif
b. <SN>_<stain_type>.tiff
c. <SN>_<stain_type>.TIF
d. <SN>_<stain_type>.TIFF
<stainType> includes:
a. ssDNA
b. DAPI
c. HE (referring to H&E)
d. <IF_name1>_IF, <IF_name2>_IF, ...
--image-tar <TAR>(Optional, default to None) The compressed image .tar.gz file from StereoMap has been through prepositive QC (quality control).
--output <PATH> (Optional, default to None) Set a specific output directory for the run.
--threads-num <NUM>(Optional, default to 16) Allowed local cores to run the pipeline.
--memory <NUM>(Optional, default to detected) Allowed local memory to run the pipeline.
--gpu-id <NUM>(Optional, default to -1) Set GPU id, according to GPU resources in the computing environment. Default to -1, which means running the pipeline using the CPU.
--no-initial-check(Optional, default to None) Skip the initial check before actually performing the analysis. Recommend not to switch on this parameter.
--job-mode(Optional, default to local) The job scheduling and resource management system offers two available options, local (default) and sge. It also supports accepting a specified configuration file.
-h, --help(Optional, default to None) Print help information.

SAW makeRef

构建参考基因组的索引文件,支持 SAW count 分析,需输入 GTF/GFF 注释文件和 FASTA 基因组文件,可以加入 rRNA 信息的 FASTA 文件。

运行方式: saw makeRef [Parameters] --mode <MODE> --fasta <FASTA> --gtf <GTF/GFF> --genome <PATH>

saw makeRef -h | --help

ParameterDescription
--mode <MODE>(Required, default to "STAR") Set the mode to build index files, used for the alignment. There are three modes, including STAR, Bowtie2 and Kraken2 for specific analysis scenarios.
--fasta <FASTA>(Optional, default to None) Path to FASTA, to build index files. When it comes to multiple FASTAs, they will be integrated in order of input beforehand.
--rRNA-fasta <FASTA>(Optional, default to None) Path to rRNA FASTA that will be added to --fasta file, with the elimination of redundant rRNA fragments.
--gtf <GTF/GFF>(Optional, default to None) Path to input GTF/GFF to build index files.
--basename <TEXT>(Optional, default to "host") Basename for Bowtie2 index files when set mode=Bowtie2. If not specified, "host" will be used, which straightforwardly means removing host information in the next step.
--database <DATABASE>(Optional, default to None) Path to Kraken2 reference database. If the parameter works, output index files will be saved in the same directory level.
--genome <PATH>(Optional, default to detected) Path to the output reference genome with index information.
--params-config <STRING>(Optional, default to None) Support direct input of the original command lines of third-party bioinformatical alignment tools, in string format. More in the makeRef tutorial.
--params-csv <CSV>(Optional, default to detected) Path to CSV file, recording detailed parameters to build Bowtie2/Kraken2 index. It works when --mode is set to Bowtie2/Kraken2. More in the makeRef tutorial.
--threads-num <INT>(Optional, default to 8) Set the number of threads to use.
-h, --help(Optional, default to None) Print help information.

SAW checkGTF

检查 GTF/GFF 注释文件是否为标准格式。此外,可以从 GTF/GFF 中提取特定的注释信息。

运行方式: saw checkGTF [Parameters] --input-gtf <GTF/GFF> --attribute <key:value> --output-gtf <GTF/GFF>

saw checkGTF -h | --help

ParameterDescription
--input-gtf <GTF/GFF>(Required, default to None) Path to input GTF/GFF, for a necessary format check.
--attribute <key:value>(Optional, default to None) Extract specific annotation information from GTF/GFF. Input as <gene_biotype:protein_coding>.
--output-gtf <GTF/GFF>(Required, default to None) Path to output GTF/GFF after a necessary check, or additional filtration when performing --attribute.
-h, --help(Optional, default to None) Print help information.

SAW realign

接回 StereoMap 手动处理后生成的图像文件,重启分析流程。

运行方式: saw realign [Parameters] --id <ID> --sn <SN> --count-data <PATH> --realigned-image-tar <TAR>

saw realign -h | --help

ParameterDescription
-id <ID>(Optional, default to None) A unique task id ([a-zA-Z0-9_-]+) which will be displayed as the output folder name and the title of HTML report. If the parameter is absent, --sn will play the same role.
--description <TEXT>(Optional, default to None) Description for chip, or sample, or analysis run.
--sn <SN>(Required, default to None) SN (serial number) of the Stereo-seq chip.
--count-data <PATH>(Required, default to None) Output folder of the corresponding SAW count result, which mainly contains the expression matrices and other related datasets.
--realigned-image-tar <TAR>(Required, default to None) Compressed image file from StereoMap, which has been manually processed, including stitching, tissue segmentation, cell segmentation, calibration and registration.
--summary-display-bin-size <INT>(Optional, default to 50) Set an appropriate bin size, from [20,50,100], to effectively display the analysis results within the summary tabs of each omics category, including statistical cards, the spatial expression heatmap, and saturation plots.
--custom-bin-size <LIST>(Optional, default to 20,50) A custom bin list (up to 2) to perform analysis, like --custom-bin-size=20,50. It is mainly used for secondary analysis and report presentation. Currently, bin20, 50, 100 are supported, which will be added to.
--lasso-geojson <GEOJSON>(Optional, default to None) Lasso GeoJSON from StereoMap is used for tissue segmentation when the analysis is without images. It is incompatible with --realigned-image-tar.
--adjusted-distance <INT>(Optional, default to 10) Outspread distance based on the cellular contour of the cell segmentation image, in pixels. Default to 10. If --adjusted-distance=0, the pipeline will not expand the cell border.
--extra-image-enhance <INT>(Optional, default to 0) Set additional passes of CLAHE-based image enhancement that are applied following the default image processing. The image enhanced by this parameter is utilized for cell segmentation.
--no-matrix(Optional, default to None) Whether to output feature expression matrices.
--no-report(Optional, default to None) Whether to output HTML report.
--skip-cellbin(Optional, default to None) Whether to skip the processing of cellbin level, including image cell segmentation, cell border expansion, clustering based on cellbin expression matrices and so on. This switch is default to be off, to output cellbin analysis results.
--skip-clustering(Optional, default to None) Whether to skip the second analysis based on spatial expression matrices, which mainly includes preprocessing, clustering, and differential expression analysis.
--create-gem(Optional, default to None) Whether to output feature expression matrices in GEM format, after finishing pipelines.
--output <PATH>(Optional, default to None) Set a specific output directory for the run.
--threads-num <NUM>(Optional, default to 8) Set the number of threads to use.
--gpu-id <NUM>(Optional, default to -1) Set GPU id, according to GPU resources in the computing environment. Default to -1, which means running the pipeline using the CPU.
--no-initial-check(Optional, default to None) Skip the initial check before actually performing the analysis. Recommend not to switch on this parameter.
--job-mode(Optional, default to local) The job scheduling and resource management system offers two available options, local (default) and sge. It also supports accepting a specified configuration file.
-h, --help(Optional, default to None) Print help information.

SAW reanalyze

进行数据再分析,包含聚类分析、矩阵套索和差异表达分析等。

运行方式: saw reanalyze [Parameters] --gef <GEF> --bin-size <INT> --marker --output <PATH>

saw reanalyze -h | --help

cluster

ParameterDescription
--gef <GEF>(Optional, default to None) Input bin GEF file for analysis.
--cellbin-gef <GEF>(Optional, default to None) Input cellbin GEF file for analysis.
--bin-size <INT or LIST>(Optional, default to 200) Bin size for analysis.
--Leiden-resolution <FLOAT>(Optional, default to 1.0) The resolution parameter controls the coarseness of the clustering when performing Leiden. Higher values lead to more clusters.
--marker(Optional, default to None) Whether to perform differential expression analysis.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.
--threads-num <NUM>(Optional, default to 8) Set the number of threads to use.

lasso

ParameterDescription
--gef <GEF>(Optional, default to None) Input bin GEF file for analysis.
--cellbin-gef <GEF>(Optional, default to None) Input cellbin GEF file for analysis.
--bin-size <INT or LIST>(Optional, default to 200) Bin size for analysis.
--lasso-geojson <GEOJSON>(Optional, default to None) GeoJSON from StereoMap to lasso sub expression matrices of targeted regions.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.

diffExp

ParameterDescription
--count-data <PATH>(Optional, default to None) Output folder of the corresponding SAW count result, which mainly contains the expression matrices and other related datasets.
--diffexp-geojson <GEOJSON>(Optional, default to None) GeoJSON from StereoMap to analyze differential expression.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.

coExp

ParameterDescription
--gef <GEF>(Optional, default to None) Expression data in GEF format is used for gene coexpress analysis.
--bin-size <INT>(Optional, default to None) Set a appropriate bin size to start gene coexpress analysis, when the input matrix is a tissue GEF. If analyze with a cellbin GEF, skip the setting of the parameter.
--cellbin-gef <GEF>(Optional, default to None) Expression data in cellbin GEF format is used for gene coexpress analysis.
--top-gene <INT>(Required, default to 5000) Top number of highly variable genes, to detect spatial gene patterns.
--output <PATH>(Required, default to None) Path to the output folder, to save analysis results.

multiomics

ParameterDescription
--gef <GEF LIST>(Optional, default to None) Input protein and gene bin GEF files for analysis, separated by comma.
--cellbin-gef <GEF LIST>(Optional, default to None) Input protein and gene cellbin GEF files for analysis, separated by comma.
--bin-size <INT>(Optional, default to 200) Bin size for analysis.Recommended to use 20 and 50.
--protein-panel <PANEL>(Optional, default to None) Path to a ProteinPanel.list. Not compatible with --ref-libraries.
--ref-libraries <CSV>(Optional, default to None) Path to a ref_libraries.csv which declares protein panel. Not compatible with--protein-panel.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.
--gpu-id <NUM>(Optional, default to -1) Set GPU id, according to GPU resources in the computing environment. Default to -1, which means running the pipeline using the CPU.
--threads-num <NUM>(Optional, default to 8) Set the number of threads to use.

midFilter

ParameterDescription
--gef <GEF>(Required, default to None) Input bin GEF file for analysis.
--mid-json <JSON>(Required, default to None) JSON from StereoMap to manually filter spatial expression matrixces by MID range.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.

removeBackground

ParameterDescription
--gef <GEF>(Required, default to None) Input bin protein GEF file for analysis
--bin-size <INT>(Required, default to None) Bin size for analysis. Recommended to use 20 and 50.
--protein-panel <PANEL>(Optional, default to None) Path to a ProteinPanel.list. Not compatible with --ref-libraries.
--ref-libraries <CSV>(Optional, default to None) Path to a ref_libraries.csv which declares protein panel. Not compatible with--protein-panel.
--output <PATH>(Optional, default to None) Path to the output folder, to save analysis results.

SAW convert

实现数据格式转换,分析流程下设置子模块用于实现特定的转换需求。

运行方式: saw convert gef2gem [Parameters] --gef <GEF> --bin-size <INT> --marker --gem <GEM>

saw convert -h | --help

ParameterDescription
--threads-num <NUM>(Optional, default to 8) Set the number of threads to use.
-h, --help(Optional, default to None) Print help information.

gef2gem

ParameterDescription
--gef <GEF>(Required, default to None) Path to input bin GEF file.
--bin-size <INT>(Optional, default to 1) Bin size used during conversion.
--cellbin-gef <GEF>(Optional, default to None) Path to input cellbin GEF file.
--gem <GEM>(Optional, default to None) Path to output GEM file.
--cellbin-gem <GEM>(Optional, default to None) Path to output cellbin GEM file.

gem2gef

ParameterDescription
--gem <GEM>(Optional, default to None) Path to input GEM file.
--gef <GEF>(Optional, default to None) Path to output bin GEF file.
--cellbin-gem <GEM>(Optional, default to None) Path to input cellbin GEM file.
--cellbin-gef <GEF>(Optional, default to None) Path to output cellbin GEF file.

bin2cell

ParameterDescription
--gef <GEF>(Required, default to None) Path to input bin GEF file.
--image <TIFF>(Required, default to None) Path to the image of cell segmentation.
--cellbin-gem <GEM>(Required, default to None) Path to output cellbin GEM file.
--cellbin-gef <GEF>(Optional, default to None) Path to output cellbin GEF file.

bin2tissue

ParameterDescription
--gef <GEF>(Required, default to None) A bin GEF file to extract specific feature expression matrix under the detected tissue region.
--image <TIFF>(Optional, default to None) Path to the image of tissue segmentation.
--output <PATH>(Required, default to None) Path to output folder, to save analysis results.

gef2h5ad

ParameterDescription
--gef <GEF>(Optional, default to None) Path to input bin GEF file.
--bin-size <INT>(Optional, default to 20) Bin size used during conversion.
--cellbin-gef <GEF>(Optional, default to None) Path to input cellbin GEF file.
--h5ad <H5AD>(Required, default to None) Path to output AnnData H5AD file.

gem2h5ad

ParameterDescription
--gem <GEM>(Optional, default to None) Path to input GEM file.
--bin-size <INT>(Optional, default to 20) Bin size used during conversion.
--cellbin-gem <GEM>(Optional, default to None) Path to input cellbin GEM file.
--h5ad <H5AD>(Required, default to None) Path to output AnnData H5AD file.

gef2rds

ParameterDescription
--gef <GEF>(Optional, default to None) Path to input bin GEF file.
--bin-size <INT>(Optional, default to 20) Bin size used during conversion.
--cellbin-gef <GEF>(Optional, default to None) Path to input cellbin GEF file.
--rds <RDS>(Required, default to None) Path to output RDS file.

gem2rds

ParameterDescription
--gem <GEM>(Optional, default to None) Path to input GEM file.
--bin-size <INT>(Optional, default to 20) Bin size used during conversion.
--cellbin-gem <GEM>(Optional, default to None) Path to input cellbin GEM file.
--rds <RDS>(Required, default to None) Path to output RDS file.

h5ad2rds

ParameterDescription
--h5ad <H5AD>(Required, default to None) Path to input AnnData H5AD file.
--rds <RDS>(Required, default to None) Path to output RDS file.

gef2img

ParameterDescription
--gef <GEF>(Required, default to None) Path to input bin GEF.
--bin-size <INT>(Required, default to 1) Bin size used to plot expression heatmap.
--image <TIFF>(Required, default to None) Path to output heatmap image.

visualization

ParameterDescription
--gef <GEF>(Required, default to None) Path to input raw bin GEF file.
--bin-size <INT>(Required, default to 1,5,10,20,50,100,150,200) Bin sizes used during conversion.
--visualization-gef <GEF>(Required, default to None) Path to output visualization GEF file.

tar2img

ParameterDescription
--image-tar <TAR>(Required, default to None) Path to input image compressed tar file.
--image <PATH>(Required, default to None) Path to output folder of images.

img2rpi

ParameterDescription
--image <TIFF>(Required, default to None) Path to images, please note that the order of input images, corresponding to --layers names.
--layers <TEXT>(Required, default to None) Layer names, recorded in the output RPI file, should correspond to images individually. Layer names can be set arbitrarily, but follow the format of <stain_type>/<image_type>, like DAPI/TissueMask.
--rpi <RPI>(Required, default to None) Path to output RPI file.

merge

ParameterDescription
--image <TIFF>(Required, default to None) Path to input images (up to 3), to be merged into one image, in the color order of R-G-B.
--merged-image <TIFF>(Required, default to None) Path to output multichannel image.

overlay

ParameterDescription
--image <TIFF>(Required, default to None) Path to image, used to be the base one.
--template <TXT>(Required, default to None) Point information of matrix template.
--overlaid-image <TIFF>(Required, default to None) Path to output overlaid image, with the cover of a template.
© 2025 STOmics Tech. All rights reserved.Modified: 2025-12-29 19:47:43

results matching ""

    No results matching ""