Module | Bio::Blast::Remote::DDBJ |
In: |
lib/bio/appl/blast/ddbj.rb
|
Remote BLAST factory using DDBJ Web API for Biology (xml.nig.ac.jp/).
Creates a remote BLAST factory using DDBJ. Returns Bio::Blast object.
Note for future improvement: In the future, it might return Bio::Blast::Remote::DDBJ or other object.
# File lib/bio/appl/blast/ddbj.rb, line 23 23: def self.new(program, db, options = []) 24: Bio::Blast.new(program, db, options, 'ddbj') 25: end
executes BLAST and returns result as a string
# File lib/bio/appl/blast/ddbj.rb, line 103 103: def exec_ddbj(query) 104: options = make_command_line_options 105: opt = Bio::Blast::NCBIOptions.new(options) 106: 107: # REST objects are cached 108: @ddbj_remote_blast ||= Bio::DDBJ::REST::Blast.new 109: @ddbj_request_manager ||= Bio::DDBJ::REST::RequestManager.new 110: 111: program = opt.delete('-p') 112: db = opt.delete('-d') 113: optstr = Bio::Command.make_command_line_unix(opt.options) 114: 115: # using searchParamAsync 116: qid = @ddbj_remote_blast.searchParamAsync(program, db, query, optstr) 117: @output = qid 118: 119: result = @ddbj_request_manager.wait_getAsyncResult(qid) 120: 121: @output = result 122: return @output 123: end