This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Download Geo Tar File Automatically From Linux/Unix

Hi,

I'd like to automatically download the tar files from the following links, does anyone knows how to do that?

http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE39977

http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE36375

Kind of like using wget...

Thanks!

unix geo

3 answers

Never mind, just figured it out. I can go to the ftp site and do wget:

ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE39nnn/GSE39977/suppl/

wget 'ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE39nnn/GSE39977/suppl/GSE39977_RAW.tar'

Thanks!

Check the parameter -b, love it, sends the download to background and generates log. Good for multiple downloads.

Thanks for the suggestion!

GEO should provide a automatical tools to download the data, such as fastq-dump

Just a note that the GEOquery bioconductor package does this for a living, if you happen to be targeting R for further processing/analysis. See the help for getGEOSuppFiles() and getGEO().

wget -r -nH --cut-dirs=3 ftp://ftp.ncbi.nlm.nih.gov/geo/series/GSE39nnn/GSE39977/

The -r option in the wget command stands for "recursive," and tells wget to download files recursively from the specified FTP directory.

The --cut-dirs option tells wget to cut off the specified number of directories from the beginning of the directory hierarchy when saving the downloaded files. In the example command I provided, --cut-dirs=3 tells wget to remove the first three directories from the path of the downloaded files.

Log in to answer this question.