Module: Bio::Blast::Remote::DDBJ
- Extended by:
- Information
- Defined in:
- lib/bio/appl/blast/ddbj.rb
Overview
Remote BLAST factory using DDBJ Web API for Biology (xml.nig.ac.jp/).
Defined Under Namespace
Modules: Information
Class Method Summary collapse
-
.new(program, db, options = []) ⇒ Object
Creates a remote BLAST factory using DDBJ.
Instance Method Summary collapse
-
#exec_ddbj(query) ⇒ Object
executes BLAST and returns result as a string.
Methods included from Information
#database_description, #databases, #nucleotide_databases, #protein_databases, #reset
Class Method Details
.new(program, db, options = []) ⇒ Object
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.
23 24 25 |
# File 'lib/bio/appl/blast/ddbj.rb', line 23 def self.new(program, db, = []) Bio::Blast.new(program, db, , 'ddbj') end |
Instance Method Details
#exec_ddbj(query) ⇒ Object
executes BLAST and returns result as a string
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/bio/appl/blast/ddbj.rb', line 103 def exec_ddbj(query) = opt = Bio::Blast::NCBIOptions.new() # REST objects are cached @ddbj_remote_blast ||= Bio::DDBJ::REST::Blast.new @ddbj_request_manager ||= Bio::DDBJ::REST::RequestManager.new program = opt.delete('-p') db = opt.delete('-d') optstr = Bio::Command.make_command_line_unix(opt.) # using searchParamAsync qid = @ddbj_remote_blast.searchParamAsync(program, db, query, optstr) @output = qid result = @ddbj_request_manager.wait_getAsyncResult(qid) @output = result return @output end |