Class: Bio::Blast::Report::Hit

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/appl/blast/report.rb

Overview

Bio::Blast::Report::Hit

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHit

Returns a new instance of Hit.



251
252
253
# File 'lib/bio/appl/blast/report.rb', line 251

def initialize
  @hsps = []
end

Instance Attribute Details

#accessionObject Also known as: target_id

Accession



267
268
269
# File 'lib/bio/appl/blast/report.rb', line 267

def accession
  @accession
end

#definitionObject Also known as: target_def

Definition line of subject



265
266
267
# File 'lib/bio/appl/blast/report.rb', line 265

def definition
  @definition
end

#hit_idObject

SeqId of subject



261
262
263
# File 'lib/bio/appl/blast/report.rb', line 261

def hit_id
  @hit_id
end

#hspsObject (readonly)

Returns an Array of Bio::Blast::Report::Hsp objects.



256
257
258
# File 'lib/bio/appl/blast/report.rb', line 256

def hsps
  @hsps
end

#lenObject Also known as: target_len

Length of subject



263
264
265
# File 'lib/bio/appl/blast/report.rb', line 263

def len
  @len
end

#numObject

Hit number



259
260
261
# File 'lib/bio/appl/blast/report.rb', line 259

def num
  @num
end

#query_defObject

Compatible method with Bio::Fasta::Report::Hit class.



279
280
281
# File 'lib/bio/appl/blast/report.rb', line 279

def query_def
  @query_def
end

#query_idObject

Compatible method with Bio::Fasta::Report::Hit class.



277
278
279
# File 'lib/bio/appl/blast/report.rb', line 277

def query_id
  @query_id
end

#query_lenObject

Compatible method with Bio::Fasta::Report::Hit class.



281
282
283
# File 'lib/bio/appl/blast/report.rb', line 281

def query_len
  @query_len
end

Instance Method Details

#bit_scoreObject



293
# File 'lib/bio/appl/blast/report.rb', line 293

def bit_score;        @hsps.first.bit_score;        end

#eachObject

Iterates on each Hsp object.



270
271
272
273
274
# File 'lib/bio/appl/blast/report.rb', line 270

def each
  @hsps.each do |x|
    yield x
  end
end

#evalueObject

Shortcut methods for the best Hsp, some are also compatible with Bio::Fasta::Report::Hit class.



292
# File 'lib/bio/appl/blast/report.rb', line 292

def evalue;           @hsps.first.evalue;           end

#identityObject



294
# File 'lib/bio/appl/blast/report.rb', line 294

def identity;         @hsps.first.identity;         end

#lap_atObject



306
307
308
# File 'lib/bio/appl/blast/report.rb', line 306

def lap_at
  [ query_start, query_end, target_start, target_end ]
end

#midlineObject



300
# File 'lib/bio/appl/blast/report.rb', line 300

def midline;          @hsps.first.midline;          end

#overlapObject



296
# File 'lib/bio/appl/blast/report.rb', line 296

def overlap;          @hsps.first.align_len;        end

#percent_identityObject



295
# File 'lib/bio/appl/blast/report.rb', line 295

def percent_identity; @hsps.first.percent_identity; end

#query_endObject



303
# File 'lib/bio/appl/blast/report.rb', line 303

def query_end;        @hsps.first.query_to;         end

#query_seqObject



298
# File 'lib/bio/appl/blast/report.rb', line 298

def query_seq;        @hsps.first.qseq;             end

#query_startObject



302
# File 'lib/bio/appl/blast/report.rb', line 302

def query_start;      @hsps.first.query_from;       end

#target_endObject



305
# File 'lib/bio/appl/blast/report.rb', line 305

def target_end;       @hsps.first.hit_to;           end

#target_seqObject



299
# File 'lib/bio/appl/blast/report.rb', line 299

def target_seq;       @hsps.first.hseq;             end

#target_startObject



304
# File 'lib/bio/appl/blast/report.rb', line 304

def target_start;     @hsps.first.hit_from;         end