This is a test version of Biostars. For the public version, visit https://www.biostars.org.
unable to resolve host address 'ftp.ncbi.nlm.nih.gov'

R at the command line from ubuntu I am trying to download geo file at the command line I type R, so the command line go to

where I type download.file("http://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE89413&format=file", + "gse89413.tar", + mode="wb")

but it does not work, it gave error : unable to resolve "www.ncbi.nlm.nih.gov"

and when I go to command line and type: wget ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE99nnn/GSE99xxx/suppl/GSE99xxx_RAW.tar it gave this message: unable to resolve host address 'ftp.ncbi.nlm.nih.gov'

So how to download this file in R at the command line???

any help is super highly appreciated

r

Hey, this would have been better as a comment to my answer, in order to maintain 'fluidity' of thought in the thread. Not to worry, though!

Yes, I was able to download the file in R using that exact command. From where do you run R? - a server/cluster installation? Do you have a firewall?

onemore100iq : Please use ADD REPLY/ADD COMMENT when responding to existing posts to keep threads logically organized.

If you are getting an unable to resolve error then it sounds like you have a host name resolution problem. Is the problem general or are you only getting it with www.ncbi.nlm.nih.gov?

While not ideal you could try this IP address to see if that fixes the problem: 130.14.29.110 instead of www.ncbi.nlm.nih.gov in the URL above.

1 answer

I don't know about you but I cannot see the file at the location to which you're pointing. I just see the following file at: ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE89nnn/GSE89413/suppl/

  • GSE89413_2016-10-30-NBL-cell-line-STAR-fpkm.txt.gz

In R, I got this with:

download.file(url="ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE89nnn/GSE89413/suppl/", destfile="GSE89413_2016-10-30-NBL-cell-line-STAR-fpkm.txt.gz")

If you are attempting to load a GEO dataset directly into R, then you can use the GEO2R package:


There's a lot of information on how to download information from the GEO here. For downloading from the FTP site, they seem to recommended constructing the URL to access the FTP directory structure, as I have done here. By constructing a URL with http and sending 'acc' as the accession number, it just brings up a webpage that lists what information is available for that accession number, like this.

Log in to answer this question.