Sequence segment pair of Spidey result. Similar to Bio::Blast::Report::Hsp but lacks many methods. For mRNA-genome mapping programs, unlike other homology search programs, the class is used not only for exons but also for introns. (Note that intron data would not be available according to run-time options of the program.)
Returns amino acide sequence in alignment. Returns String, because white spaces is also important. Returns nil if no alignment data are available.
Returns alignment length of the segment pair. Returns nil if no alignment data are available.
Returns segment informations of the 'Genomic'. Returns a Bio::Spidey::Report::Segment object. This would be a Bio::Spidey specific method.
Returns the middle line of the alignment of the segment pair. Returns nil if no alignment data are available.
Returns segment informations of the 'mRNA'. Returns a Bio::Spidey::Report::Segment object. This would be a Bio::Spidey specific method.
Returns splice site information. Returns a hash which contains :d and :a for keys and 0, 1, or nil for values. This would be a Bio::Spidey specific methods.
Creates a new SegmentPair object. It is designed to be called from Bio::Spidey::Report::* classes. Users shall not call it directly.
# File lib/bio/appl/spidey/report.rb, line 125 def initialize(genomic, mrna, midline, aaseqline, percent_identity, mismatches, gaps, splice_site, align_len) @genomic = genomic @mrna = mrna @midline = midline @aaseqline = aaseqline @percent_identity = percent_identity @mismaches = mismatches @gaps = gaps @splice_site = splice_site @align_len = align_len end
Creates a new SegmentPair object when the segment pair is an intron. It is designed to be called internally from Bio::Spidey::Report::* classes. Users shall not call it directly.
# File lib/bio/appl/spidey/report.rb, line 182 def self.new_intron(from, to, strand, aln) genomic = Segment.new(from, to, strand, aln[0]) mrna = Segment.new(nil, nil, nil, aln[2]) midline = aln[1] aaseqline = aln[3] self.new(genomic, mrna, midline, aaseqline, nil, nil, nil, nil, nil) end
Parses a piece of Spidey result text and creates a new SegmentPair object. It is designed to be called internally from Bio::Spidey::Report::* classes. Users shall not call it directly.
# File lib/bio/appl/spidey/report.rb, line 196 def self.parse(str, strand, complement, aln) /\AExon\s*\d+(\(\-\))?\:\s*(\d+)\-(\d+)\s*\(gen\)\s+(\d+)\-(\d+)\s*\(mRNA\)\s+id\s*([\d\.]+)\s*\%\s+mismatches\s+(\d+)\s+gaps\s+(\d+)\s+splice site\s*\(d +a\)\s*\:\s*(\d+)\s+(\d+)/ =~ str if strand == 'minus' then genomic = Segment.new($3, $2, strand, aln[0]) else genomic = Segment.new($2, $3, 'plus', aln[0]) end if complement then mrna = Segment.new($4, $5, 'minus', aln[2]) else mrna = Segment.new($4, $5, 'plus', aln[2]) end percent_identity = $6 mismatches = ($7 ? $7.to_i : nil) gaps = ($8 ? $8.to_i : nil) splice_site = { :d => ($9 ? $9.to_i : nil), :a => ($10 ? $10.to_i : nil) } midline = aln[1] aaseqline = aln[3] self.new(genomic, mrna, midline, aaseqline, percent_identity, mismatches, gaps, splice_site, (midline ? midline.length : nil)) end
Returns start position of the genomic (target, hit) (the first position is 1).
# File lib/bio/appl/spidey/report.rb, line 243 def hit_from; @genomic.from; end
Returns strand information of the genomic (target, hit). Returns 'plus', 'minus', or nil.
# File lib/bio/appl/spidey/report.rb, line 254 def hit_strand; @genomic.strand; end
Returns end position (including its position) of the genomic (target, hit).
# File lib/bio/appl/spidey/report.rb, line 247 def hit_to; @genomic.to; end
Returns the sequence (with gaps) of the genomic (target, hit).
# File lib/bio/appl/spidey/report.rb, line 250 def hseq; @genomic.seq; end
Returns the sequence (with gaps) of the mRNA (query).
# File lib/bio/appl/spidey/report.rb, line 235 def qseq; @mrna.seq; end
Returns start position of the mRNA (query) (the first position is 1).
# File lib/bio/appl/spidey/report.rb, line 229 def query_from; @mrna.from; end
Generated with the Darkfish Rdoc Generator 2.