Reads gene expression data from a tab-delimited text file, using the first column as row names. Converts data into a numeric matrix for analysis.
Examples
tf <- tempfile(fileext = ".tsv")
expr <- data.frame(
gene = c("GeneA", "GeneB", "GeneC"),
Sample1 = c(10, 20, 30),
Sample2 = c(15, 25, 35)
)
write.table(expr, tf, sep = "\t", row.names = FALSE, quote = FALSE)
gene_expression_data <- ParseInputExpression(tf)
print(gene_expression_data)
#> Sample1 Sample2
#> GeneA 10 15
#> GeneB 20 25
#> GeneC 30 35