{"id":40690686,"url":"https://github.com/lima1/sttkit","last_synced_at":"2026-01-21T11:06:02.047Z","repository":{"id":40722911,"uuid":"233417067","full_name":"lima1/sttkit","owner":"lima1","description":"Pipeline for SpatialTranscriptomics and 10X Visium data","archived":false,"fork":false,"pushed_at":"2025-05-08T13:51:50.000Z","size":664,"stargazers_count":21,"open_issues_count":9,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-08T14:43:45.815Z","etag":null,"topics":["10xgenomics","spatial-transcriptomics","visium"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lima1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-12T15:51:00.000Z","updated_at":"2025-05-08T13:51:50.000Z","dependencies_parsed_at":"2023-11-07T01:01:44.042Z","dependency_job_id":"4f685131-b599-442d-a0bc-007ba4d9f4d1","html_url":"https://github.com/lima1/sttkit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lima1/sttkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lima1%2Fsttkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lima1%2Fsttkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lima1%2Fsttkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lima1%2Fsttkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lima1","download_url":"https://codeload.github.com/lima1/sttkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lima1%2Fsttkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28632291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["10xgenomics","spatial-transcriptomics","visium"],"created_at":"2026-01-21T11:06:01.351Z","updated_at":"2026-01-21T11:06:02.038Z","avatar_url":"https://github.com/lima1.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis is a collection of command line R scripts for analyzing spatial\ntranscriptomics data.  It is based on Seurat 3.2 workflows with a focus on\nmulti-sample analyses (technical replicates and treatment/control pairs).\n\nThe main purpose of this effort is to implement best practices that can be\nlaunched in automated pipelines. It further provides converter functions that\nmake it easier to use methods implemented in different workspaces.\n\n## Installation\n\nThese scripts require Seurat 3.2 or later with Visium support. SpaceRanger 2.0\nor later output requires Seurat 4.2 or later. SpaceRanger 3.0 currently\nrequires the `visium-hd` branch from seurat and seurat-object GitHub\nrepositories.\n\n### Dependencies\n\nIf you are a conda user, you can find all dependencies available as\nconda packages in the conda_environment.yml file.\n\nOtherwise install Seurat directly from CRAN:\n\n```\ninstall.packages(\"Seurat\")\n```\n\nA few optional additional packages extending functionality:\n\n```\nremotes::install_github(\"satijalab/seurat-wrappers\")\nremotes::install_github(\"navinlabcode/CellTrek\")\nremotes::install_github(\"dmcable/spacexr\", build_vignettes = FALSE)\n\n# following packages not necessary with conda_environment.yml\nBiocManager::install(c(\"batchelor\",\n    \"harmony\",\n    \"NMF\",\n    \"corrplot\",\n    \"optparse\",\n    \"pheatmap\",\n    \"patchwork\"))\n```\n \nFor the [scvi-tools](https://github.com/scverse/scvi-tools) wrapper, we\nrecommend using our conda environment and additionally installing the following\npackages (using 'mamba' instead of 'conda' should be a major speedup):\n\n```\nconda install pytorch torchvision torchaudio \"pytorch-cuda\u003e=11.7\" -c pytorch -c nvidia\nconda install \"jaxlib=*=*cuda*\" jax cuda-nvcc -c conda-forge -c nvidia\nconda install scvi-tools -c conda-forge\n```\nFor [cell2location](https://github.com/BayraktarLab/cell2location), install scvi-tools as above\nand then install it via pip in the activate conda environment:\n\n```\npip install cell2location[tutorials]\n```\n\nFor [Giotto](https://github.com/drieslab/Giotto), optionally if you use conda,\ninstall a few missing dependencies:\n\n```\nconda install r-terra r-checkmate r-pak r-rfast leidenalg python-louvain -c conda-forge\n```\n\nThen install it via pak in R:\n\n```\npak::pkg_install(\"drieslab/Giotto\")\n```\n\n### sttkit\n\nCommon functionality in this toolkit are provided in an R package called\n`sttkit`.  Install it from GitHub:\n\n```\nremotes::install_github('lima1/sttkit')\n```\n\nStart R and enter the following to get the path to the command line\nscripts:\n\n```\nsystem.file(\"extdata\", package = \"sttkit\")\n``` \n\nExit R and store this path in an environment variable, for example in \nBASH:\n\n```\nexport STTKIT=\"/path/to/sttkit/extdata\"\nRscript $STTKIT/st_normalize.R --help\nUsage: /path/to/sttkit/inst/extdata/st_normalize.R [options] ...\n```\n\n## Tools\n\n### st_normalize.R\n\nA simple script that takes data from the ST pipeline and uses several Seurat\nfeatures to normalize counts and to generate QC plots.\n\n10X Visium SpaceRanger example:\n```\n#  spaceranger_dir is the path to filtered_feature_bc_matrix.h5\nRscript $STTKIT/st_normalize.R --spaceranger_dir $SAMPLE/outs \\\n     --sampleid $SAMPLE \\ \n     --outprefix OUTDIR/${PIPELINE}/$SAMPLE/normalize/$SAMPLE \n```\n\nWe can also additional gene annotation if needed:\n\n```\n#  spaceranger_dir is the path to filtered_feature_bc_matrix.h5\nRscript $STTKIT/st_normalize.R --spaceranger_dir $SAMPLE/outs \\\n     --sampleid $SAMPLE \\ \n     --outprefix OUTDIR/${PIPELINE}/$SAMPLE/normalize/$SAMPLE \\\n     --gtf $REFERENCES/cellranger/refdata-cellranger-GRCh38-3.0.0/genes/genes.gtf \\\n     --spaceranger_probe_set $REFERENCES/spaceranger-2.1.0/probe_sets/Visium_Human_Transcriptome_Probe_Set_v2.0_GRCh38-2020-A.csv \\\n```\n\nThe GTF extracts a stable gene id such as ENSEMBL that can be used instead of\nthe gene name. For FFPE Visium, we can provide probe information. Both can be\naccessed in R via the `[[]]` operator on the `Spatial` assay. In case\nSpaceRanger was run without probe filtering, features without `included` flag\nare ignored in the `SCT` assay.\n\n```\nhead(ndata$Spatial[[]],2)\n               gene_id symbol\nOR4F5  ENSG00000186092  OR4F5\nSAMD11 ENSG00000187634 SAMD11\n                                                                                                                                                     probe_seqs\nOR4F5  AATGGAGAAAGCCAATTCCCCATGTGACAGCCATAATGCCGACACATGCG\nSAMD11 TGTCACCATCGCTGGCAGAGAAGCTGGGAGTTCGCTCCTTCTTCAGGTTC|[...]\n         all.included included                       regions\nOR4F5           FALSE    FALSE                     unspliced\nSAMD11 TRUE|TRUE|TRUE     TRUE unspliced|unspliced|unspliced\n```\n\nSpatialTranscriptomics example:\n```\nPIPELINE=\"standard\"\nRscript $STTKIT/st_snormalize.R --infile $SAMPLE/${PIPELINE}_pipeline/${SAMPLE}_${PIPELINE}_ensembl_adjusted.tsv \\\n     --sampleid $SAMPLE \\ \n     --hejpeg {SAMPLE}_HE_bw_scaled.jpg \\\n     --outprefix OUTDIR/${PIPELINE}/$SAMPLE/normalize/$SAMPLE \\\n```\n\n\nThis script will generate a few files with `--outprefix` as filename prefix.\nNote that `--hejpeg` is ignored for Visium data. \n\n![ex_sagittal_1_he_counts](https://user-images.githubusercontent.com/364466/75631970-879b2c80-5bc5-11ea-8e45-87f488357210.png)\n\n### st_cluster.R\n\nCluster the SpatialTranscriptomics data generated by `st_normalize.R`\n\nSimple single-sample example:\n```\nRscript $STTKIT/st_cluster.R \\\n     --infile $OUTDIR/$SAMPLE/normalize/serialize/${SAMPLE}_scaled.rds \\\n     --outprefix OUTDIR/$SAMPLE/cluster/$SAMPLE \n```\n![ex_sagittal_1_he_cluster](https://user-images.githubusercontent.com/364466/75631996-be714280-5bc5-11ea-88d8-2028430f7316.png)\n\nAdvanced multi-sample example with NMF clustering:\n```\n#! /bin/bash\n#$ -S /bin/bash\n#$ -pe orte 20 # number of parallel jobs\n#$ -N Wtester\n#$ -cwd\n#$ -j y\n#$ -o  ${OUTDIR}/${NORMALIZATION_METHOD}/${SAMPLE}/cluster\n#$ -l h_rt=345600      #this need to adapted to your needs\n#$ -l m_mem_free=4G    #this need to adapted to your needs\nmpirun --mca mpi_warn_on_fork 0 -v -np \\$NSLOTS  R --slave \\\n    -f $STTKIT/st_cluster.R --args \\\n    --infile lists/${SAMPLE}_${NORMALIZATION_METHOD}_spatial.list \\\n    --labels lists/${SAMPLE}_labels.list \\\n    --outprefix $OUTDIR/${NORMALIZATION_METHOD}/$SAMPLE/cluster/$SAMPLE \\\n    --gmt ../../signatures/all.gmt \\\n    --extra_gmt ../../signatures/pathways_kegg.gmt \\\n    --min_features $MIN_FEATURES \\\n    --nmf --nmf_rank 4:16 --nmf_nruns \\$NSLOTS $NMF_RANDOMIZE --nmf_method nsNMF \\\n    --verbose --mpi\n```\n\nSince NMF clustering is slow, we may need to use the doMPI package to run in in\nparallel (provide the `--mpi` flag).  This example shows that for multi-sample,\nwe provide `--infile` a text file with suffix .list containing multiple input\nfiles.  For the non-default `seurat2` or `scran` normalizations, use the unscaled\n`${SAMPLE}_unscaled.rds` files to normalize all samples jointly before clustering.\n\nWe provide a `--gmt` file with signatures of interest to make sure that the\ncorresponding genes are not filtered out for lower variance than other genes.\nGene signatures in `--extra_gmt` are not forced to be included and instead\nbroadly tested against NMF cluster markers. This is useful for providing large\npathway databases such as KEGG or REACTOME.\n\nWe use the nsNMF algorithm instead of the default to get a more sparse solution\nat the cost of a significantly longer runtime.\n\nHere the results of NMF clustering on the 10X mouse brain example data:\n\n![all_he_nmf_cluster_9_ex_sagittal_1_small](https://user-images.githubusercontent.com/364466/75268883-1410ae00-57c6-11ea-9adf-00bef6b05fef.png)\n![all_he_nmf_cluster_9_ex_sagittal_a1_small](https://user-images.githubusercontent.com/364466/75268894-17a43500-57c6-11ea-9dcd-ea44cb1a85ad.png)\n\n\nNote that the cluster ids are consistent across sections.\n  \n### st_score.R\n\nTakes the output of `st_cluster.R` and gene signatures in GMT format as input\nand plots signature scores (when a clustered RDS was provided, additional\nsignature per cluster plots will be generated)\n\nExample:\n\n```\nRscript $STTKIT/st_score.R \\\n    --infile $OUTDIR/$SAMPLE/normalize/serialize/${SAMPLE}_scaled.rds \\\n    --gmt mm10_io_sigs.gmt \\\n    --outprefix OUTDIR/$SAMPLE/signatures/$SAMPLE  \n```\nAdvanced feature: `--infile` can be again a list of input files (see\n`st_cluster.R`).  In this case violin plots are generated to compare the\nsignatures across samples.\n\n### st_benchmark.R\n\nCompare Spatial data with bulk RNA-seq.\n\nExample:\n\n```\nRscript $STTKIT/st_benchmark.R \\\n    --infile $OUTDIR/$SAMPLE/cluster/serialize/${SAMPLE}.rds \\\n    --htseq ${SAMPLE_BULK}.gene_counts.cts \\\n    --outprefix OUTDIR/$SAMPLE/benchmark/$SAMPLE  \n\n```\nAdvanced feature: both `--infile` and `--htseq` can be again a list of input \nfiles (see `st_cluster.R`).\n\n### st_integrate.R\n\nIntegrates SpatialTranscriptomics with a (matched) scRNA reference. The default\nis simply following the Seurat best practices as outlined in their [Spatial Vignette](https://satijalab.org/seurat/articles/spatial_vignette.html):\n\n```\nRscript $STTKIT/st_integrate.R \\\n    --infile $OUTDIR/$SAMPLE/cluster/serialize/${SAMPLE}.rds \\\n    --outprefix $OUTDIR/$SAMPLE/integrate/$SAMPLE \\\n    --singlecell allen_cortex.rds \\\n    --labels_singlecell allen_cortex \\\n    --refdata subclass\n```\n\nHere, the reference scRNA-seq dataset is expected to be normalized by\n`sctransform` and contains cell type annotation in a `type` meta data column\n(the column can be changed with `--refdata` as in this example).  Again,\n`--singlecell` can be a list of reference datasets. Specify\n`--integration_method rctd` to use [RCDT](https://github.com/dmcable/spacexr),\n`--integration_method scvi_destvi` to use [DestVI](https://github.com/scverse/scvi-tools),\n`--integration_method scvi_cell2location` to use [cell2location](https://github.com/BayraktarLab/cell2location),\nor `--integration_method giotto` for [SpatialDWLS from\nGiotto](https://github.com/drieslab/Giotto) instead. Output files and plots are\nequivalent.\n\n\n![ex_sagittal_1_he_labels_allen_cortex_1_small](https://user-images.githubusercontent.com/364466/75380489-21e93080-58a5-11ea-8d1a-75950b0dd104.png)\n![ex_sagittal_a1_he_labels_allen_cortex_1_small](https://user-images.githubusercontent.com/364466/75380495-2281c700-58a5-11ea-97d7-efa00e79914e.png)\n\nAll celltype predictions can be easily loaded in Seurat and compared:\n\n```\nls $OUTDIR/$SAMPLE/integrate/serialize/*transfer*\nLIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_giotto_transfer_predictions.rds\nLIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_rctd_multi_transfer_predictions.rds\nLIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_scvi_destvi_transfer_predictions.rds\nLIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_scvi_cell2location_transfer_predictions.rds\nLIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_seurat_transfer_predictions.rds\n```\n\nIn R:\n\n```\nx \u003c- readRDS(\"cluster/serialize/LIB-021633rd1.rds\")\nx$predictions \u003c- readRDS(\"integrate/serialize/LIB-021633rd1_742abcb4d6052d8416d7d7a47d0f6749_rctd_transfer_predictions.rds\")\n```\n\nThis can now be used following the Seurat best practices.\n\nWe also provide a convenient way of averaging prediction in a simple consensus\nmethod:\n\n```\nfiles \u003c- dir(\"integrate/serialize\", pattern = \"transfer_predictions.rds\",\n    full.names = TRUE)\ntp_consensus \u003c- find_assayobject_consensus(lapply(files, function(x)\n    readRDS(x)[[1]]), labels = labels, plot_correlations = run_plots,\n        plot_cor_method = \"kendall\")\nx$predictions \u003c- tp_consensus\n```\n\nWe also support the [CellTrek](https://github.com/navinlabcode/CellTrek)\npackage that performs coembedding of the single-cell and spatial data to\ngenerate the training model. The single cells are then charted on to their\nspatial locations using non-linear interpolation to augment the ST spots.\nThis method works especially well when matched single cell and spatial data\nare available.\n\nWe have adapted the same to work using command line inside of sttkit, and also\nsplitting the various cell-types on to separate panels as shown below\n\n```\n Rscript $STTKIT/st_integrate.R \\\n    --infile $OUTDIR/$SAMPLE/cluster/serialize/${SAMPLE}.rds \\\n    --outprefix $OUTDIR/$SAMPLE/celltrek/$SAMPLE \\\n    --singlecell allen_cortex.rds \\\n    --labels_singlecell allen_cortex \\\n    --refdata subclass --png --serialize \\\n    --integration_method celltrek\n```\n![brain_he_celltrek_dots_labels_brain](https://user-images.githubusercontent.com/405520/181096917-260e847f-074d-41ee-a225-54dab2121184.png)\n\n![ex_sagittal_1_he_celltrek_dots_labels_allen_cortex](https://user-images.githubusercontent.com/405520/181086643-de237893-006d-4a27-b41b-2d5c7c72ba64.png)\n\nThe `CellTrek::celltrek_vis` function uses RShiny to visualize all cell-types\nin the mouse brain sample.  We can easily load the `celltrek` object in R:\n\n```\ncd $OUTDIR/$SAMPLE/celltrek\nR\n```\n```\nlibrary(CellTrek)\nlibrary(dplyr)\noptions(\"browser\" = \"google-chrome\")\n# The serialized RDS object is a list for cases when multiple\n# single cell references were provided\nbrain_celltrek \u003c- readRDS(\"serialize/ex_sagittal_a2_celltrek.rds\")[[1]]\nbrain_celltrek$cell_type \u003c- factor(brain_celltrek$cell_type, levels=sort(unique(brain_celltrek$cell_type)))\nCellTrek::celltrek_vis(brain_celltrek@meta.data %\u003e% dplyr::select(coord_x, coord_y, cell_type:id_new),\n                       brain_celltrek@images$ex_sagittal_a2@image, brain_celltrek@images$ex_sagittal_a2@scale.factors$lowres)\n```\n\nNow choose `cell_type` under \"Color\" and then click \"Plot\".\n\n![celltrek_example_output](https://user-images.githubusercontent.com/364466/181936155-51c0f0c1-878b-4d3e-97d9-53b61f487f6d.png)\n\n### st_enhance.R\n\nImputes data from neighboring spots. Currently only\n[BayesSpace](https://github.com/edward130603/BayesSpace) supported.\n\n```\nRscript $STTKIT/st_enhance.R \\\n   --infile $OUTDIR/$SAMPLE/cluster/serialize/${SAMPLE}.rds \\\n   --outprefix $OUTDIR/$SAMPLE/enhance/$SAMPLE \\\n```\n\nWhen the provided `--infile` contains SCTransform normalized data, it will\nuse those log counts. Otherwise BayesSpace's own normalization is used.\n\n![mouse_10x_bayesspace](https://user-images.githubusercontent.com/364466/122808326-c19cb000-d29a-11eb-95b4-da14b0f6d4f0.png)\n\n### st_hejpeg.R\n\nSome standard edits to H\u0026E jpegs (obsolete with Visium).\n\nExample:\n```\nRscript $STTKIT/st_hejpeg.R  --infile LP_L10012_S085_TGFB_EX2_LIB-026528rd1.jpg \\\n    --outfile LIB-026528rd1_HE_bw_scaled.jpg --dither\n```\n\n\n\n## Example workflow\n\nIn the following we run `sttkit` on 5 technical replicates of a breast cancer\nsample.\n\n```\nPROJECT=\"/mnt/tmplabdata/ngdx/projects/dev/spatialTranscriptomics/NGDX-P00273\"\nPIPELINE=\"standard\"\nNORMALIZATION=\"sctransform\"\nOUTDIR=\"../../data/$NORMALIZATION\"\nMIN_FEATURES=400   # exclude spots with fewer than 400 detected genes\nNUM_FEATURES=3000  # aim for including ~3000 genes\nMIN_SPOTS=1        # include genes detected in a single spot\n\nmkdir -p $OUTDIR/$PIPELINE\n\nSAMPLES=(\"LIB-021633rd1\" \"LIB-021634rd1\" \"LIB-021635rd1\" \"LIB-021636rd1\" \"LIB-021637rd1\" )\nfor SAMPLE in \"${SAMPLES[@]}\"\ndo\n    rm -rf $OUTDIR/$PIPELINE/$SAMPLE\n    SLIDE=\"ST_LP_L4_009_02JUN2018_Breast_EX2\"\n\n    Rscript ~/git/CancerGenetics/ncgs-in-spatial_tools/sttkit/inst/extdata/st_normalize.R \\\n        --infile $PROJECT/$SLIDE/$SAMPLE/${PIPELINE}_pipeline/${SAMPLE}_ensembl_adjusted.tsv \\\n        --outprefix $OUTDIR/${PIPELINE}/$SAMPLE/normalize/$SAMPLE \\\n        --sampleid $SAMPLE \\\n        --hejpeg $PROJECT/$SLIDE/Images/${SAMPLE}_HE_bw_scaled.jpg \\\n        --min_features $MIN_FEATURES \\\n        --min_spots $MIN_SPOTS \\\n        --num_features $NUM_FEATURES \\\n        --normalization_method $NORMALIZATION\n\n    Rscript ~/git/CancerGenetics/ncgs-in-spatial_tools/sttkit/inst/extdata/st_cluster.R \\\n        --infile $OUTDIR/$PIPELINE/$SAMPLE/normalize/serialize/${SAMPLE}_scaled.rds \\\n        --outprefix $OUTDIR/$PIPELINE/$SAMPLE/cluster/$SAMPLE \n\ndone\n\n# We can specify groups of samples and cluster them together.\n#\n# In this example, we use all high quality samples and name the group\n# \"all_good\" (I'm very good at naming things...)\n#\nSAMPLES=(\"all_good\")\nfor SAMPLE in \"${SAMPLES[@]}\"\ndo\n    rm -rf $OUTDIR/$PIPELINE/$SAMPLE\n\necho \"#! /bin/bash\n#$ -S /bin/bash\n#$ -pe orte 20 # number or parallel jobs\n#$ -N Wtester\n#$ -cwd\n#$ -j y\n#$ -o  $OUTDIR/$PIPELINE/${SAMPLE}/cluster\n#$ -l h_rt=345600      \n#$ -l m_mem_free=8G    \nmpirun --mca mpi_warn_on_fork 0 -v -np \\$NSLOTS  R --slave \\\n    -f ~/git/CancerGenetics/ncgs-in-spatial_tools/sttkit/inst/extdata/st_cluster.R \\\n    --args --infile lists/${SAMPLE}_${NORMALIZATION}_spatial.list \\\n    --outprefix $OUTDIR/$PIPELINE/${SAMPLE}/cluster/${SAMPLE} \\\n    --nmf --nmf_ranks 2:12 --nmf_randomize --nmf_method nsNMF \\\n    --png --force --mpi --verbose\n\n\" \u003e ${OUTDIR}/$PIPELINE/$SAMPLE/${SAMPLE}_cluster.sh\n\nqsub ${OUTDIR}/$PIPELINE/$SAMPLE/${SAMPLE}_cluster.sh\n\ndone\n```\n\nThe .list file simply list input files line by line:\n\n```\ncat all_good_sctransform_spatial.list\n../../data/sctransform/standard/LIB-021633rd1/normalize/serialize/LIB-021633rd1_scaled.rds\n../../data/sctransform/standard/LIB-021634rd1/normalize/serialize/LIB-021634rd1_scaled.rds\n../../data/sctransform/standard/LIB-021635rd1/normalize/serialize/LIB-021635rd1_scaled.rds\n../../data/sctransform/standard/LIB-021636rd1/normalize/serialize/LIB-021636rd1_scaled.rds\n../../data/sctransform/standard/LIB-021637rd1/normalize/serialize/LIB-021637rd1_scaled.rds\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flima1%2Fsttkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flima1%2Fsttkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flima1%2Fsttkit/lists"}