This is a test version of Biostars. For the public version, visit https://www.biostars.org.
could not find function "getGEO"

Dear all

I am analyzing gene expression data (GEO) in R (in LINUX). I got the below error in my running;

could not find function "getGEO"

Please guide me in this matter,

Best wishes,
Raheleh

r

require(GEOquery) then try again. If not installed, do:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("GEOquery")

If Bioconductor is not installed see https://bioconductor.org/install/ and please google for a background in R package management first.

Thank you for your response. I have got another error:

> gset <- getGEO("GSE20853", GSEMatrix =TRUE, destdir = "~/proj/lung/data/FUDAN_Expression", AnnotGPL=TRUE)[[1]]
Found 1 file(s)
GSE20853_series_matrix.txt.gz
Error: '~/proj/lung/data/FUDAN_Expression/GSE20853_series_matrix.txt.gz' does not exist.
In addition: Warning messages:
1: In download.file(sprintf("https://ftp.ncbi.nlm.nih.gov/geo/series/%s/%s/matrix/%s",  :
  URL https://ftp.ncbi.nlm.nih.gov/geo/series/GSE20nnn/GSE20853/matrix/GSE20853_series_matrix.txt.gz: cannot open destfile '~/proj/lung/data/FUDAN_Expression/GSE20853_series_matrix.txt.gz', reason 'No such file or directory'
2: In download.file(sprintf("https://ftp.ncbi.nlm.nih.gov/geo/series/%s/%s/matrix/%s",  :
  download had nonzero exit status

Error is pretty clear, check if you have the files:

Error: '~/proj/lung/data/FUDAN_Expression/GSE20853_series_matrix.txt.gz' does not exist.

I am beginner in this field. Please guide me if I should download the supplementary file from GEO page?

Check that the destdir exists (and create it if not) before calling getGEO

The path ~/proj/lung/data/ already exit.

(That isn't an answer, it's a reply to a comment). Nonethless, please check if the _destdir_ exists, that is, ~/proj/lung/data/FUDAN_Expression, not ~/proj/lung/data.

1 answer

The directory that you entered does not seem to exist. The command will not auto-create non-existing directories. You have to do it manually, be it with mkdir via command line, dir.create() from inside R or interactively per mouse.

Log in to answer this question.