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 26 26: def self.new(program, db, options = []) 27: Bio::Blast.new(program, db, options, 'ddbj') 28: end
executes BLAST and returns result as a string
# File lib/bio/appl/blast/ddbj.rb, line 106 106: def exec_ddbj(query) 107: options = make_command_line_options 108: opt = Bio::Blast::NCBIOptions.new(options) 109: 110: # REST objects are cached 111: @ddbj_remote_blast ||= Bio::DDBJ::REST::Blast.new 112: @ddbj_request_manager ||= Bio::DDBJ::REST::RequestManager.new 113: 114: program = opt.delete('-p') 115: db = opt.delete('-d') 116: optstr = Bio::Command.make_command_line_unix(opt.options) 117: 118: # using searchParamAsync 119: qid = @ddbj_remote_blast.searchParamAsync(program, db, query, optstr) 120: @output = qid 121: 122: result = @ddbj_request_manager.wait_getAsyncResult(qid) 123: 124: @output = result 125: return @output 126: end