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().
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.
Arguments
odir(
character(1))
Directory path to output tidy files.format(
character(1))
Format of output files.id(
character(1))
ID to use for the dataset (e.g.wfrid.123,prid.456).dbconn(
DBIConnection)
Database connection object (seeDBI::dbConnect).
Method nemofy()
Parse, filter, tidy and write files.
Usage
Workflow$nemofy(
odir = ".",
format = "tsv",
id = NULL,
dbconn = NULL,
include = NULL,
exclude = NULL
)Arguments
odir(
character(1))
Directory path to output tidy files.format(
character(1))
Format of output files.id(
character(1))
ID to use for the dataset (e.g.wfrid.123,prid.456).dbconn(
DBIConnection)
Database connection object (seeDBI::dbConnect).include(
character(n))
Files to include.exclude(
character(n))
Files to exclude.
Examples
path <- system.file("extdata/tool1", package = "nemo")
tools <- list(tool1 = Tool1)
wf1 <- Workflow$new(name = "foo", path = path, tools = tools)
odir <- tempdir()
wf1$list_files()
#> # A tibble: 4 × 10
#> tool_parser parser bname size lastmodified path pattern prefix
#> <glue> <chr> <chr> <fs:> <dttm> <chr> <chr> <glue>
#> 1 tool1_table1 table1 sampleA.to… 113 2025-09-07 13:03:45 /hom… "\\.to… sampl…
#> 2 tool1_table1 table1 sampleA.to… 153 2025-09-07 13:03:45 /hom… "\\.to… sampl…
#> 3 tool1_table2 table2 sampleA.to… 70 2025-09-07 13:03:45 /hom… "\\.to… sampl…
#> 4 tool1_table3 table3 sampleA.to… 83 2025-09-07 13:03:45 /hom… "\\.to… sampl…
#> # ℹ 2 more variables: schema <list>, group <glue>
wf1$nemofy(odir = odir, format = "parquet", id = "run1")
#> # A tibble: 4 × 9
#> tool_parser parser prefix tidy_name tidy_data tbl_name fpfix dbtab out
#> <glue> <chr> <glue> <chr> <list> <glue> <glu> <list> <list>
#> 1 tool1_table1 table1 sampleA table1 <tibble> tool1_t… /tmp… <NULL> <tibble>
#> 2 tool1_table1 table1 sample… table1 <tibble> tool1_t… /tmp… <NULL> <tibble>
#> 3 tool1_table2 table2 sampleA table2 <tibble> tool1_t… /tmp… <NULL> <tibble>
#> 4 tool1_table3 table3 sampleA table3 <tibble> tool1_t… /tmp… <NULL> <tibble>
(lf <- list.files(odir, 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)
