30: def get_by_id(idstr, http_proxy = nil)
31: addr = 'fantom.gsc.riken.go.jp'
32: port = 80
33: path = "/db/maxml/maxmlseq.cgi?masterid=#{CGI.escape(idstr.to_s)}&style=xml"
34: xml = ''
35: if http_proxy then
36: proxy = URI.parse(http_proxy.to_s)
37: Net::HTTP.start(addr, port, proxy.host, proxy.port) do |http|
38: response = http.get(path)
39: xml = response.body
40: end
41: else
42: Bio::Command.start_http(addr, port) do |http|
43: response = http.get(path)
44: xml = response.body
45: end
46: end
47: xml
48: end