From: martinahansen Date: Tue, 6 Dec 2011 16:13:30 +0000 (+0000) Subject: fixed count bug in sff.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=f11f2030048211c753b725ad5535adaeb5e39e28;p=biopieces.git fixed count bug in sff.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1694 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/sff.rb b/code_ruby/lib/maasha/sff.rb index 0a9d2a1..f4c3931 100644 --- a/code_ruby/lib/maasha/sff.rb +++ b/code_ruby/lib/maasha/sff.rb @@ -35,8 +35,6 @@ BIT_MASK = (1 << BIT_SHIFT) - 1 class SFF include Enumerable - @@count = 0 - # Class method for opening SFF files. def self.open(*args) ios = File.open(*args) @@ -69,6 +67,7 @@ class SFF @flow_chars = "" @key_sequence = "" @eight_byte_padding = 0 + @count = 0 header_parse end @@ -127,7 +126,7 @@ class SFF # Method to parse a read section of an SFF file. def read_parse - return nil if @number_of_reads == @@count + return nil if @number_of_reads == @count template = "nnNnnnn" @@ -160,7 +159,7 @@ class SFF fast_forward - @@count += 1 + @count += 1 read end