X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=wiki%2FRubyExamples.wiki;h=7e49fce59afad4a065a222eda84505495aedac65;hb=6c92ad5c03f67e4067b0da3766ca8028ccc87b62;hp=85d1c697530f0c9cfbd05cf21d619102f46c8ebc;hpb=34d52f325baa6e48a6c701cc4a023c4bdaca29a4;p=jalview.git diff --git a/wiki/RubyExamples.wiki b/wiki/RubyExamples.wiki index 85d1c69..7e49fce 100644 --- a/wiki/RubyExamples.wiki +++ b/wiki/RubyExamples.wiki @@ -12,6 +12,8 @@ Copyright (C) 2011 Christian M Zmasek. All rights reserved. = Using net/ftp to download all Proteomes from the Ensembl Database = +This, or something like it, can be used to download from Ensembl all "pep.all.fa.gz" files. + {{{ require 'net/ftp' @@ -31,7 +33,8 @@ files.each do | file | pepfiles = ftp.list() pepfiles.each do | pepfile | pepfile = pepfile.split().last - if pepfile =~ /all.fa./ + if pepfile =~ /all.fa.gz/ # Only want the "all.fa.gz" files (and not the + # "abinitio" files). ftp.getbinaryfile(pepfile) puts 'downloaded "' + pepfile + '"' count += 1