-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy path02d-simulate_dyntoy_datasets.R
38 lines (30 loc) · 1.08 KB
/
02d-simulate_dyntoy_datasets.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#' [dyntoy](https://github.com/dynverse/dyntoy), simulations of toy data using random expression gradients in a reduced space
library(dynbenchmark)
library(dyntoy)
library(tidyverse)
library(qsub)
experiment("01-datasets/02-synthetic")
# remove all datasets
# rm_remote(dataset_file(id = "synthetic/dyntoy", remote = TRUE), remote = TRUE, recursive = TRUE)
# generate design
set.seed(1)
design <- crossing(
topology_model = names(dyntoy::topology_models),
tibble(platform = select_platforms(10)) %>% mutate(platform_ix = row_number())
) %>%
mutate(
dataset_id = paste0("synthetic/dyntoy/", topology_model, "_", platform_ix),
seed = sample(1:100000, n())
) %>%
select(-platform_ix)
write_rds(design, result_file("design_dyntoy.rds"))
# simulate datasets
qsub_config <- override_qsub_config(memory = "10G", max_wall_time = "24:00:00", num_cores = 1, name = "dyntoy", wait = F, stop_on_error = FALSE)
handle <- qsub_pmap(
design,
simulate_dyntoy,
qsub_config = qsub_config
)
write_rds(handle, "handle_dyntoy.rds")
handle <- read_rds("handle_dyntoy.rds")
qsub::qsub_retrieve(handle)