class Bio::Fasta::Report::Hit
Attributes
definition[R]
query[R]
score[R]
target[R]
Public Class Methods
new(data)
click to toggle source
# File lib/bio/appl/fasta/format10.rb 202 def initialize(data) 203 score, query, target = data.split(/\n>/) 204 205 @definition, *score = score.split(/\n/) 206 @score = {} 207 208 pat = /;\s+([^:]+):\s+(.*)/ 209 210 score.each do |x| 211 if pat.match(x) 212 @score[$1] = $2 213 end 214 end 215 216 @query = Query.new(query) 217 @target = Target.new(target) 218 end
Public Instance Methods
bit_score()
click to toggle source
Bit score
# File lib/bio/appl/fasta/format10.rb 235 def bit_score 236 if @score['fa_bits'] 237 @score['fa_bits'].to_f 238 elsif @score['sw_bits'] 239 @score['sw_bits'].to_f 240 elsif @score['fx_bits'] 241 @score['fx_bits'].to_f 242 elsif @score['tx_bits'] 243 @score['tx_bits'].to_f 244 end 245 end
direction()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 247 def direction 248 @score['fa_frame'] || @score['sw_frame'] || @score['fx_frame'] || @score['tx_frame'] 249 end
evalue()
click to toggle source
E-value score
# File lib/bio/appl/fasta/format10.rb 222 def evalue 223 if @score['fa_expect'] 224 @score['fa_expect'].to_f 225 elsif @score['sw_expect'] 226 @score['sw_expect'].to_f 227 elsif @score['fx_expect'] 228 @score['fx_expect'].to_f 229 elsif @score['tx_expect'] 230 @score['tx_expect'].to_f 231 end 232 end
identity()
click to toggle source
percent identity
# File lib/bio/appl/fasta/format10.rb 257 def identity 258 @score['sw_ident'].to_f 259 end
lap_at()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 328 def lap_at 329 [ query_start, query_end, target_start, target_end ] 330 end
overlap()
click to toggle source
overlap length
# File lib/bio/appl/fasta/format10.rb 262 def overlap 263 @score['sw_overlap'].to_i 264 end
query_def()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 276 def query_def 277 @query.definition 278 end
query_end()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 316 def query_end 317 @query.stop 318 end
query_id()
click to toggle source
Shortcuts for the methods of Bio::Fasta::Report::Hit::Query
# File lib/bio/appl/fasta/format10.rb 268 def query_id 269 @query.entry_id 270 end
query_len()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 284 def query_len 285 @query.length 286 end
query_seq()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 294 def query_seq 295 @query.sequence 296 end
query_start()
click to toggle source
Information on matching region
# File lib/bio/appl/fasta/format10.rb 312 def query_start 313 @query.start 314 end
query_type()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 302 def query_type 303 @query.moltype 304 end
sw()
click to toggle source
Smith-Waterman score
# File lib/bio/appl/fasta/format10.rb 252 def sw 253 @score['sw_score'].to_i 254 end
target_def()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 280 def target_def 281 @target.definition 282 end
target_end()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 324 def target_end 325 @target.stop 326 end
target_id()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 272 def target_id 273 @target.entry_id 274 end
target_len()
click to toggle source
Shortcuts for the methods of Bio::Fasta::Report::Hit::Target
# File lib/bio/appl/fasta/format10.rb 290 def target_len 291 @target.length 292 end
target_seq()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 298 def target_seq 299 @target.sequence 300 end
target_start()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 320 def target_start 321 @target.start 322 end
target_type()
click to toggle source
# File lib/bio/appl/fasta/format10.rb 306 def target_type 307 @target.moltype 308 end