Reads a CSV or TSV file, chosen by extension, with every column as
character, and checks that the columns apply_corrections() needs are
present. An empty value or NA in the file becomes NA.
Value
A tibble with character columns level, id, column, value,
and reason, plus any other column in the file.
Examples
path <- tempfile(fileext = ".csv")
writeLines(
c(
"level,id,column,value,reason",
"subject,R1,genotype,KO,genotyping rerun",
"sample,R2_T,fastq,r2_tumor.fq.gz,vendor renamed the file"
),
path
)
read_corrections(path)
#> # A tibble: 2 × 5
#> level id column value reason
#> <chr> <chr> <chr> <chr> <chr>
#> 1 subject R1 genotype KO genotyping rerun
#> 2 sample R2_T fastq r2_tumor.fq.gz vendor renamed the file
unlink(path)