[BioRuby-cvs] bioruby/lib/bio/appl/blat report.rb,1.1,1.2

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


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

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


Index: report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/blat/report.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** report.rb	13 Oct 2004 16:52:26 -0000	1.1
--- report.rb	8 Sep 2005 01:22:09 -0000	1.2
***************
*** 44,86 ****
            end
          end
! 	@columns = parse_header(head)
        end
        attr_reader :hits, :columns
  
        def parse_header(ary)
! 	ary.shift # first line is removed
! 	a0 = ary.collect { |x| x.split(/\t/) }
! 	k = []
! 	a0.each do |x|
! 	  x.each_index do |i|
! 	    y = x[i].strip
! 	    k[i] = k[i].to_s + (y.sub!(/\-\z/, '') ? y : y + ' ')
! 	  end
! 	end
! 	k.each { |x| x.strip! }
! 	k
        end
        private :parse_header
  
        class SeqDesc
! 	def initialize(gap_count, gap_bases, name, size,
! 		       st, ed, starts, seqs)
! 	  @gap_count = gap_count.to_i
! 	  @gap_bases = gap_bases.to_i
! 	  @name = name
! 	  @size = size.to_i
! 	  @start = st.to_i
! 	  @end = ed.to_i
! 	  @starts = starts.collect { |x| x.to_i }
! 	  @seqs = seqs
! 	end
! 	attr_reader :gap_count, :gap_bases,
! 	  :name, :size, :start, :end, :starts, :seqs
        end #class SeqDesc
  
        class SegmentPair
! 	def initialize(query_len, strand,
                         blksize, qstart, tstart, qseq, tseq)
! 	  @blocksize  = blksize
            @qseq       = qseq
            @hseq       = hseq
--- 44,86 ----
            end
          end
!         @columns = parse_header(head)
        end
        attr_reader :hits, :columns
  
        def parse_header(ary)
!         ary.shift # first line is removed
!         a0 = ary.collect { |x| x.split(/\t/) }
!         k = []
!         a0.each do |x|
!           x.each_index do |i|
!             y = x[i].strip
!             k[i] = k[i].to_s + (y.sub!(/\-\z/, '') ? y : y + ' ')
!           end
!         end
!         k.each { |x| x.strip! }
!         k
        end
        private :parse_header
  
        class SeqDesc
!         def initialize(gap_count, gap_bases, name, size,
!                        st, ed, starts, seqs)
!           @gap_count = gap_count.to_i
!           @gap_bases = gap_bases.to_i
!           @name = name
!           @size = size.to_i
!           @start = st.to_i
!           @end = ed.to_i
!           @starts = starts.collect { |x| x.to_i }
!           @seqs = seqs
!         end
!         attr_reader :gap_count, :gap_bases,
!           :name, :size, :start, :end, :starts, :seqs
        end #class SeqDesc
  
        class SegmentPair
!         def initialize(query_len, strand,
                         blksize, qstart, tstart, qseq, tseq)
!           @blocksize  = blksize
            @qseq       = qseq
            @hseq       = hseq
***************
*** 106,111 ****
              @hit_to     = tstart + blksize # - 1 + 1
            end
! 	end
! 	attr_reader :query_from, :query_to, :qseq, :query_strand
          attr_reader :hit_from,   :hit_to,   :hseq, :hit_strand
          attr_reader :blocksize
--- 106,111 ----
              @hit_to     = tstart + blksize # - 1 + 1
            end
!         end
!         attr_reader :query_from, :query_to, :qseq, :query_strand
          attr_reader :hit_from,   :hit_to,   :hseq, :hit_strand
          attr_reader :blocksize
***************
*** 157,161 ****
              @block_sizes = split_comma(@data[18]).collect { |x| x.to_i }
            end
! 	  @block_sizes
          end
  
--- 157,161 ----
              @block_sizes = split_comma(@data[18]).collect { |x| x.to_i }
            end
!           @block_sizes
          end
  



More information about the bioruby-cvs mailing list