Class | Bio::Fasta::Report::Hit |
In: |
lib/bio/appl/fasta/format10.rb
|
Parent: | Object |
definition | [R] | |
query | [R] | |
score | [R] | |
target | [R] |
# File lib/bio/appl/fasta/format10.rb, line 201 201: def initialize(data) 202: score, query, target = data.split(/\n>/) 203: 204: @definition, *score = score.split(/\n/) 205: @score = {} 206: 207: pat = /;\s+([^:]+):\s+(.*)/ 208: 209: score.each do |x| 210: if pat.match(x) 211: @score[$1] = $2 212: end 213: end 214: 215: @query = Query.new(query) 216: @target = Target.new(target) 217: end
Bit score
# File lib/bio/appl/fasta/format10.rb, line 234 234: def bit_score 235: if @score['fa_bits'] 236: @score['fa_bits'].to_f 237: elsif @score['sw_bits'] 238: @score['sw_bits'].to_f 239: elsif @score['fx_bits'] 240: @score['fx_bits'].to_f 241: elsif @score['tx_bits'] 242: @score['tx_bits'].to_f 243: end 244: end
# File lib/bio/appl/fasta/format10.rb, line 246 246: def direction 247: @score['fa_frame'] || @score['sw_frame'] || @score['fx_frame'] || @score['tx_frame'] 248: end
E-value score
# File lib/bio/appl/fasta/format10.rb, line 221 221: def evalue 222: if @score['fa_expect'] 223: @score['fa_expect'].to_f 224: elsif @score['sw_expect'] 225: @score['sw_expect'].to_f 226: elsif @score['fx_expect'] 227: @score['fx_expect'].to_f 228: elsif @score['tx_expect'] 229: @score['tx_expect'].to_f 230: end 231: end
# File lib/bio/appl/fasta/format10.rb, line 327 327: def lap_at 328: [ query_start, query_end, target_start, target_end ] 329: end
Shortcuts for the methods of Bio::Fasta::Report::Hit::Query
# File lib/bio/appl/fasta/format10.rb, line 267 267: def query_id 268: @query.entry_id 269: end
Information on matching region
# File lib/bio/appl/fasta/format10.rb, line 311 311: def query_start 312: @query.start 313: end
Smith-Waterman score
# File lib/bio/appl/fasta/format10.rb, line 251 251: def sw 252: @score['sw_score'].to_i 253: end
# File lib/bio/appl/fasta/format10.rb, line 279 279: def target_def 280: @target.definition 281: end
Shortcuts for the methods of Bio::Fasta::Report::Hit::Target
# File lib/bio/appl/fasta/format10.rb, line 289 289: def target_len 290: @target.length 291: end