5 require 'lib/evo/io/parser/uniprot_parser'
12 BASE_URL = "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=uniprotkb;"
15 def UniprotKB::get_by_id( id, style = "raw", format = "uniprot" )
16 url_str = BASE_URL + "id=#{id};format=#{format};style=#{style}"
17 uri = URI.parse url_str
18 response = Net::HTTP.get_response uri
20 response.body.each_line do |line|
28 def UniprotKB::get_entry_by_id( id )
29 lines = get_by_id( id, "raw", "uniprot" )
31 return p.parse( lines )