Skip to contents

Discovers and tidies files under input_dir for the given workflow, writing results to output_dir in the requested format.

Usage

cli_nemo_tidy(
  workflow,
  input_dir,
  output_dir,
  out_format,
  input_id = NULL,
  output_id = NULL,
  prefix_include = FALSE,
  dbdrv = NULL,
  dbname = NULL,
  dbuser = NULL,
  dbhost = NULL,
  dbport = NULL,
  include = NULL,
  exclude = NULL
)

Arguments

workflow

(character(1))
Workflow name passed to nemoverse_wf_dispatch().

input_dir

(character(1))
Input directory to search.

output_dir

(character(1) or NULL)
Output directory. Required unless out_format is "db".

out_format

(character(1))
Output format. One of "parquet", "tsv", "csv", "rds", or "db".

input_id

(character(1) or NULL)
Input run identifier.

output_id

(character(1) or NULL)
Output run identifier.

prefix_include

(logical(1))
If TRUE, prepend an input_prefix column to each tidy table.

dbdrv

(DBIDriver or NULL)
DBI driver object (e.g. RPostgres::Postgres()). Required when out_format is "db".

dbname

(character(1) or NULL)
Database name. Required when out_format is "db".

dbuser

(character(1) or NULL)
Database user. Required when out_format is "db".

dbhost

(character(1) or NULL)
Database host. NULL leaves it to the driver default (e.g. the PGHOST env var for RPostgres).

dbport

(integer(1) or NULL)
Database port. NULL leaves it to the driver default (e.g. the PGPORT env var for RPostgres). Password is never taken as an argument: use the driver's env var or password file (e.g. PGPASSWORD, ~/.pgpass).

include

(character(n) or NULL)
Tool parser names to include. NULL includes all.

exclude

(character(n) or NULL)
Tool parser names to exclude. NULL excludes none.

Examples

path <- system.file("extdata/tool1", package = "nemo")
out <- tempfile()
res <- cli_nemo_tidy(
  workflow = "workflow1", input_dir = path, output_dir = out,
  out_format = "parquet", input_id = "run1"
)
#> [2026-11-09T07:12:38UTC] nemo INFO: Tidying dir: /home/runner/miniconda3/envs/pkgdown_env/lib/R/library/nemo/extdata/tool1
#> [2026-11-09T07:12:39UTC] nemo INFO: Tidy results written to dir: /tmp/RtmpRY5ahT/file1233381817f3