lib/bio/appl/genscan/report.rb in bio-1.2.1 vs lib/bio/appl/genscan/report.rb in bio-1.3.0
- old
+ new
@@ -3,11 +3,11 @@
#
# Copyright:: Copyright (C) 2003
# Mitsuteru C. Nakao <n@bioruby.org>
# License:: The Ruby License
#
-# $Id: report.rb,v 1.10 2007/04/05 23:35:39 trevor Exp $
+# $Id:$
#
# == Description
#
#
# == Example
@@ -73,11 +73,11 @@
@length = nil
@gccontent = nil
@isochore = nil
@matrix = nil
- report.each("\n") do |line|
+ report.each_line("\n") do |line|
case line
when /^GENSCAN/
parse_headline(line)
when /^Sequence/
parse_sequence(line)
@@ -92,10 +92,10 @@
i = report.index(/^Predicted gene/)
j = report.index(/^Predicted peptide sequence/)
# genes/exons
genes_region = report[i...j]
- genes_region.each("\n") do |line|
+ genes_region.each_line("\n") do |line|
if /Init|Intr|Term|PlyA|Prom|Sngl/ =~ line
gn, en = line.strip.split(" +")[0].split(/\./).map {|i| i.to_i }
add_exon(gn, en, line)
end
end