A Workflow is composed of multiple Tools.
Public fields
name(
character(1))
Name of workflow.path(
character(n))
Path(s) to workflow results.tools(
list(n))
List of Tools that compose a Workflow.files_tbl(
tibble(n))
Tibble of files fromlist_files_dir().written_files(
tibble(n))
Tibble of files written fromself$write().
Methods
Method new()
Create a new Workflow object.
Usage
Workflow$new(name = NULL, path = NULL, tools = NULL)Method list_files()
List files in given workflow directory.
Usage
Workflow$list_files(type = c("file", "symlink"))Arguments
type(
character(1))
File types(s) to return (e.g. any, file, directory, symlink). Seefs::dir_info.
Method tidy()
Tidy Workflow files.
Method write()
Write tidy tibbles.
Usage
Workflow$write(
diro = ".",
format = "tsv",
input_id = NULL,
output_id = ulid::ulid(),
dbconn = NULL
)Arguments
diro(
character(1))
Directory path to output tidy files.format(
character(1))
Format of output.input_id(
character(1))
Input ID to use for the dataset (e.g.run123).output_id(
character(1))
Output ID to use for the dataset (e.g.run123).dbconn(
DBIConnection)
Database connection object (seeDBI::dbConnect).
Method nemofy()
Parse, filter, tidy and write files.
Usage
Workflow$nemofy(
diro = ".",
format = "tsv",
input_id = NULL,
output_id = ulid::ulid(),
dbconn = NULL,
include = NULL,
exclude = NULL
)Arguments
diro(
character(1))
Directory path to output tidy files.format(
character(1))
Format of output.input_id(
character(1))
Input ID to use for the dataset (e.g.run123).output_id(
character(1))
Output ID to use for the dataset (e.g.run123).dbconn(
DBIConnection)
Database connection object (seeDBI::dbConnect).include(
character(n))
Files to include.exclude(
character(n))
Files to exclude.
Method get_metadata()
Get metadata
Usage
Workflow$get_metadata(input_id, output_id, output_dir, pkgs = c("nemo"))Examples
path <- system.file("extdata/tool1", package = "nemo")
tools <- list(tool1 = Tool1)
wf1 <- Workflow$new(name = "foo", path = path, tools = tools)
diro <- tempdir()
wf1$list_files()
#> # A tibble: 4 × 9
#> tool_parser parser bname size lastmodified path pattern prefix group
#> <glue> <chr> <chr> <fs:> <dttm> <chr> <chr> <glue> <glu>
#> 1 tool1_table1 table1 samp… 113 2026-02-08 23:24:37 /hom… "\\.to… sampl…
#> 2 tool1_table1 table1 samp… 153 2026-02-08 23:24:37 /hom… "\\.to… sampl… _2
#> 3 tool1_table2 table2 samp… 70 2026-02-08 23:24:37 /hom… "\\.to… sampl…
#> 4 tool1_table3 table3 samp… 83 2026-02-08 23:24:37 /hom… "\\.to… sampl…
wf1$nemofy(diro = diro, format = "parquet", input_id = "run1")
(lf <- list.files(diro, pattern = "tool1.*parquet", full.names = FALSE))
#> [1] "sampleA_2_tool1_table1.parquet" "sampleA_tool1_table1.parquet"
#> [3] "sampleA_tool1_table2.parquet" "sampleA_tool1_table3.parquet"
#dbconn <- DBI::dbConnect(drv = RPostgres::Postgres(), dbname = "nemo", user = "orcabus")
#wf1$nemofy(format = "db", id = "runABC", dbconn = dbconn)
