Method: Bio::PTS1#exec
- Defined in:
- lib/bio/appl/pts1.rb
#exec(query) ⇒ Object
Executes the query request and returns result output in Bio::PTS1::Report. The query argument is available both aSting in fasta format text and aBio::FastaFormat.
Examples
require 'bio'
pts1 = Bio::PTS1.new
pts1.exec(">title\nKLMFKTEGPDSD")
pts1.exec(Bio::FastaFormat.new(">title\nKLMFKTEGPDSD"))
142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/bio/appl/pts1.rb', line 142 def exec(query) seq = set_sequence_in_fastaformat(query) @form_data = {'function' => @function.values.join(''), 'sequence' => seq.seq, 'name' => seq.definition } @uri = URI.parse(["http:/", @host, @cgi_path].join('/')) result = Bio::Command.post_form(@uri, @form_data) @output = Report.new(result.body) return @output end |