This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Writing and loading expression sets to and from csv files.

One can write an expression set into a csv file using csv.write. For example, using the standard bladderbatch bioconductor package the following code writes a csv file to the current working drectory:

library("bladderbatch")
data("bladderdata")
write.csv(bladderEset, "bladderEset.csv")

Is there a tool which can read the produced csv file back into R as an expressionSet?

If not, is there a eset ↔ csv serialiser/deserialiser, which can both output esets as csv files and read csv files as esets?

The reason I'm asking is because I need to interact with esets with python and java code, and I can easily work with "csv" files, but not with ".rda", ".CEL" or other binary files.

bioconductor r microarray

1 answer

To read it back in, use read.csv("bladderEset.csv").

To convert to an eset object, use the ExpressionSet package and function, and supply your data-matrix as the assayData parameter. You can also set the phenotype data.

Further reading: https://www.rdocumentation.org/packages/Biobase/versions/2.32.0/topics/ExpressionSet

Log in to answer this question.