Class | Bio::Spidey::Report::Hit
In: | lib/bio/appl/spidey/report.rb
Parent: | Object

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

### Methods

align complement? definition each exons genomic hit_id hsps introns len missing_mrna_ends mrna new number_of_exons number_of_splice_sites percent_identity query_def query_id query_len segmentpairs strand target_def target_id target_len

### Public Class methods

new(data, d0)

Creates a new Hit object. It is designed to be called internally from Bio::Spidey::Report::* classes. Users shall not call it directly.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 290
    290:         def initialize(data, d0)
    291:           @data = data
    292:           @d0 = d0
    293:         end

### Public Instance methods

align()

Returns alignments. Returns an Array of arrays. This would be a Bio::Spidey specific method.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 465
    465:         def align
    466:           unless defined?(@align); parse_align; end
    467:           @align
    468:         end

complement?()

Returns true if the result reports ‘Reverse complement’. Otherwise, return false or nil. This would be a Bio::Spidey specific method.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 330
    330:         def complement?
    331:           unless defined?(@complement); parse_strand; end
    332:           @complement
    333:         end

definition()

Alias for target_def

each() {|segmentpair| ...}

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

[Source]

         # File lib/bio/appl/spidey/report.rb, line 555
    555:         def each(&x) #:yields: segmentpair
    556:           exons.each(&x)
    557:         end

exons()

Returns exons of the hit. Returns an array of Bio::Spidey::Report::SegmentPair object.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 437
    437:         def exons
    438:           unless defined?(@exons); parse_segmentpairs; end
    439:           @exons
    440:         end

genomic()

Returns sequence informations of the ‘Genomic’. Returns a Bio::Spidey::Report::SeqDesc object. This would be a Bio::Spidey specific method.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 373
    373:         def genomic
    374:           unless defined?(@genomic)
    375:             @genomic = SeqDesc.parse(@d0.find { |x| /^Genomic\:/ =~ x })
    376:           end
    377:           @genomic
    378:         end

hit_id()

Alias for target_id

hsps()

Alias for exons

introns()

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

[Source]

         # File lib/bio/appl/spidey/report.rb, line 447
    447:         def introns
    448:           unless defined?(@introns); parse_segmentpairs; end
    449:           @introns
    450:         end

len()

Alias for target_len

missing_mrna_ends()

Returns missing mRNA ends of the hit.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 363
    363:         def missing_mrna_ends
    364:           unless defined?(@missing_mrna_ends)
    365:             @missing_mrna_ends = field_fetch('Missing mRNA ends', @d0)
    366:           end
    367:           @missing_mrna_ends
    368:         end

mrna()

Returns sequence informations of the mRNA. Returns a Bio::Spidey::Report::SeqDesc object. This would be a Bio::Spidey specific method.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 383
    383:         def mrna
    384:           unless defined?(@mrna)
    385:             @mrna = SeqDesc.parse(@d0.find { |x| /^mRNA\:/ =~ x })
    386:           end
    387:           @mrna
    388:         end

number_of_exons()

Returns number of exons in the hit.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 336
    336:         def number_of_exons
    337:           unless defined?(@number_of_exons)
    338:             @number_of_exons = field_fetch('Number of exons', @d0).to_i
    339:           end
    340:           @number_of_exons
    341:         end

number_of_splice_sites()

Returns number of splice sites of the hit.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 344
    344:         def number_of_splice_sites
    345:           unless defined?(@number_of_splice_sites)
    346:             @number_of_splice_sites =
    347:               field_fetch('Number of splice sites', @d0).to_i
    348:           end
    349:           @number_of_splice_sites
    350:         end

percent_identity()

Returns overall percent identity of the hit.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 353
    353:         def percent_identity
    354:           unless defined?(@percent_identity)
    355:             x = field_fetch('overall percent identity', @d0)
    356:             @percent_identity =
    357:               (/([\d\.]+)\s*\%/ =~ x.to_s) ? $1 : nil
    358:           end
    359:           @percent_identity
    360:         end

query_def()

Definition of the mRNA (query). Same as Bio::Spidey::Report#query_def.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 536
    536:         def query_def;  mrna.definition; end

query_id()

Identifier of the mRNA (query). Same as Bio::Spidey::Report#query_id.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 532
    532:         def query_id;   mrna.entry_id;   end

query_len()

Length of the mRNA (query) sequence. Same as Bio::Spidey::Report#query_len.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 528
    528:         def query_len;  mrna.len;        end

segmentpairs()

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

[Source]

         # File lib/bio/appl/spidey/report.rb, line 457
    457:         def segmentpairs
    458:           unless defined?(@segmentparis); parse_segmentpairs; end
    459:           @segmentpairs
    460:         end

strand()

Returns strand information of the hit. Returns ‘plus’, ‘minus’, or nil. This would be a Bio::Spidey specific method.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 322
    322:         def strand
    323:           unless defined?(@strand); parse_strand; end
    324:           @strand
    325:         end

target_def()

Definition of the genomic (target) sequence.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 545
    545:         def target_def; genomic.definition; end

target_id()

Identifier of the genomic (target) sequence.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 542
    542:         def target_id;  genomic.entry_id;   end

target_len()

The genomic (target) sequence length.

[Source]

         # File lib/bio/appl/spidey/report.rb, line 539
    539:         def target_len; genomic.len;        end

[Validate]