class Bio::Fasta
Attributes
Returns a String containing fasta execution output in as is format.
Public Class Methods
Source
# File lib/bio/appl/fasta.rb 80 def self.local(program, db, option = '') 81 self.new(program, db, option, 'local') 82 end
Returns a FASTA factory object (Bio::Fasta
) to run FASTA search on local computer.
Source
# File lib/bio/appl/fasta.rb 23 def initialize(program, db, opt = [], server = 'local') 24 @format = 10 25 26 @program = program 27 @db = db 28 @server = server 29 30 @ktup = nil 31 @matrix = nil 32 33 @output = '' 34 35 begin 36 a = opt.to_ary 37 rescue NameError #NoMethodError 38 # backward compatibility 39 a = Shellwords.shellwords(opt) 40 end 41 @options = [ '-Q', '-H', '-m', @format.to_s, *a ] # need -a ? 42 end
Returns a FASTA factory object (Bio::Fasta
).
Source
# File lib/bio/appl/fasta.rb 74 def self.parser(parser) 75 warn 'Bio::Fasta.parser is obsoleted and will soon be removed.' 76 end
OBSOLETE. Does nothing and shows warning messages.
Historically, selecting parser to use (‘format6’ or ‘format10’ were expected, but only ‘format10’ was available as a working parser).
Source
# File lib/bio/appl/fasta.rb 90 def self.remote(program, db, option = '', server = 'genomenet') 91 self.new(program, db, option, server) 92 end
Returns a FASTA factory object (Bio::Fasta
) to execute FASTA search on remote server.
For the develpper, you can add server ‘hoge’ by adding exec_hoge(query) method.
Public Instance Methods
Source
# File lib/bio/appl/fasta.rb 59 def format=(num) 60 @format = num.to_i 61 if i = @options.index('-m') then 62 @options[i+1, 1] = @format.to_s 63 else 64 @options << '-m' << @format.to_s 65 end 66 end
Accessors for the -m option.
Source
# File lib/bio/appl/fasta.rb 48 def option 49 # backward compatibility 50 Bio::Command.make_command_line(@options) 51 end
Source
# File lib/bio/appl/fasta.rb 53 def option=(str) 54 # backward compatibility 55 @options = Shellwords.shellwords(str) 56 end
Source
# File lib/bio/appl/fasta.rb 95 def query(query) 96 return self.send("exec_#{@server}", query.to_s) 97 end
Execute FASTA search and returns Report
object (Bio::Fasta::Report
).