convert a seurat object to expressionset
0
0
Entering edit mode
19 days ago
Bine ▴ 60

Dear all,

Could anyone advice me on how to convert a Seurat object to an ExpressionSet? Unfortunately I need this format for a specific analysis.

Thank you!

Seurat • 227 views
ADD COMMENT
1
Entering edit mode

You are probably looking to do like this?

library(Seurat)    
ExpressionSet.SO = ExpressionSet(assayData = as.matrix(GetAssayData(SeuratObject)))
ADD REPLY
0
Entering edit mode

Thank you very much. Thats exactly what I am looking for.

The only thing I am missing this way is that it doesnt store my metadata from the Seurat object (subtype) in the phenotype data:

For me it looks like this now:

ExpressionSet (storageMode: lockedEnvironment)
assayData: 18373 features, 4697 samples 
element names: exprs 
protocolData: none
phenoData: none
featureData: none
experimentData: use 'experimentData(object)'

I would like it to look like this:

  ExpressionSet (storageMode: lockedEnvironment)
  assayData: 18373 features, 4697 samples 
  element names: exprs 
  protocolData: none
  phenoData
  rowNames: TCGA.02.0003.01A.01 TCGA.02.0010.01A.01 ...
  TCGA.12.0620.01A.01 (173 total)
  varLabels: subtype
  varMetadata: labelDescription channel
  featureData: none
  experimentData: use 'experimentData(object)'

Thanks a lot!

ADD REPLY

Login before adding your answer.

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