R/estimateLCMinfiEwasWater.R
writePhenoLCMinfiEwasWater.RdWrite the merged phenotype plus cell-composition table
writePhenoLCMinfiEwasWater(
lcData,
file,
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_writePhenoLCMinfiEwasWater.txt"
)Object returned by estimateLCMinfiEwasWater().
Character. Path to the CSV file to write.
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.
Invisibly returns file.
ref_file <- system.file("extdata", "saliva.txt", package = "dnaEPICO")
beta <- as.matrix(utils::read.table(ref_file))[1:20, , drop = FALSE]
colnames(beta) <- c("sample1", "sample2")
targets <- data.frame(
Sample_Name = colnames(beta),
Timepoint = c("T1", "T2"),
stringsAsFactors = FALSE
)
lc_data <- estimateLCMinfiEwasWater(
beta = beta,
targets = targets,
lcRef = "saliva",
phenoOrder = "Sample_Name;Timepoint"
)
output_file <- file.path(tempdir(), "phenoLC.csv")
writePhenoLCMinfiEwasWater(lcData = lc_data, file = output_file)
file.exists(output_file)
#> [1] TRUE