Writing and loading expression sets to and from csv files.
1
0
Entering edit mode
3.7 years ago
popantrop ▴ 50

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 • 2.4k views
ADD COMMENT
0
Entering edit mode
3.7 years ago

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

ADD COMMENT

Login before adding your answer.

Traffic: 2382 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6