class Bio::Sim4::Report::Hit
Hit
object of the sim4 result. Similar to Bio::Blast::Report::Hit
but lacks many methods.
Attributes
Returns sequence informations of ‘seq1’. Returns a Bio::Sim4::Report::SeqDesc
object. This would be Bio::Sim4
specific method.
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.
# File lib/bio/appl/sim4/report.rb 273 def initialize(str) 274 @data = str.split(/\n(?:\r?\n)+/) 275 parse_seqdesc 276 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.
# File lib/bio/appl/sim4/report.rb 432 def align 433 unless defined?(@align); parse_align; end 434 @align 435 end
Returns true if the hit reports ‘-’(complemental) strand search result. Otherwise, return false or nil. This would be a Bio::Sim4
specific method.
# File lib/bio/appl/sim4/report.rb 313 def complement? 314 @complement 315 end
Iterates over each exon of the hit. Yields a Bio::Sim4::Report::SegmentPair
object.
# File lib/bio/appl/sim4/report.rb 470 def each(&x) #:yields: segmentpair 471 exons.each(&x) 472 end
Returns exons of the hit. Each exon is a Bio::Sim4::Report::SegmentPair
object.
# File lib/bio/appl/sim4/report.rb 402 def exons 403 unless defined?(@exons); parse_segmentpairs; end 404 @exons 405 end
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.)
# File lib/bio/appl/sim4/report.rb 422 def introns 423 unless defined?(@introns); parse_segmentpairs; end 424 @introns 425 end
Definition of the query sequence Same as Bio::Sim4::Report#query_def
.
# File lib/bio/appl/sim4/report.rb 451 def query_def; seq1.definition; end
Identifier of the query sequence. Same as Bio::Sim4::Report#query_id
.
# File lib/bio/appl/sim4/report.rb 447 def query_id; seq1.entry_id; end
Length of the query sequence. Same as Bio::Sim4::Report#query_len
.
# File lib/bio/appl/sim4/report.rb 443 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.)
# File lib/bio/appl/sim4/report.rb 412 def segmentpairs 413 unless defined?(@segmentpairs); parse_segmentpairs; end 414 @segmentpairs 415 end
Definition of the hit(target) sequence
# File lib/bio/appl/sim4/report.rb 460 def target_def; seq2.definition; end
Identifier of the hit(target) sequence
# File lib/bio/appl/sim4/report.rb 457 def target_id; seq2.entry_id; end
length of the hit(target) sequence
# File lib/bio/appl/sim4/report.rb 454 def target_len; seq2.len; end