{"id":37361262,"url":"https://github.com/wehi-soda-hub/spatialvpt","last_synced_at":"2026-01-16T04:46:29.503Z","repository":{"id":261351063,"uuid":"832492286","full_name":"WEHI-SODA-Hub/spatialvpt","owner":"WEHI-SODA-Hub","description":"Segmentation and QC workflow for MERSCOPE using vizgen-postprocessing tool","archived":false,"fork":false,"pushed_at":"2025-12-12T03:23:41.000Z","size":1066,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T10:54:29.441Z","etag":null,"topics":["cell-segmentation","merscope","qc"],"latest_commit_sha":null,"homepage":"","language":"Nextflow","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WEHI-SODA-Hub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATIONS.md","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-23T06:19:50.000Z","updated_at":"2025-12-12T03:23:45.000Z","dependencies_parsed_at":"2025-02-18T01:20:38.073Z","dependency_job_id":"1178447f-c22b-48a3-81ed-512a8aa174bb","html_url":"https://github.com/WEHI-SODA-Hub/spatialvpt","commit_stats":null,"previous_names":["wehi-soda-hub/spatialvpt"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/WEHI-SODA-Hub/spatialvpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WEHI-SODA-Hub%2Fspatialvpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WEHI-SODA-Hub%2Fspatialvpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WEHI-SODA-Hub%2Fspatialvpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WEHI-SODA-Hub%2Fspatialvpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WEHI-SODA-Hub","download_url":"https://codeload.github.com/WEHI-SODA-Hub/spatialvpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WEHI-SODA-Hub%2Fspatialvpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: 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":["cell-segmentation","merscope","qc"],"created_at":"2026-01-16T04:46:28.651Z","updated_at":"2026-01-16T04:46:29.497Z","avatar_url":"https://github.com/WEHI-SODA-Hub.png","language":"Nextflow","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub Actions CI Status](https://github.com/WEHI-SODA-Hub/spatialvpt/actions/workflows/ci.yml/badge.svg)](https://github.com/WEHI-SODA-Hub/spatialvpt/actions/workflows/ci.yml)\n[![GitHub Actions Linting Status](https://github.com/WEHI-SODA-Hub/spatialvpt/actions/workflows/linting.yml/badge.svg)](https://github.com/WEHI-SODA-Hub/spatialvpt/actions/workflows/linting.yml)[![Cite with Zenodo](http://img.shields.io/badge/DOI-10.5281/zenodo.16973285-1073c8?labelColor=000000)](https://doi.org/10.5281/zenodo.16973285)\n[![nf-test](https://img.shields.io/badge/unit_tests-nf--test-337ab7.svg)](https://www.nf-test.com)\n\n[![Nextflow](https://img.shields.io/badge/version-%E2%89%A524.04.0-green?style=flat\u0026logo=nextflow\u0026logoColor=white\u0026color=%230DC09D\u0026link=https%3A%2F%2Fnextflow.io)](https://www.nextflow.io/)\n[![nf-core template version](https://img.shields.io/badge/nf--core_template-3.3.2-green?style=flat\u0026logo=nfcore\u0026logoColor=white\u0026color=%2324B064\u0026link=https%3A%2F%2Fnf-co.re)](https://github.com/nf-core/tools/releases/tag/3.3.2)\n[![run with conda](http://img.shields.io/badge/run%20with-conda-3EB049?labelColor=000000\u0026logo=anaconda)](https://docs.conda.io/en/latest/)\n[![run with docker](https://img.shields.io/badge/run%20with-docker-0db7ed?labelColor=000000\u0026logo=docker)](https://www.docker.com/)\n[![run with singularity](https://img.shields.io/badge/run%20with-singularity-1d355c.svg?labelColor=000000)](https://sylabs.io/docs/)\n[![Launch on Seqera Platform](https://img.shields.io/badge/Launch%20%F0%9F%9A%80-Seqera%20Platform-%234256e7)](https://cloud.seqera.io/launch?pipeline=https://github.com/WEHI-SODA-Hub/spatialvpt)\n\n## Introduction\n\n**WEHI-SODA-Hub/spatialvpt** is a bioinformatics pipeline that performs cell segmentation and creates a QC report for MERSCOPE data using the vizgen-postprocessing tool.\n\n![WEHI-SODA-Hub/spatialvpt workflow](docs/images/nf-core-spatialvpt_workflow.svg)\n\nThe pipeline runs the following steps:\n\n- [tiff_segmentation_vpt](https://nf-co.re/subworkflows/tiff_segmentation_vpt/) -- nf-core subworkflow that performs segmentation that uses the [vizgen post-processing tool](https://github.com/Vizgen/vizgen-postprocessing), which runs the following modules:\n  - [vizgenpostprocessing/preparesegmentation](https://nf-co.re/modules/vizgenpostprocessing_preparesegmentation/)\n  - [vizgenpostprocessing/runsegmentationontile](https://nf-co.re/modules/vizgenpostprocessing_runsegmentationontile/)\n  - [vizgenpostprocessing/compiletilesegmentation](https://nf-co.re/modules/vizgenpostprocessing_compiletilesegmentation/)\n- [vpt convert-geometry](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#convert-geometry) (optionally, to convert existing segmentation geometries)\n- `vptupdatemeta` subworkflow, which runs:\n  - [vpt derive-entity-metadata](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#derive-entity-metadata)\n  - [vpt partition-transcripts](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#partition-transcripts)\n  - [vpt update-vzg](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#update-vzg) (optional)\n- [vpt generate-segmentation-metrics](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#generate-segmentation-metrics)\n- [Pipeline information](#pipeline-information) - Report metrics generated during the workflow execution\n\n## Usage\n\n\u003e [!NOTE]\n\u003e If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nFirst, prepare a parameters file with your input data that looks as follows:\n\n`params.yml`:\n\n```yaml\nsample: \"sample_name\"\noutdir: \"/path/to/results\"\nalgorithm_json: \"/path/to/algorithm.json\"\nimages_dir: \"/path/to/images\"\nimages_regex: \"mosaic_(?P\u003cstain\u003e[\\\\w|-]+)_z(?P\u003cz\u003e[0-9]+).tif\"\num_to_mosaic_file: \"/path/to/micron_to_mosaic_pixel_transform.csv\"\ndetected_transcripts: \"/path/to/detected_transcripts.csv\"\nupdate_vzg: true\ninput_vzg: \"/path/to/sample.vzg\"\ntile_size: 4096\ntile_overlap: 400\n```\n\nNote that the `algorithm_json` file is temperamental. Check the [Vizgen documentation](https://vizgen.github.io/vizgen-postprocessing/segmentation_options/json_file_format.html) on the requirements.\n\nTo run cell segmentation via VPT, you can run the pipeline using:\n\n```bash\nnextflow run WEHI-SODA-Hub/spatialvpt \\\n   -profile \u003cdocker/singularity/.../institute\u003e \\\n   -params-file params.yml \\\n   --outdir \u003cOUTDIR\u003e\n```\n\nIf you are running with Apptainer or Singularity, you will have to set the following environmental variable before running the pipeline:\n\nApptainer:\n\n```bash\nexport NXF_APPTAINER_HOME_MOUNT=true\nnextflow run WEHI-SODA-Hub/spatialvpt \\\n   -profile apptainer \\\n   -params-file params.yml \\\n   --outdir \u003cOUTDIR\u003e\n```\n\nSingularity:\n\n```bash\nexport NXF_SINGULARITY_HOME_MOUNT=true\nnextflow run WEHI-SODA-Hub/spatialvpt \\\n   -profile singularity \\\n   -params-file params.yml \\\n   --outdir \u003cOUTDIR\u003e\n```\n\n### Custom weights\n\nYou can use a custom weights file by specifying the _full path_ in your\nparameters file:\n\n```yaml\ncustom_weights: \"/path/to/custom_weights_file\"\n```\n\nNow you need to add the _file name only_ to your algorithm JSON file, e.g:\n\n```json\n\"segmentation_properties\": {\n  \"model\": \"cyto2\",\n  \"model_dimensions\": \"2D\",\n  \"custom_weights\": \"custom_weights_file\",\n  \"channel_map\": {\n    \"red\": \"Cellbound1\",\n    \"green\": \"Cellbound3\",\n    \"blue\": \"DAPI\"\n  }\n},\n```\n\n### Report options\n\nYou can also set extra options for naming channels and filtering by volume and\ntranscript thresholds when generating reports. See the [VPT documentation](https://vizgen.github.io/vizgen-postprocessing/command_line_interface/index.html#generate-segmentation-metrics)\nfor more details.\n\nFor example:\n\n```yaml\nred_stain_name: \"Cellbound1\"\ngreen_stain_name: \"Cellbound2\"\nblue_stain_name: \"DAPI\"\ntranscript_count_threshold: 100\nvolume_filter_threshold: 200\nz_index: 2\n```\n\n### Report-only mode\n\nIf you would like to only generate a QC report, and you already have your metadata,\ncell_by_gene and boundary files, you can specify those files in parameters in\nyour params file:\n\n```yaml\nreport_only: true\nmetadata: \"/path/to/entity_metadata.csv\"\nentity_by_gene: \"/path/to/entity_by_gene.csv\"\nboundaries: \"/path/to/segmentation.parquet\"\n```\n\n```bash\nnextflow run WEHI-SODA-Hub/spatialvpt \\\n   -profile \u003cdocker/singularity/.../institute\u003e \\\n   -params-file params.yml \\\n   --outdir \u003cOUTDIR\u003e\n```\n\n\u003e [!WARNING]\n\u003e Please provide pipeline parameters via the CLI or Nextflow `-params-file` option. Custom config files including those provided by the `-c` Nextflow option can be used to provide any configuration _**except for parameters**_;\n\u003e see [docs](https://nf-co.re/usage/configuration#custom-configuration-files).\n\n## Credits\n\nWEHI-SODA-Hub/spatialvpt was originally written by Marek Cmero.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Raymond Yip\n- Pradeep Rajasekhar (@pr4deepr)\n- All members of the [WEHI SODA Hub](https://wehi-soda-hub.github.io/)\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md).\n\n## Citations\n\nIf you use WEHI-SODA-Hub/spatialvpt for your analysis, please cite it using the following doi: [10.5281/zenodo.16973286](https://doi.org/10.5281/zenodo.16973286)\n\nThis pipeline uses [test MERSCOPE data from nf-core/test-datasets](https://github.com/nf-core/test-datasets/tree/modules/data/spatial_omics/merscope).\n\nAn extensive list of references for the tools used by the pipeline can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nThis pipeline uses code and infrastructure developed and maintained by the [nf-core](https://nf-co.re) community, reused here under the [MIT license](https://github.com/nf-core/tools/blob/master/LICENSE).\n\n\u003e **The nf-core framework for community-curated bioinformatics pipelines.**\n\u003e\n\u003e Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso \u0026 Sven Nahnsen.\n\u003e\n\u003e _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwehi-soda-hub%2Fspatialvpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwehi-soda-hub%2Fspatialvpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwehi-soda-hub%2Fspatialvpt/lists"}