Skip to contents

Scaffolds a schema tibble from a raw file. The tidy column is a best-effort snake_case conversion — edit the YAML after writing.

Usage

config_prep_raw_schema(path, v = "latest", ...)

Arguments

path

(character(1))
File path.

v

(character(1))
Version string to assign to all columns (default "latest").

...

Passed on to readr::read_delim.

Value

A tibble with columns raw, tidy, type, description, and versions (list-col of list(v)).

Examples

path <- system.file("extdata", "tool1/latest/sampleA.tool1.table1.tsv", package = "nemo")
(x <- config_prep_raw_schema(path = path, delim = "\t"))
#> # A tibble: 6 × 5
#>   raw        tidy       type  description versions  
#>   <chr>      <chr>      <chr> <chr>       <list>    
#> 1 SampleID   sample_id  char  ""          <list [1]>
#> 2 Chromosome chromosome char  ""          <list [1]>
#> 3 Start      start      float ""          <list [1]>
#> 4 End        end        float ""          <list [1]>
#> 5 metricY    metric_y   float ""          <list [1]>
#> 6 metricZ    metric_z   float ""          <list [1]>