Sha256: d1bf6cf42bbd963274c341dfddc4e97b7a1f72db0955917b1e3854310369a873
Contents?: true
Size: 436 Bytes
Versions: 7
Compression:
Stored size: 436 Bytes
Contents
#!/usr/bin/env ruby require 'faraday' require 'cri' Signal.trap("PIPE", "EXIT") Signal.trap("INT", "EXIT") def get_uniprot_entry(arg) resp = Faraday.get("http://www.uniprot.org/uniprot/#{arg}.fasta") if resp.success? puts resp.body.lines.map(&:chomp)[1..-1].join("") end end if ARGV.empty? STDIN.each_line do |pept| get_uniprot_entry(pept.chomp) end else ARGV.each do |pept| get_uniprot_entry(pept) end end
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
unipept-0.5.1 | bin/uniprot |
unipept-0.5.0 | bin/uniprot |
unipept-0.4.2 | bin/uniprot |
unipept-0.4.1 | bin/uniprot |
unipept-0.4.0 | bin/uniprot |
unipept-0.3.5 | bin/uniprot |
unipept-0.3.4 | bin/uniprot |