This function converts a gene expression dataset to a GCT format file.
Examples
# Create a sample input data frame
sample_data <- data.frame(
Gene = c("BRCA1", "TP53", "EGFR"),
Sample1 = c(10, 15, 8),
Sample2 = c(12, 18, 7),
stringsAsFactors = FALSE
)
rownames(sample_data) <- sample_data$Gene
sample_data <- sample_data[, -1]
# Convert the input data frame to GCT format and save to temporary file
output_file <- tempfile(fileext = ".gct")
outputGCT(sample_data, output_file)