7
$\begingroup$

I have downloaded GSE16146 dataset from GEO using GEOquery R package.

I would like to extract "Data table" from downloaded GSE16146.

>library("GEOquery")
>GSE16146 <- getGEO("GSE16146")
>Table(GSE16146)[1:5,]

This returns the following error:

> Table(GSE16146)[1:5,]
Error in (function (classes, fdef, mtable)  :
unable to find an inherited method for function ‘Table’ for signature ‘"list"’

Can anyone help?

$\endgroup$
  • $\begingroup$ Have you tried the function getGSEDataTables to access GSE Data Tables from GEO, as reported in this tutorial? Also, what version of R/GEOquery are you using? $\endgroup$ – aechchiki Aug 30 '17 at 7:48
  • $\begingroup$ GEOquery version 2.42.0, R version 3.4.0 > getGSEDataTables(gset) Error in as.character.default(<S4 object of class "GSE">) : no method for coercing this S4 class to a vector $\endgroup$ – panbar Aug 30 '17 at 8:51
  • $\begingroup$ The error is telling you that you can't calculate a Table for a list. Also you might have tried to use table instead of Table. $\endgroup$ – llrs Aug 30 '17 at 18:26
8
$\begingroup$

According to the manual, all you need to do is:

library('GEOquery')
gseGSE16146 <- getGEO('GSE16146', GSEMatrix=FALSE)

As explanation, getGEO() outputs by default to GSEMatrix=TRUE and returns a list of ExpressionSet objects. You should get what you were looking for with:

Table(GSMList(gseGSE16146)[[1]])[1:5,]

The manual has also a paragraph about this:

The GSE has a metadata section, just like the other classes. However, it doesn’t have a GEODataTable. Instead, it contains two lists, accessible using GPLList and GSMList, that are each lists of GPL and GSM objects.

I tested the code I posted on R 3.3.2 and I get access to the Data Table just fine.

update:

Answering how to extract the actual expression data (not what asked in the original question):

library(GEOquery) 
data = getGEO("GSE16146") 
datExpr = exprs (data[[1]])
$\endgroup$
  • $\begingroup$ Thanks. It works. Would you suggest how can I extract all the expression matrix for 80 samples (list) from the gseGSE16146? $\endgroup$ – panbar Aug 30 '17 at 9:59
  • $\begingroup$ Hi thanks for your answer! What I didn't get is how do I access the actual expression data? $\endgroup$ – Tapper Oct 26 '18 at 18:20
  • 1
    $\begingroup$ @Tapper I updated my answer above with how to extract the expression data from the experiment. hope it helps? $\endgroup$ – aechchiki Oct 27 '18 at 10:29
  • $\begingroup$ @aechchiki Thank you! The snippet does not contain the data but a list in my case though: GSM4446615 GSM4446616 GSM4446617 GSM4446618. The file getGEO() got was anyway to small to contain the dataset imho. I finally got the data by downloading the big data file myself and processing it with: gse = read.table("GSE123456.txt", sep = "\t"); data=CreateSeuratObject(raw.data = gse, ..) -- What do you think? $\endgroup$ – Tapper Oct 29 '18 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.