This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to create a FTP link which can be downloaded by 'wget' command?

I have a 30Gb fasta file. I'd like to upload it to IMG/ER, but they asked me to provide a FTP link (with the link, the data can be downloaded by 'wget' command). I tried to follow this instruction and generate a FTP link https://stackoverflow.com/questions/37453841/download-a-file-from-google-drive-using-wget. But when they tried to download data with 'wget my_ftp_link', they only got a useless html file. Does anybody know how to generate a FTP link for my data and anyone with my link can download my fasta file with 'wget' command? Thanks a lot!

next-gen

I understand correctly that you uploaded your data to google-drive such that they can download it from there, right?

then why not ask them for a ftp link so you can upload (ftp) to them?

Yes, you're right! Although I uploaded my data to google drive and generated a FTP link as the instruction, but IMG staff only got a html file with 'wget my_ftp_link' command. I don't understand why it doesn't work. 'I'm wondering what do you mean by "ask them for a ftp link so you can upload (ftp) to them"? Thanks!

'I'm wondering what do you mean by "ask them for a ftp link so you can upload (ftp) to them"?

If they host an ftp server, they can provide you with access to it (or even anonymous) so you can then upload your data directly to their system

alternatively, if you have access to an ftp server (or a public web server) you can put the file online for them to download it directly from your system

Have you seen this? You can check yourself to see if this works.

It doesn't work. :(

wget "https://drive.google.com/uc?export=download&id=1gs4V2QbTY9bVf0MavV--a0qmS7-MWWUidRngjg-ooH8" --2018-04-05 16:14:46-- https://drive.google.com/uc?export=download&id=1gs4V2QbTY9bVf0MavV--a0qmS7-MWWUidRngjg-ooH8 Resolving drive.google.com drive.google.com)... 172.217.9.206, 2607:f8b0:4004:811::200e Connecting to drive.google.com drive.google.com)|172.217.9.206|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2018-04-05 16:14:46 ERROR 404: Not Found.

I tried this page before, it doesn't work. Same error :(

are you sure your google drive link is OK? if i check the link I get the 404 as well ?

For a command-line interface for Google Drive, you may gdrive. The site provides statically linked binaries, so there is no trouble to install it.

Someone else is supposed to download the file and they insist on using wget and a working link.

I just assumed the wget requirement is actually some command-line program.

I don't see how this is a proper bioinformatics question, sorry.

1 answer

The trick is to use the Google drive API, in particular, the export command specifying the desired format:

wget "https://docs.google.com/document/d/1gs4V2QbTY9bVf0MavV--a0qmS7-MWWUidRngjg-ooH8/export?format=txt" -O test.txt

You can also do

https://drive.google.com/uc?export=download&id=1gs4V2QbTY9bVf0MavV--a0qmS7-MWWUidRngjg-ooH8

but only for files that you uploaded. It doesn't seem to work for files that were created in Google docs.

The API seems to have evolved over time so a lot of things found on the net probably doesn't work anymore. It's best to check the docs.

Log in to answer this question.