This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Getgeo Error

Hi all, I've just started to import gene expression data sets in R. When I try to import data using this command:

gds<-getGEO(filename=system.file("extdata/GDS2478.soft.gz",package="GEOquery"))

I get this error:

Error in read.table(con, sep = "\t", header = FALSE, nrows = nseries) : 
  invalid 'nlines' argument
In addition: Warning messages:
1: In file(fname, "r") :
  file("") only supports open = "w+" and open = "w+b": using the former
2: In file(con, "r") :
  file("") only supports open = "w+" and open = "w+b": using the former
3: In file(fname, "r") :
  file("") only supports open = "w+" and open = "w+b": using the former

I've searched internet for a useful guide, but unfortunately I have not been successful so far. I will appreciate any help. Nazanin

geo bioconductor

Edited tags for you. Trust me, "question" is not a useful tag :)

2 answers

I suspect that you are copy-pasting from an old version of the GEOquery tutorial and the file GDS2478.soft.gz does not exist on your system.

Some suggestions:

  • the example GDS in the latest version of GEOquery is GDS507.soft.gz - try that instead
  • find the directory GEOquery/extdata on your system and see what example data files it contains
  • get the data direct from GEO using getGEO("GDS2478") (or another GEO identifier)

I admit, the error is not very clear--I'll have to fix that. You are telling GEOquery to get a file from your disk that does not exist. To do what you want to do, try this:

gds = getGEO('GDS2478')

Log in to answer this question.