diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ae19e1b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,24 @@ + +repos: +- repo: https://github.com/astral-sh/ruff-pre-commit + # Ruff version. + rev: v0.12.1 + hooks: + - id: ruff-check + args: [ --fix ] + - id: ruff-format +- repo: local + hooks: + - id: run_styler + name: run_styler + language: r + description: style files with {styler} + entry: "Rscript -e 'styler::style_file(commandArgs(TRUE))'" + files: '(\.[rR]profile|\.[rR]|\.[rR]md|\.[rR]nw|\.[qQ]md)$' + additional_dependencies: + - styler + - knitr +- repo: https://github.com/lorenzwalthert/precommit + rev: v0.4.3.9012 + hooks: + - id: lintr \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3088246..04fba55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,10 @@ ## NEW FUNCTIONALITY -* `mapping/spaceranger_count`: Added a spaceranger count component (PR #2). \ No newline at end of file +* `filter/subset_cosmx`: Added a component to subset COSMX data (PR #3). + +* `convert/from_cosmx_to_h5mu`: Added converter component for COSMX data (PR #3). + +* `mapping/spaceranger_count`: Added a spaceranger count component (PR #2). + +* `convert/from_spatialdata_to_h5mu`, `convert/from_xenium_to_spatialdata`: Added converter components for xenium data (PR #1). diff --git a/_viash.yaml b/_viash.yaml index d85f9c1..3981a53 100644 --- a/_viash.yaml +++ b/_viash.yaml @@ -10,7 +10,11 @@ repositories: - name: openpipeline repo: openpipelines-bio/openpipeline type: github - tag: main_build + tag: 2.1.2 + - name: openpipeline_incubator + repo: openpipelines-bio/openpipeline_incubator + type: github + tag: main info: test_resources: - type: s3 diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..0b94ce2 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,43 @@ +# Exclude a variety of commonly ignored directories. +exclude = [ + ".git", + ".pyenv", + ".pytest_cache", + ".ruff_cache", + ".venv", + ".vscode", + "__pypackages__", + "_build", + "build", + "dist", + "node_modules", + "site-packages", +] + +builtins = ["meta"] + + + + +[format] +# Like Black, use double quotes for strings. +quote-style = "double" + +# Like Black, indent with spaces, rather than tabs. +indent-style = "space" + +# Like Black, respect magic trailing commas. +skip-magic-trailing-comma = false + +# Like Black, automatically detect the appropriate line ending. +line-ending = "auto" + +[lint.flake8-pytest-style] +fixture-parentheses = false +mark-parentheses = false + +[lint] +ignore = [ + # module level import not at top of file + "E402" +] \ No newline at end of file diff --git a/src/convert/from_cosmx_to_h5mu/script.py b/src/convert/from_cosmx_to_h5mu/script.py index ce5dcb5..2ec2f9b 100644 --- a/src/convert/from_cosmx_to_h5mu/script.py +++ b/src/convert/from_cosmx_to_h5mu/script.py @@ -9,11 +9,9 @@ par = { "output": "./resources_test/cosmx/Lung5_Rep2_tiny.h5mu", "dataset_id": "Lung5_Rep2", "modality": "rna", - "output_compression": None -} -meta ={ - "resources_dir": "src/utils" + "output_compression": None, } +meta = {"resources_dir": "src/utils"} ## VIASH END sys.path.append(meta["resources_dir"]) @@ -26,15 +24,14 @@ fov_file = f"{par['dataset_id']}_fov_positions_file.csv" meta_file = f"{par['dataset_id']}_metadata_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) logger.info("Reading in CosMx data...") adata = sq.read.nanostring( - path=par["input"], - counts_file=counts_file, - meta_file=meta_file, - fov_file=fov_file - ) + path=par["input"], counts_file=counts_file, meta_file=meta_file, fov_file=fov_file +) logger.info("Writing output MuData object...") mdata = mu.MuData({par["modality"]: adata}) diff --git a/src/convert/from_cosmx_to_h5mu/test.py b/src/convert/from_cosmx_to_h5mu/test.py index 163b804..002c956 100644 --- a/src/convert/from_cosmx_to_h5mu/test.py +++ b/src/convert/from_cosmx_to_h5mu/test.py @@ -2,15 +2,20 @@ import pytest import sys import mudata as mu + def test_simple_execution(run_component, tmp_path): output = tmp_path / "cosmx_tiny.h5mu" run_component( [ - "--input", meta["resources_dir"] + "/Lung5_Rep2_tiny", - "--dataset_id", "Lung5_Rep2", - "--num_fovs", "2", - "--output", output, + "--input", + meta["resources_dir"] + "/Lung5_Rep2_tiny", + "--dataset_id", + "Lung5_Rep2", + "--num_fovs", + "2", + "--output", + output, ] ) assert output.is_file(), "output file was not created" @@ -21,25 +26,25 @@ def test_simple_execution(run_component, tmp_path): adata = mdata.mod["rna"] assert list(adata.obs.keys()) == [ - 'fov', - 'Area', - 'AspectRatio', - 'CenterX_global_px', - 'CenterY_global_px', - 'Width', - 'Height', - 'Mean.MembraneStain', - 'Max.MembraneStain', - 'Mean.PanCK', - 'Max.PanCK', - 'Mean.CD45', - 'Max.CD45', - 'Mean.CD3', - 'Max.CD3', + "fov", + "Area", + "AspectRatio", + "CenterX_global_px", + "CenterY_global_px", + "Width", + "Height", + "Mean.MembraneStain", + "Max.MembraneStain", + "Mean.PanCK", + "Max.PanCK", + "Mean.CD45", + "Max.CD45", + "Mean.CD3", + "Max.CD3", "Mean.DAPI", "Max.DAPI", - "cell_ID" - ] + "cell_ID", + ] assert list(adata.uns.keys()) == ["spatial"] assert list(adata.obsm.keys()) == ["spatial", "spatial_fov"] diff --git a/src/convert/from_spatialdata_to_h5mu/script.py b/src/convert/from_spatialdata_to_h5mu/script.py index 10fb9ac..a21ddcd 100644 --- a/src/convert/from_spatialdata_to_h5mu/script.py +++ b/src/convert/from_spatialdata_to_h5mu/script.py @@ -7,11 +7,9 @@ par = { "input": "./resources_test/xenium/xenium_tiny.zarr", "output": "./resources_test/xenium/xenium_tiny.h5mu", "modality": "rna", - "output_compression": None -} -meta ={ - "resources_dir": "src/utils" + "output_compression": None, } +meta = {"resources_dir": "src/utils"} ## VIASH END sys.path.append(meta["resources_dir"]) diff --git a/src/convert/from_spatialdata_to_h5mu/test.py b/src/convert/from_spatialdata_to_h5mu/test.py index 671c0de..ec805d7 100644 --- a/src/convert/from_spatialdata_to_h5mu/test.py +++ b/src/convert/from_spatialdata_to_h5mu/test.py @@ -2,40 +2,43 @@ import pytest import sys import mudata as mu + def test_simple_execution(run_component, tmp_path): output = tmp_path / "output.h5mu" run_component( [ - "--input", meta["resources_dir"] + "/xenium_tiny.zarr", - "--output", output, + "--input", + meta["resources_dir"] + "/xenium_tiny.zarr", + "--output", + output, ] ) assert output.is_file(), "output file was not created" mdata = mu.read_h5mu(output) assert list(mdata.mod.keys()) == ["rna"], "Expected modality rna" - + adata = mdata.mod["rna"] # TODO: update what is checked here when spatialdata from other experimental set-ups are tested (e.g. cosmx, visium) assert list(adata.obs.keys()) == [ - 'cell_id', - 'transcript_counts', - 'control_probe_counts', - 'genomic_control_counts', - 'control_codeword_counts', - 'unassigned_codeword_counts', - 'deprecated_codeword_counts', - 'total_counts', - 'cell_area', - 'nucleus_area', - 'nucleus_count', - 'segmentation_method', - 'region', - 'z_level', - 'cell_labels' - ] + "cell_id", + "transcript_counts", + "control_probe_counts", + "genomic_control_counts", + "control_codeword_counts", + "unassigned_codeword_counts", + "deprecated_codeword_counts", + "total_counts", + "cell_area", + "nucleus_area", + "nucleus_count", + "segmentation_method", + "region", + "z_level", + "cell_labels", + ] assert list(adata.uns.keys()) == ["spatialdata_attrs"] assert list(adata.obsm.keys()) == ["spatial"] diff --git a/src/convert/from_xenium_to_spatialdata/script.py b/src/convert/from_xenium_to_spatialdata/script.py index 79718df..bc287b6 100644 --- a/src/convert/from_xenium_to_spatialdata/script.py +++ b/src/convert/from_xenium_to_spatialdata/script.py @@ -15,11 +15,9 @@ par = { "morphology_focus": True, "aligned_images": True, "cells_table": True, - "n_jobs": 1 -} -meta ={ - "resources_dir": "src/utils" + "n_jobs": 1, } +meta = {"resources_dir": "src/utils"} ## VIASH END sys.path.append(meta["resources_dir"]) @@ -36,12 +34,12 @@ sdata = xenium( cells_labels=par["cells_labels"], nucleus_labels=par["nucleus_labels"], transcripts=par["transcripts"], - morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 + morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 morphology_focus=par["morphology_focus"], aligned_images=par["aligned_images"], cells_table=par["cells_table"], - n_jobs=par["n_jobs"] - ) + n_jobs=par["n_jobs"], +) logger.info("Writing out SpatialData object to Zarr...") diff --git a/src/convert/from_xenium_to_spatialdata/test.py b/src/convert/from_xenium_to_spatialdata/test.py index a4faf26..c7cf3c1 100644 --- a/src/convert/from_xenium_to_spatialdata/test.py +++ b/src/convert/from_xenium_to_spatialdata/test.py @@ -9,15 +9,19 @@ def test_simple_execution(run_component, tmp_path): run_component( [ - "--input", meta["resources_dir"] + "/xenium_tiny", - "--output", output_sd_path, + "--input", + meta["resources_dir"] + "/xenium_tiny", + "--output", + output_sd_path, ] ) assert os.path.exists(output_sd_path), "Output zarr folder was not created" sdata = sd.read_zarr(output_sd_path) - assert isinstance(sdata, sd.SpatialData), "the generated output is not a SpatialData object" + assert isinstance(sdata, sd.SpatialData), ( + "the generated output is not a SpatialData object" + ) assert os.path.exists(output_sd_path / "images"), "images folder was not created" assert os.path.exists(output_sd_path / "labels"), "labels folder was not created" diff --git a/src/filter/subset_cosmx/script.py b/src/filter/subset_cosmx/script.py index 9ec57ab..3f0177e 100644 --- a/src/filter/subset_cosmx/script.py +++ b/src/filter/subset_cosmx/script.py @@ -10,11 +10,9 @@ par = { "input": "./resources_test/cosmx/Lung5_Rep2", "output": "./resources_test/cosmx/Lung5_Rep2_tiny/", "dataset_id": "Lung5_Rep2", - "num_fovs": 5 -} -meta ={ - "resources_dir": "src/utils" + "num_fovs": 5, } +meta = {"resources_dir": "src/utils"} ## VIASH END @@ -29,7 +27,9 @@ meta_file = f"{par['dataset_id']}_metadata_file.csv" tx_file = f"{par['dataset_id']}_tx_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) kept_fovs = list(range(1, par["num_fovs"] + 1)) diff --git a/src/filter/subset_cosmx/test.py b/src/filter/subset_cosmx/test.py index 22bb944..abd39c6 100644 --- a/src/filter/subset_cosmx/test.py +++ b/src/filter/subset_cosmx/test.py @@ -9,10 +9,14 @@ def test_simple_execution(run_component, tmp_path): dataset_id = "Lung5_Rep2" run_component( [ - "--input", meta["resources_dir"] + "/Lung5_Rep2_tiny", - "--dataset_id", dataset_id, - "--num_fovs", "2", - "--output", output_path, + "--input", + meta["resources_dir"] + "/Lung5_Rep2_tiny", + "--dataset_id", + dataset_id, + "--num_fovs", + "2", + "--output", + output_path, ] ) @@ -28,7 +32,9 @@ def test_simple_execution(run_component, tmp_path): for image in images: assert os.path.exists(output_path / image), f"{image} folder was not created" - assert len(os.listdir(output_path / image)) == 2, f"{image} folder should contain 2 files" + assert len(os.listdir(output_path / image)) == 2, ( + f"{image} folder should contain 2 files" + ) for matrix in matrices: assert os.path.exists(matrix), f"{matrix} file was not created" diff --git a/target/executable/convert/from_cosmx_to_h5mu/.config.vsh.yaml b/target/executable/convert/from_cosmx_to_h5mu/.config.vsh.yaml index 0d6f656..8791847 100644 --- a/target/executable/convert/from_cosmx_to_h5mu/.config.vsh.yaml +++ b/target/executable/convert/from_cosmx_to_h5mu/.config.vsh.yaml @@ -116,7 +116,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -231,7 +235,7 @@ build_info: output: "target/executable/convert/from_cosmx_to_h5mu" executable: "target/executable/convert/from_cosmx_to_h5mu/from_cosmx_to_h5mu" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -245,7 +249,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/executable/convert/from_cosmx_to_h5mu/from_cosmx_to_h5mu b/target/executable/convert/from_cosmx_to_h5mu/from_cosmx_to_h5mu index b0bb6c7..6ac6128 100755 --- a/target/executable/convert/from_cosmx_to_h5mu/from_cosmx_to_h5mu +++ b/target/executable/convert/from_cosmx_to_h5mu/from_cosmx_to_h5mu @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dorien Roosen, Weiwei Schultz" LABEL org.opencontainers.image.description="Companion container for running component convert from_cosmx_to_h5mu" -LABEL org.opencontainers.image.created="2025-07-10T12:30:15Z" +LABEL org.opencontainers.image.created="2025-07-10T14:35:39Z" LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial" -LABEL org.opencontainers.image.revision="491efceaaf171f50aaa1d28f690c1e974cffc456" +LABEL org.opencontainers.image.revision="6ae6ad193664a12a39c23f20030ebf03d9e886c6" LABEL org.opencontainers.image.version="build_main" VIASHDOCKER @@ -1182,15 +1182,14 @@ fov_file = f"{par['dataset_id']}_fov_positions_file.csv" meta_file = f"{par['dataset_id']}_metadata_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) logger.info("Reading in CosMx data...") adata = sq.read.nanostring( - path=par["input"], - counts_file=counts_file, - meta_file=meta_file, - fov_file=fov_file - ) + path=par["input"], counts_file=counts_file, meta_file=meta_file, fov_file=fov_file +) logger.info("Writing output MuData object...") mdata = mu.MuData({par["modality"]: adata}) diff --git a/target/executable/convert/from_spatialdata_to_h5mu/.config.vsh.yaml b/target/executable/convert/from_spatialdata_to_h5mu/.config.vsh.yaml index 62164db..df5122b 100644 --- a/target/executable/convert/from_spatialdata_to_h5mu/.config.vsh.yaml +++ b/target/executable/convert/from_spatialdata_to_h5mu/.config.vsh.yaml @@ -101,7 +101,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -217,7 +221,7 @@ build_info: output: "target/executable/convert/from_spatialdata_to_h5mu" executable: "target/executable/convert/from_spatialdata_to_h5mu/from_spatialdata_to_h5mu" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -231,7 +235,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/executable/convert/from_spatialdata_to_h5mu/from_spatialdata_to_h5mu b/target/executable/convert/from_spatialdata_to_h5mu/from_spatialdata_to_h5mu index caf92b7..f6ec8d4 100755 --- a/target/executable/convert/from_spatialdata_to_h5mu/from_spatialdata_to_h5mu +++ b/target/executable/convert/from_spatialdata_to_h5mu/from_spatialdata_to_h5mu @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dorien Roosen, Weiwei Schultz" LABEL org.opencontainers.image.description="Companion container for running component convert from_spatialdata_to_h5mu" -LABEL org.opencontainers.image.created="2025-07-10T12:30:14Z" +LABEL org.opencontainers.image.created="2025-07-10T14:35:39Z" LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial" -LABEL org.opencontainers.image.revision="491efceaaf171f50aaa1d28f690c1e974cffc456" +LABEL org.opencontainers.image.revision="6ae6ad193664a12a39c23f20030ebf03d9e886c6" LABEL org.opencontainers.image.version="build_main" VIASHDOCKER diff --git a/target/executable/convert/from_xenium_to_spatialdata/.config.vsh.yaml b/target/executable/convert/from_xenium_to_spatialdata/.config.vsh.yaml index db63f33..431a784 100644 --- a/target/executable/convert/from_xenium_to_spatialdata/.config.vsh.yaml +++ b/target/executable/convert/from_xenium_to_spatialdata/.config.vsh.yaml @@ -199,7 +199,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -314,7 +318,7 @@ build_info: output: "target/executable/convert/from_xenium_to_spatialdata" executable: "target/executable/convert/from_xenium_to_spatialdata/from_xenium_to_spatialdata" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -328,7 +332,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/executable/convert/from_xenium_to_spatialdata/from_xenium_to_spatialdata b/target/executable/convert/from_xenium_to_spatialdata/from_xenium_to_spatialdata index c3c0737..988edc6 100755 --- a/target/executable/convert/from_xenium_to_spatialdata/from_xenium_to_spatialdata +++ b/target/executable/convert/from_xenium_to_spatialdata/from_xenium_to_spatialdata @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dorien Roosen, Weiwei Schultz" LABEL org.opencontainers.image.description="Companion container for running component convert from_xenium_to_spatialdata" -LABEL org.opencontainers.image.created="2025-07-10T12:30:14Z" +LABEL org.opencontainers.image.created="2025-07-10T14:35:38Z" LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial" -LABEL org.opencontainers.image.revision="491efceaaf171f50aaa1d28f690c1e974cffc456" +LABEL org.opencontainers.image.revision="6ae6ad193664a12a39c23f20030ebf03d9e886c6" LABEL org.opencontainers.image.version="build_main" VIASHDOCKER @@ -1398,12 +1398,12 @@ sdata = xenium( cells_labels=par["cells_labels"], nucleus_labels=par["nucleus_labels"], transcripts=par["transcripts"], - morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 + morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 morphology_focus=par["morphology_focus"], aligned_images=par["aligned_images"], cells_table=par["cells_table"], - n_jobs=par["n_jobs"] - ) + n_jobs=par["n_jobs"], +) logger.info("Writing out SpatialData object to Zarr...") diff --git a/target/executable/filter/subset_cosmx/.config.vsh.yaml b/target/executable/filter/subset_cosmx/.config.vsh.yaml index 829c6b7..2d60783 100644 --- a/target/executable/filter/subset_cosmx/.config.vsh.yaml +++ b/target/executable/filter/subset_cosmx/.config.vsh.yaml @@ -103,7 +103,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -217,7 +221,7 @@ build_info: output: "target/executable/filter/subset_cosmx" executable: "target/executable/filter/subset_cosmx/subset_cosmx" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -231,7 +235,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/executable/filter/subset_cosmx/subset_cosmx b/target/executable/filter/subset_cosmx/subset_cosmx index 3ea5fe7..4e2f2b1 100755 --- a/target/executable/filter/subset_cosmx/subset_cosmx +++ b/target/executable/filter/subset_cosmx/subset_cosmx @@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \ LABEL org.opencontainers.image.authors="Dorien Roosen, Weiwei Schultz" LABEL org.opencontainers.image.description="Companion container for running component filter subset_cosmx" -LABEL org.opencontainers.image.created="2025-07-10T12:30:14Z" +LABEL org.opencontainers.image.created="2025-07-10T14:35:38Z" LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial" -LABEL org.opencontainers.image.revision="491efceaaf171f50aaa1d28f690c1e974cffc456" +LABEL org.opencontainers.image.revision="6ae6ad193664a12a39c23f20030ebf03d9e886c6" LABEL org.opencontainers.image.version="build_main" VIASHDOCKER @@ -1165,7 +1165,9 @@ meta_file = f"{par['dataset_id']}_metadata_file.csv" tx_file = f"{par['dataset_id']}_tx_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) kept_fovs = list(range(1, par["num_fovs"] + 1)) diff --git a/target/executable/mapping/spaceranger_count/.config.vsh.yaml b/target/executable/mapping/spaceranger_count/.config.vsh.yaml index e1e7858..2ce8e88 100644 --- a/target/executable/mapping/spaceranger_count/.config.vsh.yaml +++ b/target/executable/mapping/spaceranger_count/.config.vsh.yaml @@ -329,7 +329,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" keywords: - "spaceranger" links: @@ -426,7 +430,7 @@ build_info: output: "target/executable/mapping/spaceranger_count" executable: "target/executable/mapping/spaceranger_count/spaceranger_count" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -440,7 +444,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/executable/mapping/spaceranger_count/spaceranger_count b/target/executable/mapping/spaceranger_count/spaceranger_count index 6436f95..187c81c 100755 --- a/target/executable/mapping/spaceranger_count/spaceranger_count +++ b/target/executable/mapping/spaceranger_count/spaceranger_count @@ -453,9 +453,9 @@ apt upgrade -y && apt install -y procps && rm -rf /var/lib/apt/lists/* LABEL org.opencontainers.image.authors="Jakub Majercik" LABEL org.opencontainers.image.description="Companion container for running component mapping spaceranger_count" -LABEL org.opencontainers.image.created="2025-07-10T12:30:14Z" +LABEL org.opencontainers.image.created="2025-07-10T14:35:38Z" LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial" -LABEL org.opencontainers.image.revision="491efceaaf171f50aaa1d28f690c1e974cffc456" +LABEL org.opencontainers.image.revision="6ae6ad193664a12a39c23f20030ebf03d9e886c6" LABEL org.opencontainers.image.version="build_main" VIASHDOCKER diff --git a/target/nextflow/convert/from_cosmx_to_h5mu/.config.vsh.yaml b/target/nextflow/convert/from_cosmx_to_h5mu/.config.vsh.yaml index 59096f6..0c70bcc 100644 --- a/target/nextflow/convert/from_cosmx_to_h5mu/.config.vsh.yaml +++ b/target/nextflow/convert/from_cosmx_to_h5mu/.config.vsh.yaml @@ -116,7 +116,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -231,7 +235,7 @@ build_info: output: "target/nextflow/convert/from_cosmx_to_h5mu" executable: "target/nextflow/convert/from_cosmx_to_h5mu/main.nf" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -245,7 +249,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/nextflow/convert/from_cosmx_to_h5mu/main.nf b/target/nextflow/convert/from_cosmx_to_h5mu/main.nf index dc6d48a..c461aa8 100644 --- a/target/nextflow/convert/from_cosmx_to_h5mu/main.nf +++ b/target/nextflow/convert/from_cosmx_to_h5mu/main.nf @@ -3194,7 +3194,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "links" : { @@ -3340,7 +3346,7 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/convert/from_cosmx_to_h5mu", "viash_version" : "0.9.3", - "git_commit" : "491efceaaf171f50aaa1d28f690c1e974cffc456", + "git_commit" : "6ae6ad193664a12a39c23f20030ebf03d9e886c6", "git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial" }, "package_config" : { @@ -3360,7 +3366,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "viash_version" : "0.9.3", @@ -3440,15 +3452,14 @@ fov_file = f"{par['dataset_id']}_fov_positions_file.csv" meta_file = f"{par['dataset_id']}_metadata_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) logger.info("Reading in CosMx data...") adata = sq.read.nanostring( - path=par["input"], - counts_file=counts_file, - meta_file=meta_file, - fov_file=fov_file - ) + path=par["input"], counts_file=counts_file, meta_file=meta_file, fov_file=fov_file +) logger.info("Writing output MuData object...") mdata = mu.MuData({par["modality"]: adata}) diff --git a/target/nextflow/convert/from_spatialdata_to_h5mu/.config.vsh.yaml b/target/nextflow/convert/from_spatialdata_to_h5mu/.config.vsh.yaml index e9e50e2..562e634 100644 --- a/target/nextflow/convert/from_spatialdata_to_h5mu/.config.vsh.yaml +++ b/target/nextflow/convert/from_spatialdata_to_h5mu/.config.vsh.yaml @@ -101,7 +101,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -217,7 +221,7 @@ build_info: output: "target/nextflow/convert/from_spatialdata_to_h5mu" executable: "target/nextflow/convert/from_spatialdata_to_h5mu/main.nf" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -231,7 +235,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/nextflow/convert/from_spatialdata_to_h5mu/main.nf b/target/nextflow/convert/from_spatialdata_to_h5mu/main.nf index 4ca14c7..f28dfe8 100644 --- a/target/nextflow/convert/from_spatialdata_to_h5mu/main.nf +++ b/target/nextflow/convert/from_spatialdata_to_h5mu/main.nf @@ -3185,7 +3185,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "links" : { @@ -3332,7 +3338,7 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/convert/from_spatialdata_to_h5mu", "viash_version" : "0.9.3", - "git_commit" : "491efceaaf171f50aaa1d28f690c1e974cffc456", + "git_commit" : "6ae6ad193664a12a39c23f20030ebf03d9e886c6", "git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial" }, "package_config" : { @@ -3352,7 +3358,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "viash_version" : "0.9.3", diff --git a/target/nextflow/convert/from_xenium_to_spatialdata/.config.vsh.yaml b/target/nextflow/convert/from_xenium_to_spatialdata/.config.vsh.yaml index a75c32a..6740d8a 100644 --- a/target/nextflow/convert/from_xenium_to_spatialdata/.config.vsh.yaml +++ b/target/nextflow/convert/from_xenium_to_spatialdata/.config.vsh.yaml @@ -199,7 +199,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -314,7 +318,7 @@ build_info: output: "target/nextflow/convert/from_xenium_to_spatialdata" executable: "target/nextflow/convert/from_xenium_to_spatialdata/main.nf" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -328,7 +332,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/nextflow/convert/from_xenium_to_spatialdata/main.nf b/target/nextflow/convert/from_xenium_to_spatialdata/main.nf index 42d82b8..bf87a32 100644 --- a/target/nextflow/convert/from_xenium_to_spatialdata/main.nf +++ b/target/nextflow/convert/from_xenium_to_spatialdata/main.nf @@ -3284,7 +3284,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "links" : { @@ -3430,7 +3436,7 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/convert/from_xenium_to_spatialdata", "viash_version" : "0.9.3", - "git_commit" : "491efceaaf171f50aaa1d28f690c1e974cffc456", + "git_commit" : "6ae6ad193664a12a39c23f20030ebf03d9e886c6", "git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial" }, "package_config" : { @@ -3450,7 +3456,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "viash_version" : "0.9.3", @@ -3540,12 +3552,12 @@ sdata = xenium( cells_labels=par["cells_labels"], nucleus_labels=par["nucleus_labels"], transcripts=par["transcripts"], - morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 + morphology_mip=par["morphology_mip"], # only available in version < 2.0.0 morphology_focus=par["morphology_focus"], aligned_images=par["aligned_images"], cells_table=par["cells_table"], - n_jobs=par["n_jobs"] - ) + n_jobs=par["n_jobs"], +) logger.info("Writing out SpatialData object to Zarr...") diff --git a/target/nextflow/filter/subset_cosmx/.config.vsh.yaml b/target/nextflow/filter/subset_cosmx/.config.vsh.yaml index 21f2c0c..8648a9c 100644 --- a/target/nextflow/filter/subset_cosmx/.config.vsh.yaml +++ b/target/nextflow/filter/subset_cosmx/.config.vsh.yaml @@ -103,7 +103,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" links: repository: "https://github.com/openpipelines-bio/openpipeline_spatial" docker_registry: "ghcr.io" @@ -217,7 +221,7 @@ build_info: output: "target/nextflow/filter/subset_cosmx" executable: "target/nextflow/filter/subset_cosmx/main.nf" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -231,7 +235,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/nextflow/filter/subset_cosmx/main.nf b/target/nextflow/filter/subset_cosmx/main.nf index 2d1c15a..81c32a6 100644 --- a/target/nextflow/filter/subset_cosmx/main.nf +++ b/target/nextflow/filter/subset_cosmx/main.nf @@ -3177,7 +3177,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "links" : { @@ -3322,7 +3328,7 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/filter/subset_cosmx", "viash_version" : "0.9.3", - "git_commit" : "491efceaaf171f50aaa1d28f690c1e974cffc456", + "git_commit" : "6ae6ad193664a12a39c23f20030ebf03d9e886c6", "git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial" }, "package_config" : { @@ -3342,7 +3348,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "viash_version" : "0.9.3", @@ -3425,7 +3437,9 @@ meta_file = f"{par['dataset_id']}_metadata_file.csv" tx_file = f"{par['dataset_id']}_tx_file.csv" for file in [counts_file, fov_file, meta_file]: - assert os.path.isfile(os.path.join(par["input"], file)), f"File does not exist: {file}" + assert os.path.isfile(os.path.join(par["input"], file)), ( + f"File does not exist: {file}" + ) kept_fovs = list(range(1, par["num_fovs"] + 1)) diff --git a/target/nextflow/mapping/spaceranger_count/.config.vsh.yaml b/target/nextflow/mapping/spaceranger_count/.config.vsh.yaml index 9746ead..eef7c3c 100644 --- a/target/nextflow/mapping/spaceranger_count/.config.vsh.yaml +++ b/target/nextflow/mapping/spaceranger_count/.config.vsh.yaml @@ -329,7 +329,11 @@ repositories: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" +- type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" keywords: - "spaceranger" links: @@ -426,7 +430,7 @@ build_info: output: "target/nextflow/mapping/spaceranger_count" executable: "target/nextflow/mapping/spaceranger_count/main.nf" viash_version: "0.9.3" - git_commit: "491efceaaf171f50aaa1d28f690c1e974cffc456" + git_commit: "6ae6ad193664a12a39c23f20030ebf03d9e886c6" git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial" package_config: name: "openpipeline_spatial" @@ -440,7 +444,11 @@ package_config: - type: "github" name: "openpipeline" repo: "openpipelines-bio/openpipeline" - tag: "main_build" + tag: "2.1.2" + - type: "github" + name: "openpipeline_incubator" + repo: "openpipelines-bio/openpipeline_incubator" + tag: "main" viash_version: "0.9.3" source: "src" target: "target" diff --git a/target/nextflow/mapping/spaceranger_count/main.nf b/target/nextflow/mapping/spaceranger_count/main.nf index c9e68f4..04c40ba 100644 --- a/target/nextflow/mapping/spaceranger_count/main.nf +++ b/target/nextflow/mapping/spaceranger_count/main.nf @@ -3437,7 +3437,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "keywords" : [ @@ -3553,7 +3559,7 @@ meta = [ "engine" : "docker|native", "output" : "/workdir/root/repo/target/nextflow/mapping/spaceranger_count", "viash_version" : "0.9.3", - "git_commit" : "491efceaaf171f50aaa1d28f690c1e974cffc456", + "git_commit" : "6ae6ad193664a12a39c23f20030ebf03d9e886c6", "git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial" }, "package_config" : { @@ -3573,7 +3579,13 @@ meta = [ "type" : "github", "name" : "openpipeline", "repo" : "openpipelines-bio/openpipeline", - "tag" : "main_build" + "tag" : "2.1.2" + }, + { + "type" : "github", + "name" : "openpipeline_incubator", + "repo" : "openpipelines-bio/openpipeline_incubator", + "tag" : "main" } ], "viash_version" : "0.9.3",