Skip to content

Commit f4bff8d

Browse files
committed
Fixed rPCA
1 parent b1592c4 commit f4bff8d

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/methods/rpca_to_goal/config.vsh.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ resources:
6464
# The script of your component (required)
6565
- type: r_script
6666
path: script.R
67+
- type: r_script
68+
path: /src/utils/helper_functions.R
6769

6870
engines:
6971
# Specifications for the Docker image for this component.

src/methods/rpca_to_goal/script.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ meta <- list(
1515

1616
options(future.globals.maxSize = 25 * 1024^3) # 25 GiB
1717

18+
source(paste0(meta$resources_dir, "/helper_functions.R"))
19+
1820
cat("Reading input files\n")
19-
input_adata <- anndata::read_h5ad(par[["input"]])
20-
21+
input_adata <- anndata::read_h5ad(par[["input"]]) |>
22+
subset_nocontrols()
23+
2124
cat("Preparing input Anndata\n")
2225
input_adata$obs$batch <- as.factor(input_adata$obs$batch)
2326

src/methods/rpca_to_mid/config.vsh.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ resources:
6868
# The script of your component (required)
6969
- type: r_script
7070
path: script.R
71-
71+
- type: r_script
72+
path: /src/utils/helper_functions.R
7273
engines:
7374
# Specifications for the Docker image for this component.
7475
- type: docker

src/methods/rpca_to_mid/script.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ meta <- list(
1515

1616
options(future.globals.maxSize = 25 * 1024^3) # 25 GiB
1717

18-
18+
source(paste0(meta$resources_dir, "/helper_functions.R"))
19+
1920
cat("Reading input files\n")
20-
input_adata <- anndata::read_h5ad(par[["input"]])
21+
input_adata <- anndata::read_h5ad(par[["input"]]) |>
22+
subset_nocontrols()
2123

2224
cat("Preparing input Anndata\n")
2325
input_adata$obs$batch <- as.factor(input_adata$obs$batch)

0 commit comments

Comments
 (0)