Class Bio::Sim4::Report::Hit
In: lib/bio/appl/sim4/report.rb
Parent: Object

Hit object of the sim4 result. Similar to Bio::Blast::Report::Hit but lacks many methods.

Methods

align   complement?   definition   each   exons   hit_id   hsps   introns   len   new   query_def   query_id   query_len   segmentpairs   target_def   target_id   target_len  

Attributes

seq1  [R]  Returns sequence informations of ‘seq1’. Returns a Bio::Sim4::Report::SeqDesc object. This would be Bio::Sim4 specific method.
seq2  [R]  Returns sequence informations of ‘seq2’. Returns a Bio::Sim4::Report::SeqDesc object. This would be Bio::Sim4 specific method.

Public Class methods

Parses part of sim4 result text and creates a new Hit object. It is designed to be called internally from Bio::Sim4::Report class. Users shall not use it directly.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 262
262:         def initialize(str)
263:           @data = str.split(/\n(?:\r?\n)+/)
264:           parse_seqdesc
265:         end

Public Instance methods

Returns alignments. Returns an Array of arrays. Each array contains sequence of seq1, midline, sequence of seq2, respectively. This would be a Bio::Sim4 specific method.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 399
399:         def align
400:           unless defined?(@align); parse_align; end
401:           @align
402:         end

Returns true if the hit reports ’-’(complemental) strand search result. Otherwise, return false or nil. This would be a Bio::Sim4 specific method.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 302
302:         def complement?
303:           @complement
304:         end
definition()

Alias for target_def

Iterates over each exon of the hit. Yields a Bio::Sim4::Report::SegmentPair object.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 437
437:         def each(&x) #:yields: segmentpair
438:           exons.each(&x)
439:         end

Returns exons of the hit. Each exon is a Bio::Sim4::Report::SegmentPair object.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 369
369:         def exons
370:           unless defined?(@exons); parse_segmentpairs; end
371:           @exons
372:         end
hit_id()

Alias for target_id

hsps()

Alias for exons

Returns introns of the hit. Some of them would contain untranscribed regions. Returns an array of Bio::Sim4::Report::SegmentPair objects. (Note that intron data is not always available according to run-time options of the program.)

[Source]

     # File lib/bio/appl/sim4/report.rb, line 389
389:         def introns
390:           unless defined?(@introns); parse_segmentpairs; end
391:           @introns
392:         end
len()

Alias for target_len

Definition of the query sequence Same as Bio::Sim4::Report#query_def.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 418
418:         def query_def;  seq1.definition; end

Identifier of the query sequence. Same as Bio::Sim4::Report#query_id.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 414
414:         def query_id;   seq1.entry_id;   end

Length of the query sequence. Same as Bio::Sim4::Report#query_len.

[Source]

     # File lib/bio/appl/sim4/report.rb, line 410
410:         def query_len;  seq1.len;        end

Returns segment pairs (exons and introns) of the hit. Each segment pair is a Bio::Sim4::Report::SegmentPair object. Returns an array of Bio::Sim4::Report::SegmentPair objects. (Note that intron data is not always available according to run-time options of the program.)

[Source]

     # File lib/bio/appl/sim4/report.rb, line 379
379:         def segmentpairs
380:           unless defined?(@segmentpairs); parse_segmentpairs; end
381:           @segmentpairs
382:         end

Definition of the hit(target) sequence

[Source]

     # File lib/bio/appl/sim4/report.rb, line 427
427:         def target_def; seq2.definition; end

Identifier of the hit(target) sequence

[Source]

     # File lib/bio/appl/sim4/report.rb, line 424
424:         def target_id;  seq2.entry_id;   end

length of the hit(target) sequence

[Source]

     # File lib/bio/appl/sim4/report.rb, line 421
421:         def target_len; seq2.len;        end

[Validate]