Is there a way to save and open an expression set?
1
0
Entering edit mode
salamandra ▴ 20
@salamandra-12825
Last seen 2.8 years ago
Portugal

I know we can save phenotype, feature and expression data of a expression set separately in a text files. I want to know if it's possible to save the expression set into a folder and then open it later for other applications?

biobase • 2.0k views
ADD COMMENT
3
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 1 day ago
Republic of Ireland

You could just save it as an RDS object. Here is an entirely reproducible example:

Download a GEO study

library(Biobase)
library(GEOquery)
gset <- getGEO("GSE89231", GSEMatrix =TRUE, getGPL=FALSE)
if (length(gset) > 1) idx <- grep("GPL570", attr(gset, "names")) else idx <- 1
gset <- gset[[idx]]

gset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 54675 features, 49 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: GSM2361446 GSM2361447 ... GSM2361494 (49 total)
  varLabels: title geo_accession ... cell line:ch1 (35 total)
  varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
Annotation: GPL570

Save the ExpressionSet object to an RDS file and remove the object from the workspace

saveRDS(gset, 'MyExpressionSet.Rds')
rm(gset)
gset
Erro: objeto 'gset' não encontrado

Read it back in

gset <- readRDS('MyExpressionSet.Rds')
gset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 54675 features, 49 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: GSM2361446 GSM2361447 ... GSM2361494 (49 total)
  varLabels: title geo_accession ... cell line:ch1 (35 total)
  varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
Annotation: GPL570
ADD COMMENT
0
Entering edit mode

R português? Isso é legítimo

ADD REPLY
0
Entering edit mode

Yep! / Sim! Works pretty well

R

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R é um software livre e vem sem GARANTIA ALGUMA.
Você pode redistribuí-lo sob certas circunstâncias.
Digite 'license()' ou 'licence()' para detalhes de distribuição.

R é um projeto colaborativo com muitos contribuidores.
Digite 'contributors()' para obter mais informações e
'citation()' para saber como citar o R ou pacotes do R em publicações.

Digite 'demo()' para demonstrações, 'help()' para o sistema on-line de ajuda,
ou 'help.start()' para abrir o sistema de ajuda em HTML no seu navegador.
Digite 'q()' para sair do R.
ADD REPLY

Login before adding your answer.

Traffic: 652 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