unable to resolve host address 'ftp.ncbi.nlm.nih.gov'
1
0
Entering edit mode
7.1 years ago
onemore100iq ▴ 20

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 • 10k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Hi, Thanks for your response. But did you actually were able to open this link in your R I tried your first method: 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") and did not work either, it gave me cannot open URL "ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE89nnn/GSE89413/suppl/"

ADD REPLY
1
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
7.1 years ago

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.

ADD COMMENT

Login before adding your answer.

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