Write the SVA matrix, phenotype, and model-summary outputs.
writeSvaEnmixOutputs(
svaData,
mergedPheno,
analysisData = NULL,
phenoFile = NULL,
SampleID = "Sample_Name",
sepType = 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. Existing phenotype file replaced with
mergedPheno after validation.
Character. Phenotype column containing sample identifiers.
Character or NULL. Field separator used by phenoFile.
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()
pheno_file <- file.path(temp_dir, "phenoLC.csv")
utils::write.csv(ex$targets, pheno_file, row.names = FALSE)
output_paths <- writeSvaEnmixOutputs(
svaData = list(sva = ex$sva),
mergedPheno = ex$mergedPheno,
analysisData = ex$analysisData,
phenoFile = pheno_file,
SampleID = "Sample_Name",
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"