File tree Expand file tree Collapse file tree
src/methods_normalization/spanorm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,11 @@ engines:
1818 - type : docker
1919 image : openproblems/base_r:1
2020 setup :
21+ # - type: docker
22+ # run: |
23+ # apt-get update && apt-get install -y wget
2124 - type : r
22- bioc : [SpaNorm, zellkonverter ]
25+ bioc : [SpaNorm, anndataR, rhdf5 ]
2326 # - type: r
2427 # bioc: [SummarizedExperiment,SingleCellExperiment,SpatialExperiment]
2528 # bioc_force_install: true
Original file line number Diff line number Diff line change 11library(SpaNorm )
22library(SingleCellExperiment )
33library(SpatialExperiment )
4- library(zellkonverter )
4+ library(anndataR )
55
66# # VIASH START
77par <- list (
@@ -11,7 +11,7 @@ par <- list(
1111# # VIASH END
1212
1313# Read the input h5ad file and convert to SingleCellExperiment
14- sce <- readH5AD (par $ input_spatial_aggregated_counts )
14+ sce <- read_h5ad (par $ input_spatial_aggregated_counts , as = " SingleCellExperiment " )
1515# Convert to SpatialExperiment for SpaNorm
1616sce <- as(sce , " SpatialExperiment" )
1717
@@ -52,4 +52,5 @@ final_sce <- SingleCellExperiment(
5252assay(final_sce , " normalized" ) <- normalized_matrix
5353
5454# Write the final object to h5ad format
55- zellkonverter :: writeH5AD(final_sce , par $ output )
55+ dir.create(dirname(par $ output ), showWarnings = FALSE , recursive = TRUE )
56+ write_h5ad(final_sce , par $ output )
You can’t perform that action at this time.
0 commit comments