Write the legacy CSV, .RData, and text-summary outputs used by the original
svaEnmix() workflow.
writeSvaEnmixOutputs(
svaData,
mergedPheno,
analysisData = NULL,
phenoFile = NULL,
dataBaseDir = "data",
rBaseDir = "rData",
scriptLabel = "svaEnmix",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_writeSvaEnmixOutputs.txt"
)Object returned by estimateSvaEnmixControls().
Phenotype data frame returned by mergeSvaTargetsEnmix().
Optional object returned by analyzeSvaEnmix().
Character or NULL. When supplied, mergedPheno is written
back to this path for legacy compatibility.
Character. Base directory used for saved data outputs.
Character. Base directory used for saved .RData outputs.
Character. Label used to create the output subdirectory.
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class "dnaEPICO_svaEnmix_paths" containing the paths
written to disk.
ex <- dnaEPICO:::exampleSvaAnalysisStateDnaEpico()
temp_dir <- tempdir()
output_paths <- writeSvaEnmixOutputs(
svaData = list(sva = ex$sva),
mergedPheno = ex$mergedPheno,
analysisData = ex$analysisData,
phenoFile = file.path(temp_dir, "phenoLC.csv"),
dataBaseDir = file.path(temp_dir, "data"),
rBaseDir = file.path(temp_dir, "rData"),
scriptLabel = "svaEnmixExample",
verbose = FALSE,
logs = FALSE
)
names(output_paths)
#> [1] "svaRData" "svaCSV" "phenoWithSva" "dataDir" "rDir"