class Bio::Sim4::Report::Hit

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

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

new(str) click to toggle source

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, line 273
def initialize(str)
  @data = str.split(/\n(?:\r?\n)+/)
  parse_seqdesc
end

Public Instance Methods

align() click to toggle source

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, line 432
def align
  unless defined?(@align); parse_align; end
  @align
end
complement?() click to toggle source

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, line 313
def complement?
  @complement
end
definition()
Alias for: target_def
each() { |segmentpair| ... } click to toggle source

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

# File lib/bio/appl/sim4/report.rb, line 470
def each(&x) #:yields: segmentpair
  exons.each(&x)
end
exons() click to toggle source

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

# File lib/bio/appl/sim4/report.rb, line 402
def exons
  unless defined?(@exons); parse_segmentpairs; end
  @exons
end
Also aliased as: hsps
hit_id()
Alias for: target_id
hsps()
Alias for: exons
introns() click to toggle source

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, line 422
def introns
  unless defined?(@introns); parse_segmentpairs; end
  @introns
end
len()
Alias for: target_len
query_def() click to toggle source

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

# File lib/bio/appl/sim4/report.rb, line 451
def query_def;  seq1.definition; end
query_id() click to toggle source

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

# File lib/bio/appl/sim4/report.rb, line 447
def query_id;   seq1.entry_id;   end
query_len() click to toggle source

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

# File lib/bio/appl/sim4/report.rb, line 443
def query_len;  seq1.len;        end
segmentpairs() click to toggle source

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, line 412
def segmentpairs
  unless defined?(@segmentpairs); parse_segmentpairs; end
  @segmentpairs
end
target_def() click to toggle source

Definition of the hit(target) sequence

# File lib/bio/appl/sim4/report.rb, line 460
def target_def; seq2.definition; end
Also aliased as: definition
target_id() click to toggle source

Identifier of the hit(target) sequence

# File lib/bio/appl/sim4/report.rb, line 457
def target_id;  seq2.entry_id;   end
Also aliased as: hit_id
target_len() click to toggle source

length of the hit(target) sequence

# File lib/bio/appl/sim4/report.rb, line 454
def target_len; seq2.len;        end
Also aliased as: len