# File lib/bio/appl/fasta/format10.rb, line 201 def initialize(data) score, query, target = data.split(/\n>/) @definition, *score = score.split(/\n/) @score = {} pat = /;\s+([^:]+):\s+(.*)/ score.each do |x| if pat.match(x) @score[$1] = $2 end end @query = Query.new(query) @target = Target.new(target) end
Bit score
# File lib/bio/appl/fasta/format10.rb, line 234 def bit_score if @score['fa_bits'] @score['fa_bits'].to_f elsif @score['sw_bits'] @score['sw_bits'].to_f elsif @score['fx_bits'] @score['fx_bits'].to_f elsif @score['tx_bits'] @score['tx_bits'].to_f end end
# File lib/bio/appl/fasta/format10.rb, line 246 def direction @score['fa_frame'] || @score['sw_frame'] || @score['fx_frame'] || @score['tx_frame'] end
E-value score
# File lib/bio/appl/fasta/format10.rb, line 221 def evalue if @score['fa_expect'] @score['fa_expect'].to_f elsif @score['sw_expect'] @score['sw_expect'].to_f elsif @score['fx_expect'] @score['fx_expect'].to_f elsif @score['tx_expect'] @score['tx_expect'].to_f end end
percent identity
# File lib/bio/appl/fasta/format10.rb, line 256 def identity @score['sw_ident'].to_f end
# File lib/bio/appl/fasta/format10.rb, line 327 def lap_at [ query_start, query_end, target_start, target_end ] end
overlap length
# File lib/bio/appl/fasta/format10.rb, line 261 def overlap @score['sw_overlap'].to_i end
# File lib/bio/appl/fasta/format10.rb, line 275 def query_def @query.definition end
# File lib/bio/appl/fasta/format10.rb, line 315 def query_end @query.stop end
Shortcuts for the methods of Bio::Fasta::Report::Hit::Query
# File lib/bio/appl/fasta/format10.rb, line 267 def query_id @query.entry_id end
# File lib/bio/appl/fasta/format10.rb, line 283 def query_len @query.length end
# File lib/bio/appl/fasta/format10.rb, line 293 def query_seq @query.sequence end
Information on matching region
# File lib/bio/appl/fasta/format10.rb, line 311 def query_start @query.start end
# File lib/bio/appl/fasta/format10.rb, line 301 def query_type @query.moltype end
Smith-Waterman score
# File lib/bio/appl/fasta/format10.rb, line 251 def sw @score['sw_score'].to_i end
# File lib/bio/appl/fasta/format10.rb, line 279 def target_def @target.definition end
# File lib/bio/appl/fasta/format10.rb, line 323 def target_end @target.stop end
# File lib/bio/appl/fasta/format10.rb, line 271 def target_id @target.entry_id end
Shortcuts for the methods of Bio::Fasta::Report::Hit::Target
# File lib/bio/appl/fasta/format10.rb, line 289 def target_len @target.length end
# File lib/bio/appl/fasta/format10.rb, line 297 def target_seq @target.sequence end
Generated with the Darkfish Rdoc Generator 2.