Build branch build/main with version build_main (798a0cb)

Build pipeline: openpipelines-bio.openpipeline-spatial.build-main-7frxn

Source commit: 798a0cb269

Source message: deploy: 5fc3bcd8432928c148e8f27d6ae49214a91add67
This commit is contained in:
CI
2025-08-22 15:00:12 +00:00
parent 8c9abfcde2
commit 5273fbdd05
52 changed files with 6860 additions and 49 deletions

View File

@@ -17,3 +17,5 @@
* `workflows/qc/qc`: Added a pipeline for calculating qc metrics of spatial omics samples (PR #5).
* `workflows/multiomics/spatial_process_samples`: Added a pipeline to pre-process multiple spatial omics samples (PR #7).
* `convert/from_h5mu_to_spatialexperiment`: Added converter component for H5MU data to SpatialExperiment objects (PR #15).

View File

@@ -0,0 +1,75 @@
name: "from_h5mu_to_spatialexperiment"
namespace: "convert"
scope: "public"
description: |
Converts an h5mu file into a SpatialExperiment object.
authors:
- __merge__: /src/authors/dorien_roosen.yaml
roles: [ author ]
arguments:
- name: "--input"
alternatives: ["-i"]
type: file
description: Input h5mu file
direction: input
required: true
example: input.h5mu
- name: "--modality"
type: string
required: true
default: "rna"
description: Name of the modality to be converted.
- name: "--obsm_spatial_coordinates"
type: string
required: false
description: |
Key in the .obsm field that contains the spatial coordinates.
Will be mapped to spatialCoords in the SpatialExperiment object.
- name: "--output"
alternatives: ["-o"]
type: file
description: Output SpatialExperiment file
direction: output
required: true
example: output.rds
resources:
- type: r_script
path: script.R
test_resources:
- type: r_script
path: test.R
- path: /resources_test/aviti/aviti_teton_tiny.h5mu
- path: /resources_test/cosmx/Lung5_Rep2_tiny.h5mu
- path: /resources_test/xenium/xenium_tiny.h5mu
engines:
- type: docker
image: rocker/r2u:22.04
setup:
- type: apt
packages:
- libhdf5-dev
- libgeos-dev
- type: r
cran: [ hdf5r, SpatialExperiment ]
github: scverse/anndataR@36f3caad9a7f360165c1510bbe0c62657580415a
test_setup:
- type: docker
env:
- RETICULATE_PYTHON=/usr/bin/python
- type: apt
packages:
- python3
- python3-pip
- python3-dev
- python-is-python3
- type: r
cran: [ reticulate, testthat ]
- type: python
__merge__: /src/base/requirements/anndata_mudata.yaml
runners:
- type: executable
- type: nextflow
directives:
label: [lowmem, singlecpu]

View File

@@ -0,0 +1,113 @@
library(SpatialExperiment)
library(SingleCellExperiment)
library(hdf5r)
library(Matrix)
library(hdf5r)
## VIASH START
par <- list(
input = "resources_test/xenium/xenium_tiny.h5mu",
output = "xenium_test.rds",
modality = "rna",
obsm_spatial_coordinates = "spatial"
)
## VIASH END
h5mu_to_h5ad <- function(h5mu_path, modality_name) {
tmp_path <- tempfile(fileext = ".h5ad")
mod_location <- paste("mod", modality_name, sep = "/")
h5src <- hdf5r::H5File$new(h5mu_path, "r")
h5dest <- hdf5r::H5File$new(tmp_path, "w")
# Copy over the child objects and the child attributes from root
# Root cannot be copied directly because it always exists and
# copying does not allow overwriting.
children <- hdf5r::list.objects(h5src,
path = mod_location,
full.names = FALSE, recursive = FALSE
)
for (child in children) {
h5dest$obj_copy_from(
h5src, paste(mod_location, child, sep = "/"),
paste0("/", child)
)
}
# Also copy the root attributes
root_attrs <- hdf5r::h5attr_names(x = h5src)
for (attr in root_attrs) {
h5a <- h5src$attr_open(attr_name = attr)
robj <- h5a$read()
h5dest$create_attr_by_name(
attr_name = attr,
obj_name = ".",
robj = robj,
space = h5a$get_space(),
dtype = h5a$get_type()
)
}
h5src$close()
h5dest$close()
tmp_path
}
read_spatial_coordinates <- function(sce, spatial_coordinates_name) {
# Check if the specified spatial coordinates exist in reducedDims
reduced_dims <- SingleCellExperiment::reducedDims(sce)
if (par$obsm_spatial_coordinates %in% names(reduced_dims)) {
spatial_coords <- reduced_dims[[par$obsm_spatial_coordinates]]
if (ncol(spatial_coords) != 2) {
stop(
"Spatial coordinates must have 2 columns, but found ",
ncol(spatial_coords), " columns"
)
}
# Set proper column names for spatial coordinates
colnames(spatial_coords) <- c("x", "y")
} else {
warning(
"Spatial coordinates '", par$obsm_spatial_coordinates,
"' not found in reducedDims. Available dimensions: ",
paste(names(reduced_dims), collapse = ", ")
)
spatial_coords <- NULL
}
spatial_coords
}
main <- function() {
# Convert to AnnData
cat("Converting H5MU file to H5AD...\n")
h5file <- h5mu_to_h5ad(par$input, par$modality)
# Convert to SpatialExperiment
cat("Converting to SingleCellExperiment...\n")
sce <- anndataR::read_h5ad(h5file, as = "SingleCellExperiment")
# Extract spatial coordinates if specified
if (
!is.null(par$obsm_spatial_coordinates) &&
length(par$obsm_spatial_coordinates) > 0
) {
cat("Reading in spatial coordinates...\n")
spatial_coords <- read_spatial_coordinates(
sce, par$obsm_spatial_coordinates
)
SingleCellExperiment::reducedDims(sce)[[
par$obsm_spatial_coordinates
]] <- NULL
} else {
spatial_coords <- NULL
}
# Converting SingleCellExperiment to SpatialExperiment
cat("Converting to SpatialExperiment...\n")
spe <- as(sce, "SpatialExperiment")
SpatialExperiment::spatialCoords(spe) <- spatial_coords
# Saving SpatialExperiment object
cat("Saving SpatialExperiment object to:", par$output, "\n")
saveRDS(spe, file = par$output, compress = FALSE)
}
main()

View File

@@ -0,0 +1,475 @@
library(testthat)
library(SpatialExperiment)
library(SingleCellExperiment)
library(hdf5r)
library(Matrix)
library(reticulate)
mu <- reticulate::import("mudata")
ad <- reticulate::import("anndata")
## VIASH START
meta <- list(
resources_dir = "resources_test"
)
## VIASH END
# Helper function to create mock H5MU test data
create_mock_h5mu <- function(path) {
n_obs <- 5
n_var_mod1 <- 4
n_var_mod2 <- 3
# ============== MOD1 MODALITY ==============
mod1_x_data <- matrix(c(
1, 2, 3, 0,
4, 5, 6, 2,
0, 1, 2, 3,
2, 0, 1, 4,
1, 3, 0, 2
), nrow = n_obs, ncol = n_var_mod1, byrow = TRUE)
# Create obs dataframe
mod1_obs <- data.frame(
Obs1 = c("A", "B", "A", "C", "B"),
Obs2 = c(0.9, 0.8, 0.95, 0.7, 0.85),
Obs3 = c(FALSE, FALSE, TRUE, FALSE, FALSE),
row.names = paste0("cell_", 1:n_obs),
stringsAsFactors = FALSE
)
# Create var dataframe
mod1_var <- data.frame(
Feat1 = c("A", "B", "C", "D"),
Feat2 = c(TRUE, FALSE, TRUE, FALSE),
Feat3 = c(1.6, 2.2, 1.2, 1.8),
row.names = paste0("gene_", 1:n_var_mod1),
stringsAsFactors = FALSE
)
# Create layers
mod1_layers <- list(
counts = mod1_x_data * 2
)
# Create obsm
obsm_1 <- matrix(c(
100.5, 200.3,
150.2, 180.7,
120.8, 220.1,
180.4, 160.9,
200.1, 190.5
), nrow = n_obs, ncol = 2, byrow = TRUE)
obsm_2 <- matrix(c(
-1.2, 0.8, 0.3,
1.1, -0.5, -0.2,
0.3, 1.2, 0.7,
-0.8, -0.3, 1.1,
0.9, 0.2, -0.9
), nrow = n_obs, ncol = 3, byrow = TRUE)
mod1_obsm <- list(
Obsm1 = obsm_1,
Obsm2 = obsm_2
)
# Create uns (unstructured metadata)
mod1_uns <- list(
experiment_info = "metadata"
)
# Create AnnData object for mod1 using AnnDataR
ad_mod1 <- ad$AnnData(
X = mod1_x_data,
obs = mod1_obs,
var = mod1_var,
layers = mod1_layers,
obsm = mod1_obsm,
uns = mod1_uns
)
# ============== MOD2 MODALITY ==============
# Create expression matrix
mod2_x_data <- matrix(c(
10, 20, 15,
25, 30, 18,
12, 22, 20,
18, 25, 12,
20, 28, 16
), nrow = n_obs, ncol = n_var_mod2, byrow = TRUE)
# Create obs dataframe
mod2_obs <- data.frame(
Obs = c("C", "D", "C", "E", "D"),
row.names = paste0("cell_", 1:n_obs),
stringsAsFactors = FALSE
)
# Create var dataframe
mod2_var <- data.frame(
Feat = c("d", "e", "g"),
row.names = paste0("protein_", 1:n_var_mod2),
stringsAsFactors = FALSE
)
# Create AnnData object for mod2
ad_mod2 <- ad$AnnData(
X = mod2_x_data,
obs = mod2_obs,
var = mod2_var
)
# ============== CREATE MUDATA ==============
# Create MuData object using reticulate
mdata <- mu$MuData(list(
mod1 = ad_mod1,
mod2 = ad_mod2
))
# Write Mudata to path
mdata$write_h5mu(path)
path
}
# Main test
test_simple_execution <- function() {
cat("> > Testing Simple Conversion\n")
cat("> Creating mock H5MU file\n")
# Create mock H5MU file
test_h5mu <- tempfile(fileext = ".h5mu")
create_mock_h5mu(test_h5mu)
# Output file
out_rds <- tempfile(fileext = ".rds")
# Run conversion
cat("> Running conversion\n")
out <- processx::run(
meta[["executable"]],
c(
"--input", test_h5mu,
"--modality", "mod1",
"--output", out_rds,
"--obsm_spatial_coordinates", "Obsm1"
)
)
cat("> Checking execution status\n")
testthat::expect_equal(out$status, 0)
testthat::expect_true(file.exists(out_rds))
cat("> Reading output file\n")
spe <- readRDS(file = out_rds)
testthat::expect_s4_class(spe, "SpatialExperiment")
cat("> Opening input file for comparison\n")
mod1 <- mu$read_h5ad(test_h5mu, mod = "mod1")
cat("> Testing dimensions\n")
dim_spe <- dim(spe)
dim_h5mu <- dim(mod1$X)
testthat::expect_equal(dim_spe[1], dim_h5mu[2])
testthat::expect_equal(dim_spe[2], dim_h5mu[1])
testthat::expect_equal(nrow(spe), 4)
testthat::expect_equal(ncol(spe), 5)
cat("> Testing colData (obs) transfer and data types\n")
col_data <- SummarizedExperiment::colData(spe)
coldata_cols <- colnames(col_data)
obs_cols <- colnames(mod1$obs)
testthat::expect_true(all(obs_cols %in% coldata_cols))
# Test data types in colData
testthat::expect_true(is.factor(col_data$Obs1))
testthat::expect_true(is.numeric(col_data$Obs2))
testthat::expect_true(is.logical(col_data$Obs3))
cat("> Testing rowData (var) transfer and data types\n")
row_data <- SummarizedExperiment::rowData(spe)
row_names <- colnames(row_data)
var_cols <- colnames(mod1$var)
testthat::expect_true(all(var_cols %in% row_names))
# Test data types in rowData
testthat::expect_true(is.character(row_data$Feat1))
testthat::expect_true(is.logical(row_data$Feat2))
testthat::expect_true(is.numeric(row_data$Feat3))
cat("> Testing spatialCoords\n")
spatial_coords <- SpatialExperiment::spatialCoords(spe)
testthat::expect_false(is.null(spatial_coords))
testthat::expect_equal(ncol(spatial_coords), 2)
testthat::expect_equal(nrow(spatial_coords), ncol(spe))
testthat::expect_identical(colnames(spatial_coords), c("x", "y"))
# Test spatial coordinate data types and values
testthat::expect_true(is.numeric(spatial_coords[, "x"]))
testthat::expect_true(is.numeric(spatial_coords[, "y"]))
# Compare with original spatial coordinates
original_spatial <- mod1$obsm[["Obsm1"]]
testthat::expect_equal(
as.numeric(original_spatial),
as.numeric(spatial_coords)
)
cat("> Testing assay data\n")
counts_matrix <- SummarizedExperiment::assays(spe)[["counts"]]
testthat::expect_true(is(counts_matrix, "Matrix") || is.matrix(counts_matrix))
testthat::expect_true(all(counts_matrix >= 0))
testthat::expect_equal(dim(counts_matrix), c(4, 5))
cat("> Testing reducedDims\n")
# PCA should not be in reducedDims since we only specified spatial
red_dims <- SingleCellExperiment::reducedDims(spe)
testthat::expect_false(is.null(red_dims))
testthat::expect_equal(names(red_dims), c("Obsm2"))
testthat::expect_equal(dim(red_dims$Obsm2), c(5, 3))
testthat::expect_true(is.numeric(red_dims$Obsm2))
# Compare with original spatial coordinates
original_dimred <- mod1$obsm[["Obsm2"]]
testthat::expect_equal(
as.numeric(red_dims$Obsm2),
as.numeric(original_dimred)
)
# Clean up
unlink(c(test_h5mu, out_rds))
}
test_xenium_execution <- function() {
cat("> > Testing Xenium Conversion\n")
xenium_h5mu <- paste0(
meta[["resources_dir"]],
"/xenium_tiny.h5mu"
)
# Output file
out_rds <- tempfile(fileext = ".rds")
# Run conversion
cat("> Running conversion\n")
out <- processx::run(
meta[["executable"]],
c(
"--input", xenium_h5mu,
"--modality", "rna",
"--output", out_rds,
"--obsm_spatial_coordinates", "spatial"
)
)
cat("> Checking execution status\n")
testthat::expect_equal(out$status, 0)
testthat::expect_true(file.exists(out_rds))
cat("> Reading output file\n")
xenium_spe <- readRDS(file = out_rds)
testthat::expect_s4_class(xenium_spe, "SpatialExperiment")
cat("> Opening input file for comparison\n")
rna_mod <- mu$read_h5ad(xenium_h5mu, mod = "rna")
cat("> Testing dimensions\n")
dim_spe <- dim(xenium_spe)
dim_h5mu <- dim(rna_mod$X)
testthat::expect_equal(dim_spe[1], dim_h5mu[2])
testthat::expect_equal(dim_spe[2], dim_h5mu[1])
cat("> Testing colData (obs) transfer and data types\n")
col_data <- SummarizedExperiment::colData(xenium_spe)
coldata_cols <- colnames(col_data)
obs_cols <- colnames(rna_mod$obs)
testthat::expect_true(all(obs_cols %in% coldata_cols))
cat("> Testing rowData (var) transfer and data types\n")
row_data <- SummarizedExperiment::rowData(xenium_spe)
row_names <- colnames(row_data)
var_cols <- colnames(rna_mod$var)
testthat::expect_true(all(var_cols %in% row_names))
cat("> Testing spatialCoords\n")
spatial_coords <- SpatialExperiment::spatialCoords(xenium_spe)
testthat::expect_false(is.null(spatial_coords))
testthat::expect_equal(ncol(spatial_coords), 2)
testthat::expect_equal(nrow(spatial_coords), ncol(xenium_spe))
testthat::expect_identical(colnames(spatial_coords), c("x", "y"))
# Test spatial coordinate data types and values
testthat::expect_true(is.numeric(spatial_coords[, "x"]))
testthat::expect_true(is.numeric(spatial_coords[, "y"]))
# Compare with original spatial coordinates
original_spatial <- rna_mod$obsm[["spatial"]]
testthat::expect_equal(
as.numeric(original_spatial),
as.numeric(spatial_coords)
)
# Clean up
unlink(c(xenium_h5mu, out_rds))
}
test_aviti_execution <- function() {
cat("> > Testing Aviti Conversion\n")
aviti_h5mu <- paste0(
meta[["resources_dir"]],
"/aviti_teton_tiny.h5mu"
)
# Output file
out_rds <- tempfile(fileext = ".rds")
# Run conversion
cat("> Running conversion\n")
out <- processx::run(
meta[["executable"]],
c(
"--input", aviti_h5mu,
"--modality", "rna",
"--output", out_rds,
"--obsm_spatial_coordinates", "spatial"
)
)
cat("> Checking execution status\n")
testthat::expect_equal(out$status, 0)
testthat::expect_true(file.exists(out_rds))
cat("> Reading output file\n")
aviti_spe <- readRDS(file = out_rds)
testthat::expect_s4_class(aviti_spe, "SpatialExperiment")
cat("> Opening input file for comparison\n")
rna_mod <- mu$read_h5ad(aviti_h5mu, mod = "rna")
cat("> Testing dimensions\n")
dim_spe <- dim(aviti_spe)
dim_h5mu <- dim(rna_mod$X)
testthat::expect_equal(dim_spe[1], dim_h5mu[2])
testthat::expect_equal(dim_spe[2], dim_h5mu[1])
cat("> Testing colData (obs) transfer and data types\n")
col_data <- SummarizedExperiment::colData(aviti_spe)
coldata_cols <- colnames(col_data)
obs_cols <- colnames(rna_mod$obs)
testthat::expect_true(all(obs_cols %in% coldata_cols))
cat("> Testing rowData (var) transfer and data types\n")
row_data <- SummarizedExperiment::rowData(aviti_spe)
row_names <- colnames(row_data)
var_cols <- colnames(rna_mod$var)
testthat::expect_true(all(var_cols %in% row_names))
cat("> Testing spatialCoords\n")
spatial_coords <- SpatialExperiment::spatialCoords(aviti_spe)
testthat::expect_false(is.null(spatial_coords))
testthat::expect_equal(ncol(spatial_coords), 2)
testthat::expect_equal(nrow(spatial_coords), ncol(aviti_spe))
testthat::expect_identical(colnames(spatial_coords), c("x", "y"))
# Test spatial coordinate data types and values
testthat::expect_true(is.numeric(spatial_coords[, "x"]))
testthat::expect_true(is.numeric(spatial_coords[, "y"]))
# Compare with original spatial coordinates
original_spatial <- rna_mod$obsm[["spatial"]]
testthat::expect_equal(
as.numeric(original_spatial),
as.numeric(spatial_coords)
)
# Clean up
unlink(c(aviti_h5mu, out_rds))
}
test_cosmx_execution <- function() {
cat("> > Testing CosMx Conversion\n")
cosmx_h5mu <- paste0(
meta[["resources_dir"]],
"/Lung5_Rep2_tiny.h5mu"
)
# Output file
out_rds <- tempfile(fileext = ".rds")
# Run conversion
cat("> Running conversion\n")
out <- processx::run(
meta[["executable"]],
c(
"--input", cosmx_h5mu,
"--modality", "rna",
"--output", out_rds,
"--obsm_spatial_coordinates", "spatial"
)
)
cat("> Checking execution status\n")
testthat::expect_equal(out$status, 0)
testthat::expect_true(file.exists(out_rds))
cat("> Reading output file\n")
cosmx_spe <- readRDS(file = out_rds)
testthat::expect_s4_class(cosmx_spe, "SpatialExperiment")
cat("> Opening input file for comparison\n")
rna_mod <- mu$read_h5ad(cosmx_h5mu, mod = "rna")
cat("> Testing dimensions\n")
dim_spe <- dim(cosmx_spe)
dim_h5mu <- dim(rna_mod$X)
testthat::expect_equal(dim_spe[1], dim_h5mu[2])
testthat::expect_equal(dim_spe[2], dim_h5mu[1])
cat("> Testing colData (obs) transfer and data types\n")
col_data <- SummarizedExperiment::colData(cosmx_spe)
coldata_cols <- colnames(col_data)
obs_cols <- colnames(rna_mod$obs)
testthat::expect_true(all(obs_cols %in% coldata_cols))
cat("> Testing rowData (var) transfer and data types\n")
row_data <- SummarizedExperiment::rowData(cosmx_spe)
row_names <- colnames(row_data)
var_cols <- colnames(rna_mod$var)
testthat::expect_true(all(var_cols %in% row_names))
cat("> Testing spatialCoords\n")
spatial_coords <- SpatialExperiment::spatialCoords(cosmx_spe)
testthat::expect_false(is.null(spatial_coords))
testthat::expect_equal(ncol(spatial_coords), 2)
testthat::expect_equal(nrow(spatial_coords), ncol(cosmx_spe))
testthat::expect_identical(colnames(spatial_coords), c("x", "y"))
# Test spatial coordinate data types and values
testthat::expect_true(is.numeric(spatial_coords[, "x"]))
testthat::expect_true(is.numeric(spatial_coords[, "y"]))
# Compare with original spatial coordinates
original_spatial <- rna_mod$obsm[["spatial"]]
testthat::expect_equal(
as.numeric(original_spatial),
as.numeric(spatial_coords)
)
# Clean up
unlink(c(cosmx_h5mu, out_rds))
}
cat("Starting tests...")
test_simple_execution()
test_xenium_execution()
test_aviti_execution()
test_cosmx_execution()
cat("All tests completed!\n")

View File

@@ -290,7 +290,7 @@ build_info:
output: "target/executable/convert/from_cells2stats_to_h5mu"
executable: "target/executable/convert/from_cells2stats_to_h5mu/from_cells2stats_to_h5mu"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component convert from_cells2stats_to_h5mu"
LABEL org.opencontainers.image.created="2025-08-22T08:22:46Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:50Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -225,7 +225,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -459,9 +459,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-08-22T08:22:48Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:52Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -232,7 +232,7 @@ build_info:
output: "target/executable/convert/from_cosmx_to_spatialexperiment"
executable: "target/executable/convert/from_cosmx_to_spatialexperiment/from_cosmx_to_spatialexperiment"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -457,9 +457,9 @@ RUN Rscript -e 'options(warn = 2); if (!requireNamespace("BiocManager", quietly
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component convert from_cosmx_to_spatialexperiment"
LABEL org.opencontainers.image.created="2025-08-22T08:22:47Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:51Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -0,0 +1,255 @@
name: "from_h5mu_to_spatialexperiment"
namespace: "convert"
version: "build_main"
authors:
- name: "Dorien Roosen"
roles:
- "author"
info:
role: "Core Team Member"
links:
email: "dorien@data-intuitive.com"
github: "dorien-er"
linkedin: "dorien-roosen"
organizations:
- name: "Data Intuitive"
href: "https://www.data-intuitive.com"
role: "Data Scientist"
argument_groups:
- name: "Arguments"
arguments:
- type: "file"
name: "--input"
alternatives:
- "-i"
description: "Input h5mu file"
info: null
example:
- "input.h5mu"
must_exist: true
create_parent: true
required: true
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--modality"
description: "Name of the modality to be converted."
info: null
default:
- "rna"
required: true
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--obsm_spatial_coordinates"
description: "Key in the .obsm field that contains the spatial coordinates. \n\
Will be mapped to spatialCoords in the SpatialExperiment object.\n"
info: null
required: false
direction: "input"
multiple: false
multiple_sep: ";"
- type: "file"
name: "--output"
alternatives:
- "-o"
description: "Output SpatialExperiment file"
info: null
example:
- "output.rds"
must_exist: true
create_parent: true
required: true
direction: "output"
multiple: false
multiple_sep: ";"
resources:
- type: "r_script"
path: "script.R"
is_executable: true
- type: "file"
path: "nextflow_labels.config"
dest: "nextflow_labels.config"
description: "Converts an h5mu file into a SpatialExperiment object.\n"
test_resources:
- type: "r_script"
path: "test.R"
is_executable: true
- type: "file"
path: "aviti_teton_tiny.h5mu"
- type: "file"
path: "Lung5_Rep2_tiny.h5mu"
- type: "file"
path: "xenium_tiny.h5mu"
info: null
status: "enabled"
scope:
image: "public"
target: "public"
repositories:
- type: "github"
name: "openpipeline"
repo: "openpipelines-bio/openpipeline"
tag: "2.1.2"
links:
repository: "https://github.com/openpipelines-bio/openpipeline_spatial"
docker_registry: "ghcr.io"
runners:
- type: "executable"
id: "executable"
docker_setup_strategy: "ifneedbepullelsecachedbuild"
- type: "nextflow"
id: "nextflow"
directives:
label:
- "lowmem"
- "singlecpu"
tag: "$id"
auto:
simplifyInput: true
simplifyOutput: false
transcript: false
publish: false
config:
labels:
mem1gb: "memory = 1000000000.B"
mem2gb: "memory = 2000000000.B"
mem5gb: "memory = 5000000000.B"
mem10gb: "memory = 10000000000.B"
mem20gb: "memory = 20000000000.B"
mem50gb: "memory = 50000000000.B"
mem100gb: "memory = 100000000000.B"
mem200gb: "memory = 200000000000.B"
mem500gb: "memory = 500000000000.B"
mem1tb: "memory = 1000000000000.B"
mem2tb: "memory = 2000000000000.B"
mem5tb: "memory = 5000000000000.B"
mem10tb: "memory = 10000000000000.B"
mem20tb: "memory = 20000000000000.B"
mem50tb: "memory = 50000000000000.B"
mem100tb: "memory = 100000000000000.B"
mem200tb: "memory = 200000000000000.B"
mem500tb: "memory = 500000000000000.B"
mem1gib: "memory = 1073741824.B"
mem2gib: "memory = 2147483648.B"
mem4gib: "memory = 4294967296.B"
mem8gib: "memory = 8589934592.B"
mem16gib: "memory = 17179869184.B"
mem32gib: "memory = 34359738368.B"
mem64gib: "memory = 68719476736.B"
mem128gib: "memory = 137438953472.B"
mem256gib: "memory = 274877906944.B"
mem512gib: "memory = 549755813888.B"
mem1tib: "memory = 1099511627776.B"
mem2tib: "memory = 2199023255552.B"
mem4tib: "memory = 4398046511104.B"
mem8tib: "memory = 8796093022208.B"
mem16tib: "memory = 17592186044416.B"
mem32tib: "memory = 35184372088832.B"
mem64tib: "memory = 70368744177664.B"
mem128tib: "memory = 140737488355328.B"
mem256tib: "memory = 281474976710656.B"
mem512tib: "memory = 562949953421312.B"
cpu1: "cpus = 1"
cpu2: "cpus = 2"
cpu5: "cpus = 5"
cpu10: "cpus = 10"
cpu20: "cpus = 20"
cpu50: "cpus = 50"
cpu100: "cpus = 100"
cpu200: "cpus = 200"
cpu500: "cpus = 500"
cpu1000: "cpus = 1000"
script:
- "includeConfig(\"nextflow_labels.config\")"
debug: false
container: "docker"
engines:
- type: "docker"
id: "docker"
image: "rocker/r2u:22.04"
target_registry: "images.viash-hub.com"
target_tag: "build_main"
namespace_separator: "/"
setup:
- type: "apt"
packages:
- "libhdf5-dev"
- "libgeos-dev"
interactive: false
- type: "r"
cran:
- "hdf5r"
- "SpatialExperiment"
github:
- "scverse/anndataR@36f3caad9a7f360165c1510bbe0c62657580415a"
bioc_force_install: false
warnings_as_errors: true
test_setup:
- type: "docker"
env:
- "RETICULATE_PYTHON=/usr/bin/python"
- type: "apt"
packages:
- "python3"
- "python3-pip"
- "python3-dev"
- "python-is-python3"
interactive: false
- type: "r"
cran:
- "reticulate"
- "testthat"
bioc_force_install: false
warnings_as_errors: true
- type: "python"
user: false
packages:
- "anndata~=0.11.1"
- "mudata~=0.3.1"
script:
- "exec(\"try:\\n import awkward\\nexcept ModuleNotFoundError:\\n exit(0)\\\
nelse: exit(1)\")"
upgrade: true
entrypoint: []
cmd: null
- type: "native"
id: "native"
build_info:
config: "src/convert/from_h5mu_to_spatialexperiment/config.vsh.yaml"
runner: "executable"
engine: "docker|native"
output: "target/executable/convert/from_h5mu_to_spatialexperiment"
executable: "target/executable/convert/from_h5mu_to_spatialexperiment/from_h5mu_to_spatialexperiment"
viash_version: "0.9.4"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"
version: "build_main"
info:
test_resources:
- type: "s3"
path: "s3://openpipelines-bio/openpipeline_spatial/resources_test"
dest: "resources_test"
repositories:
- type: "github"
name: "openpipeline"
repo: "openpipelines-bio/openpipeline"
tag: "2.1.2"
viash_version: "0.9.4"
source: "src"
target: "target"
config_mods:
- ".resources += {path: '/src/workflows/utils/labels.config', dest: 'nextflow_labels.config'}\n\
.runners[.type == 'nextflow'].config.script := 'includeConfig(\"nextflow_labels.config\"\
)'"
- ".engines += { type: \"native\" }"
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
- ".engines[.type == 'docker'].target_tag := 'build_main'"
organization: "vsh"
links:
repository: "https://github.com/openpipelines-bio/openpipeline_spatial"
docker_registry: "ghcr.io"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,68 @@
process {
// Default resources for components that hardly do any processing
memory = { 2.GB * task.attempt }
cpus = 1
// Retry for exit codes that have something to do with memory issues
errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' }
maxRetries = 3
maxMemory = null
// CPU resources
withLabel: singlecpu { cpus = 1 }
withLabel: lowcpu { cpus = 4 }
withLabel: midcpu { cpus = 10 }
withLabel: highcpu { cpus = 20 }
// Memory resources
withLabel: lowmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: midmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: highmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: veryhighmem { memory = { get_memory( 75.GB * task.attempt ) } }
// Disk space
// Nextflow apparently can't handle empty directives, i.e.
// withLabel: lowdisk {}
// so for that reason we have to add a dummy directive
withLabel: lowdisk {
dummyDirective = "dummyValue"
}
withLabel: middisk {
dummyDirective = "dummyValue"
}
withLabel: highdisk {
dummyDirective = "dummyValue"
}
withLabel: veryhighdisk {
dummyDirective = "dummyValue"
}
// NOTE: The above labels intentionally do not have an effect by default.
// The user should set the disk space requirements by adding the following
// to the compute environment:
//
// withLabel: lowdisk { disk = { 20.GB * task.attempt } }
// withLabel: middisk { disk = { 100.GB * task.attempt } }
// withLabel: highdisk { disk = { 200.GB * task.attempt } }
// withLabel: veryhighdisk { disk = { 500.GB * task.attempt } }
}
def get_memory(to_compare) {
if (!process.containsKey("maxMemory") || !process.maxMemory) {
return to_compare
}
try {
if (process.containsKey("maxRetries") && process.maxRetries && task.attempt == (process.maxRetries as int)) {
return process.maxMemory
}
else if (to_compare.compareTo(process.maxMemory as nextflow.util.MemoryUnit) == 1) {
return max_memory as nextflow.util.MemoryUnit
}
else {
return to_compare
}
} catch (all) {
println "Error processing memory resources. Please check that process.maxMemory '${process.maxMemory}' and process.maxRetries '${process.maxRetries}' are valid!"
System.exit(1)
}
}

View File

@@ -220,7 +220,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -459,9 +459,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-08-22T08:22:47Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:51Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -233,7 +233,7 @@ build_info:
output: "target/executable/convert/from_xenium_to_h5mu"
executable: "target/executable/convert/from_xenium_to_h5mu/from_xenium_to_h5mu"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -458,9 +458,9 @@ RUN pip install --upgrade pip && \
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component convert from_xenium_to_h5mu"
LABEL org.opencontainers.image.created="2025-08-22T08:22:47Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:51Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -314,7 +314,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -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-08-22T08:22:47Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:51Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -222,7 +222,7 @@ build_info:
output: "target/executable/convert/from_xenium_to_spatialexperiment"
executable: "target/executable/convert/from_xenium_to_spatialexperiment/from_xenium_to_spatialexperiment"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -457,9 +457,9 @@ RUN Rscript -e 'options(warn = 2); if (!requireNamespace("BiocManager", quietly
LABEL org.opencontainers.image.authors="Dorien Roosen"
LABEL org.opencontainers.image.description="Companion container for running component convert from_xenium_to_spatialexperiment"
LABEL org.opencontainers.image.created="2025-08-22T08:22:47Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:51Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -227,7 +227,7 @@ build_info:
output: "target/executable/filter/subset_cosmx"
executable: "target/executable/filter/subset_cosmx/subset_cosmx"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -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-08-22T08:22:46Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:50Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -426,7 +426,7 @@ build_info:
output: "target/executable/mapping/spaceranger_count"
executable: "target/executable/mapping/spaceranger_count/spaceranger_count"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -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-08-22T08:22:48Z"
LABEL org.opencontainers.image.created="2025-08-22T14:30:52Z"
LABEL org.opencontainers.image.source="https://github.com/openpipelines-bio/openpipeline_spatial"
LABEL org.opencontainers.image.revision="6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
LABEL org.opencontainers.image.revision="798a0cb2692eaac648662732a05bb48f951f36a0"
LABEL org.opencontainers.image.version="build_main"
VIASHDOCKER

View File

@@ -290,7 +290,7 @@ build_info:
output: "target/nextflow/convert/from_cells2stats_to_h5mu"
executable: "target/nextflow/convert/from_cells2stats_to_h5mu/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3382,7 +3382,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_cells2stats_to_h5mu",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -225,7 +225,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3331,7 +3331,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_cosmx_to_h5mu",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -232,7 +232,7 @@ build_info:
output: "target/nextflow/convert/from_cosmx_to_spatialexperiment"
executable: "target/nextflow/convert/from_cosmx_to_spatialexperiment/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3322,7 +3322,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_cosmx_to_spatialexperiment",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -0,0 +1,255 @@
name: "from_h5mu_to_spatialexperiment"
namespace: "convert"
version: "build_main"
authors:
- name: "Dorien Roosen"
roles:
- "author"
info:
role: "Core Team Member"
links:
email: "dorien@data-intuitive.com"
github: "dorien-er"
linkedin: "dorien-roosen"
organizations:
- name: "Data Intuitive"
href: "https://www.data-intuitive.com"
role: "Data Scientist"
argument_groups:
- name: "Arguments"
arguments:
- type: "file"
name: "--input"
alternatives:
- "-i"
description: "Input h5mu file"
info: null
example:
- "input.h5mu"
must_exist: true
create_parent: true
required: true
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--modality"
description: "Name of the modality to be converted."
info: null
default:
- "rna"
required: true
direction: "input"
multiple: false
multiple_sep: ";"
- type: "string"
name: "--obsm_spatial_coordinates"
description: "Key in the .obsm field that contains the spatial coordinates. \n\
Will be mapped to spatialCoords in the SpatialExperiment object.\n"
info: null
required: false
direction: "input"
multiple: false
multiple_sep: ";"
- type: "file"
name: "--output"
alternatives:
- "-o"
description: "Output SpatialExperiment file"
info: null
example:
- "output.rds"
must_exist: true
create_parent: true
required: true
direction: "output"
multiple: false
multiple_sep: ";"
resources:
- type: "r_script"
path: "script.R"
is_executable: true
- type: "file"
path: "nextflow_labels.config"
dest: "nextflow_labels.config"
description: "Converts an h5mu file into a SpatialExperiment object.\n"
test_resources:
- type: "r_script"
path: "test.R"
is_executable: true
- type: "file"
path: "aviti_teton_tiny.h5mu"
- type: "file"
path: "Lung5_Rep2_tiny.h5mu"
- type: "file"
path: "xenium_tiny.h5mu"
info: null
status: "enabled"
scope:
image: "public"
target: "public"
repositories:
- type: "github"
name: "openpipeline"
repo: "openpipelines-bio/openpipeline"
tag: "2.1.2"
links:
repository: "https://github.com/openpipelines-bio/openpipeline_spatial"
docker_registry: "ghcr.io"
runners:
- type: "executable"
id: "executable"
docker_setup_strategy: "ifneedbepullelsecachedbuild"
- type: "nextflow"
id: "nextflow"
directives:
label:
- "lowmem"
- "singlecpu"
tag: "$id"
auto:
simplifyInput: true
simplifyOutput: false
transcript: false
publish: false
config:
labels:
mem1gb: "memory = 1000000000.B"
mem2gb: "memory = 2000000000.B"
mem5gb: "memory = 5000000000.B"
mem10gb: "memory = 10000000000.B"
mem20gb: "memory = 20000000000.B"
mem50gb: "memory = 50000000000.B"
mem100gb: "memory = 100000000000.B"
mem200gb: "memory = 200000000000.B"
mem500gb: "memory = 500000000000.B"
mem1tb: "memory = 1000000000000.B"
mem2tb: "memory = 2000000000000.B"
mem5tb: "memory = 5000000000000.B"
mem10tb: "memory = 10000000000000.B"
mem20tb: "memory = 20000000000000.B"
mem50tb: "memory = 50000000000000.B"
mem100tb: "memory = 100000000000000.B"
mem200tb: "memory = 200000000000000.B"
mem500tb: "memory = 500000000000000.B"
mem1gib: "memory = 1073741824.B"
mem2gib: "memory = 2147483648.B"
mem4gib: "memory = 4294967296.B"
mem8gib: "memory = 8589934592.B"
mem16gib: "memory = 17179869184.B"
mem32gib: "memory = 34359738368.B"
mem64gib: "memory = 68719476736.B"
mem128gib: "memory = 137438953472.B"
mem256gib: "memory = 274877906944.B"
mem512gib: "memory = 549755813888.B"
mem1tib: "memory = 1099511627776.B"
mem2tib: "memory = 2199023255552.B"
mem4tib: "memory = 4398046511104.B"
mem8tib: "memory = 8796093022208.B"
mem16tib: "memory = 17592186044416.B"
mem32tib: "memory = 35184372088832.B"
mem64tib: "memory = 70368744177664.B"
mem128tib: "memory = 140737488355328.B"
mem256tib: "memory = 281474976710656.B"
mem512tib: "memory = 562949953421312.B"
cpu1: "cpus = 1"
cpu2: "cpus = 2"
cpu5: "cpus = 5"
cpu10: "cpus = 10"
cpu20: "cpus = 20"
cpu50: "cpus = 50"
cpu100: "cpus = 100"
cpu200: "cpus = 200"
cpu500: "cpus = 500"
cpu1000: "cpus = 1000"
script:
- "includeConfig(\"nextflow_labels.config\")"
debug: false
container: "docker"
engines:
- type: "docker"
id: "docker"
image: "rocker/r2u:22.04"
target_registry: "images.viash-hub.com"
target_tag: "build_main"
namespace_separator: "/"
setup:
- type: "apt"
packages:
- "libhdf5-dev"
- "libgeos-dev"
interactive: false
- type: "r"
cran:
- "hdf5r"
- "SpatialExperiment"
github:
- "scverse/anndataR@36f3caad9a7f360165c1510bbe0c62657580415a"
bioc_force_install: false
warnings_as_errors: true
test_setup:
- type: "docker"
env:
- "RETICULATE_PYTHON=/usr/bin/python"
- type: "apt"
packages:
- "python3"
- "python3-pip"
- "python3-dev"
- "python-is-python3"
interactive: false
- type: "r"
cran:
- "reticulate"
- "testthat"
bioc_force_install: false
warnings_as_errors: true
- type: "python"
user: false
packages:
- "anndata~=0.11.1"
- "mudata~=0.3.1"
script:
- "exec(\"try:\\n import awkward\\nexcept ModuleNotFoundError:\\n exit(0)\\\
nelse: exit(1)\")"
upgrade: true
entrypoint: []
cmd: null
- type: "native"
id: "native"
build_info:
config: "src/convert/from_h5mu_to_spatialexperiment/config.vsh.yaml"
runner: "nextflow"
engine: "docker|native"
output: "target/nextflow/convert/from_h5mu_to_spatialexperiment"
executable: "target/nextflow/convert/from_h5mu_to_spatialexperiment/main.nf"
viash_version: "0.9.4"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"
version: "build_main"
info:
test_resources:
- type: "s3"
path: "s3://openpipelines-bio/openpipeline_spatial/resources_test"
dest: "resources_test"
repositories:
- type: "github"
name: "openpipeline"
repo: "openpipelines-bio/openpipeline"
tag: "2.1.2"
viash_version: "0.9.4"
source: "src"
target: "target"
config_mods:
- ".resources += {path: '/src/workflows/utils/labels.config', dest: 'nextflow_labels.config'}\n\
.runners[.type == 'nextflow'].config.script := 'includeConfig(\"nextflow_labels.config\"\
)'"
- ".engines += { type: \"native\" }"
- ".engines[.type == 'docker'].target_registry := 'images.viash-hub.com'"
- ".engines[.type == 'docker'].target_tag := 'build_main'"
organization: "vsh"
links:
repository: "https://github.com/openpipelines-bio/openpipeline_spatial"
docker_registry: "ghcr.io"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,126 @@
manifest {
name = 'convert/from_h5mu_to_spatialexperiment'
mainScript = 'main.nf'
nextflowVersion = '!>=20.12.1-edge'
version = 'build_main'
description = 'Converts an h5mu file into a SpatialExperiment object.\n'
author = 'Dorien Roosen'
}
process.container = 'nextflow/bash:latest'
// detect tempdir
tempDir = java.nio.file.Paths.get(
System.getenv('NXF_TEMP') ?:
System.getenv('VIASH_TEMP') ?:
System.getenv('TEMPDIR') ?:
System.getenv('TMPDIR') ?:
'/tmp'
).toAbsolutePath()
profiles {
no_publish {
process {
withName: '.*' {
publishDir = [
enabled: false
]
}
}
}
mount_temp {
docker.temp = tempDir
podman.temp = tempDir
charliecloud.temp = tempDir
}
docker {
docker.enabled = true
// docker.userEmulation = true
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
singularity {
singularity.enabled = true
singularity.autoMounts = true
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
podman {
podman.enabled = true
docker.enabled = false
singularity.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
shifter {
shifter.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
charliecloud.enabled = false
}
charliecloud {
charliecloud.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
}
}
process{
withLabel: mem1gb { memory = 1000000000.B }
withLabel: mem2gb { memory = 2000000000.B }
withLabel: mem5gb { memory = 5000000000.B }
withLabel: mem10gb { memory = 10000000000.B }
withLabel: mem20gb { memory = 20000000000.B }
withLabel: mem50gb { memory = 50000000000.B }
withLabel: mem100gb { memory = 100000000000.B }
withLabel: mem200gb { memory = 200000000000.B }
withLabel: mem500gb { memory = 500000000000.B }
withLabel: mem1tb { memory = 1000000000000.B }
withLabel: mem2tb { memory = 2000000000000.B }
withLabel: mem5tb { memory = 5000000000000.B }
withLabel: mem10tb { memory = 10000000000000.B }
withLabel: mem20tb { memory = 20000000000000.B }
withLabel: mem50tb { memory = 50000000000000.B }
withLabel: mem100tb { memory = 100000000000000.B }
withLabel: mem200tb { memory = 200000000000000.B }
withLabel: mem500tb { memory = 500000000000000.B }
withLabel: mem1gib { memory = 1073741824.B }
withLabel: mem2gib { memory = 2147483648.B }
withLabel: mem4gib { memory = 4294967296.B }
withLabel: mem8gib { memory = 8589934592.B }
withLabel: mem16gib { memory = 17179869184.B }
withLabel: mem32gib { memory = 34359738368.B }
withLabel: mem64gib { memory = 68719476736.B }
withLabel: mem128gib { memory = 137438953472.B }
withLabel: mem256gib { memory = 274877906944.B }
withLabel: mem512gib { memory = 549755813888.B }
withLabel: mem1tib { memory = 1099511627776.B }
withLabel: mem2tib { memory = 2199023255552.B }
withLabel: mem4tib { memory = 4398046511104.B }
withLabel: mem8tib { memory = 8796093022208.B }
withLabel: mem16tib { memory = 17592186044416.B }
withLabel: mem32tib { memory = 35184372088832.B }
withLabel: mem64tib { memory = 70368744177664.B }
withLabel: mem128tib { memory = 140737488355328.B }
withLabel: mem256tib { memory = 281474976710656.B }
withLabel: mem512tib { memory = 562949953421312.B }
withLabel: cpu1 { cpus = 1 }
withLabel: cpu2 { cpus = 2 }
withLabel: cpu5 { cpus = 5 }
withLabel: cpu10 { cpus = 10 }
withLabel: cpu20 { cpus = 20 }
withLabel: cpu50 { cpus = 50 }
withLabel: cpu100 { cpus = 100 }
withLabel: cpu200 { cpus = 200 }
withLabel: cpu500 { cpus = 500 }
withLabel: cpu1000 { cpus = 1000 }
}
includeConfig("nextflow_labels.config")

View File

@@ -0,0 +1,68 @@
process {
// Default resources for components that hardly do any processing
memory = { 2.GB * task.attempt }
cpus = 1
// Retry for exit codes that have something to do with memory issues
errorStrategy = { task.exitStatus in 137..140 ? 'retry' : 'terminate' }
maxRetries = 3
maxMemory = null
// CPU resources
withLabel: singlecpu { cpus = 1 }
withLabel: lowcpu { cpus = 4 }
withLabel: midcpu { cpus = 10 }
withLabel: highcpu { cpus = 20 }
// Memory resources
withLabel: lowmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: midmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: highmem { memory = { get_memory( 50.GB * task.attempt ) } }
withLabel: veryhighmem { memory = { get_memory( 75.GB * task.attempt ) } }
// Disk space
// Nextflow apparently can't handle empty directives, i.e.
// withLabel: lowdisk {}
// so for that reason we have to add a dummy directive
withLabel: lowdisk {
dummyDirective = "dummyValue"
}
withLabel: middisk {
dummyDirective = "dummyValue"
}
withLabel: highdisk {
dummyDirective = "dummyValue"
}
withLabel: veryhighdisk {
dummyDirective = "dummyValue"
}
// NOTE: The above labels intentionally do not have an effect by default.
// The user should set the disk space requirements by adding the following
// to the compute environment:
//
// withLabel: lowdisk { disk = { 20.GB * task.attempt } }
// withLabel: middisk { disk = { 100.GB * task.attempt } }
// withLabel: highdisk { disk = { 200.GB * task.attempt } }
// withLabel: veryhighdisk { disk = { 500.GB * task.attempt } }
}
def get_memory(to_compare) {
if (!process.containsKey("maxMemory") || !process.maxMemory) {
return to_compare
}
try {
if (process.containsKey("maxRetries") && process.maxRetries && task.attempt == (process.maxRetries as int)) {
return process.maxMemory
}
else if (to_compare.compareTo(process.maxMemory as nextflow.util.MemoryUnit) == 1) {
return max_memory as nextflow.util.MemoryUnit
}
else {
return to_compare
}
} catch (all) {
println "Error processing memory resources. Please check that process.maxMemory '${process.maxMemory}' and process.maxRetries '${process.maxRetries}' are valid!"
System.exit(1)
}
}

View File

@@ -0,0 +1,60 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "from_h5mu_to_spatialexperiment",
"description": "Converts an h5mu file into a SpatialExperiment object.\n",
"type": "object",
"$defs": {
"arguments": {
"title": "Arguments",
"type": "object",
"description": "No description",
"properties": {
"input": {
"type": "string",
"format": "path",
"exists": true,
"description": "Input h5mu file",
"help_text": "Type: `file`, multiple: `False`, required, direction: `input`, example: `\"input.h5mu\"`. "
},
"modality": {
"type": "string",
"description": "Name of the modality to be converted.",
"help_text": "Type: `string`, multiple: `False`, required, default: `\"rna\"`. ",
"default": "rna"
},
"obsm_spatial_coordinates": {
"type": "string",
"description": "Key in the .obsm field that contains the spatial coordinates",
"help_text": "Type: `string`, multiple: `False`. "
},
"output": {
"type": "string",
"format": "path",
"description": "Output SpatialExperiment file",
"help_text": "Type: `file`, multiple: `False`, required, default: `\"$id.$key.output.rds\"`, direction: `output`, example: `\"output.rds\"`. ",
"default": "$id.$key.output.rds"
}
}
},
"nextflow input-output arguments": {
"title": "Nextflow input-output arguments",
"type": "object",
"description": "Input/output parameters for Nextflow itself. Please note that both publishDir and publish_dir are supported but at least one has to be configured.",
"properties": {
"publish_dir": {
"type": "string",
"description": "Path to an output directory.",
"help_text": "Type: `string`, multiple: `False`, required, example: `\"output/\"`. "
}
}
}
},
"allOf": [
{
"$ref": "#/$defs/arguments"
},
{
"$ref": "#/$defs/nextflow input-output arguments"
}
]
}

View File

@@ -220,7 +220,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3330,7 +3330,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_spatialdata_to_h5mu",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -233,7 +233,7 @@ build_info:
output: "target/nextflow/convert/from_xenium_to_h5mu"
executable: "target/nextflow/convert/from_xenium_to_h5mu/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3331,7 +3331,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_xenium_to_h5mu",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -314,7 +314,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.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3425,7 +3425,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_xenium_to_spatialdata",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -222,7 +222,7 @@ build_info:
output: "target/nextflow/convert/from_xenium_to_spatialexperiment"
executable: "target/nextflow/convert/from_xenium_to_spatialexperiment/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3311,7 +3311,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/convert/from_xenium_to_spatialexperiment",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -227,7 +227,7 @@ build_info:
output: "target/nextflow/filter/subset_cosmx"
executable: "target/nextflow/filter/subset_cosmx/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3333,7 +3333,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/filter/subset_cosmx",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -426,7 +426,7 @@ build_info:
output: "target/nextflow/mapping/spaceranger_count"
executable: "target/nextflow/mapping/spaceranger_count/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
package_config:
name: "openpipeline_spatial"

View File

@@ -3548,7 +3548,7 @@ meta = [
"engine" : "docker|native",
"output" : "/workdir/root/repo/target/nextflow/mapping/spaceranger_count",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -644,7 +644,7 @@ build_info:
output: "target/nextflow/workflows/multiomics/spatial_process_samples"
executable: "target/nextflow/workflows/multiomics/spatial_process_samples/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
dependencies:
- "target/dependencies/github/openpipelines-bio/openpipeline/disable-scrublet_build/nextflow/workflows/multiomics/process_samples"

View File

@@ -3813,7 +3813,7 @@ meta = [
"engine" : "native",
"output" : "/workdir/root/repo/target/nextflow/workflows/multiomics/spatial_process_samples",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {

View File

@@ -387,7 +387,7 @@ build_info:
output: "target/nextflow/workflows/qc/spatial_qc"
executable: "target/nextflow/workflows/qc/spatial_qc/main.nf"
viash_version: "0.9.4"
git_commit: "6f308e6a3cca52f1283fbba734a3cdc858e18e1b"
git_commit: "798a0cb2692eaac648662732a05bb48f951f36a0"
git_remote: "https://github.com/openpipelines-bio/openpipeline_spatial"
dependencies:
- "target/dependencies/github/openpipelines-bio/openpipeline/2.1.2/nextflow/workflows/qc/qc"

View File

@@ -3505,7 +3505,7 @@ meta = [
"engine" : "native",
"output" : "/workdir/root/repo/target/nextflow/workflows/qc/spatial_qc",
"viash_version" : "0.9.4",
"git_commit" : "6f308e6a3cca52f1283fbba734a3cdc858e18e1b",
"git_commit" : "798a0cb2692eaac648662732a05bb48f951f36a0",
"git_remote" : "https://github.com/openpipelines-bio/openpipeline_spatial"
},
"package_config" : {