[BioRuby-cvs] bioruby/lib/bio/appl/spidey report.rb,1.2,1.3

Katayama Toshiaki k at pub.open-bio.org
Wed Sep 7 21:22:12 EDT 2005


Update of /home/repository/bioruby/bioruby/lib/bio/appl/spidey
In directory pub.open-bio.org:/tmp/cvs-serv9021/lib/bio/appl/spidey

Modified Files:
	report.rb 
Log Message:
* expanded tab at the line head


Index: report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/spidey/report.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** report.rb	13 Oct 2004 16:53:03 -0000	1.2
--- report.rb	8 Sep 2005 01:22:10 -0000	1.3
***************
*** 33,41 ****
  
        def initialize(str)
! 	str = str.sub(/\A\s+/, '')
! 	str.sub!(/\n(^\-\-SPIDEY .*)/m, '')  # remove trailing entries for sure
! 	@entry_overrun = $1
! 	data = str.split(/\r?\n(?:\r?\n)+/)
! 	d0 = data.shift.to_s.split(/\r?\n/)
          @hit = Hit.new(data, d0)
          @all_hits = [ @hit ]
--- 33,41 ----
  
        def initialize(str)
!         str = str.sub(/\A\s+/, '')
!         str.sub!(/\n(^\-\-SPIDEY .*)/m, '')  # remove trailing entries for sure
!         @entry_overrun = $1
!         data = str.split(/\r?\n(?:\r?\n)+/)
!         d0 = data.shift.to_s.split(/\r?\n/)
          @hit = Hit.new(data, d0)
          @all_hits = [ @hit ]
***************
*** 58,68 ****
          attr_reader :entry_id, :definition, :len
  
! 	def self.parse(str)
! 	  /^(Genomic|mRNA)\:\s*(([^\s]*) (.+))\, (\d+) bp\s*$/ =~ str.to_s
! 	  seqid  = $3
            seqdef = $2
! 	  len    = ($5 ? $5.to_i : nil)
            self.new(seqid, seqdef, len)
! 	end
        end #class SeqDesc
  
--- 58,68 ----
          attr_reader :entry_id, :definition, :len
  
!         def self.parse(str)
!           /^(Genomic|mRNA)\:\s*(([^\s]*) (.+))\, (\d+) bp\s*$/ =~ str.to_s
!           seqid  = $3
            seqdef = $2
!           len    = ($5 ? $5.to_i : nil)
            self.new(seqid, seqdef, len)
!         end
        end #class SeqDesc
  
***************
*** 89,94 ****
            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)
--- 89,94 ----
            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)
***************
*** 96,100 ****
          
          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])
--- 96,100 ----
          
          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])
***************
*** 107,123 ****
              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
  
          # Bio::BLAST::*::Report::Hsp compatible methods
--- 107,123 ----
              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
  
          # Bio::BLAST::*::Report::Hsp compatible methods



More information about the bioruby-cvs mailing list