begin
seq_name = @io.gets.chomp!
seq = @io.gets.chomp!
- qual_name = @io.gets.chomp!
+ @io.gets
qual = @io.gets.chomp!
entry = Seq.new
# Method to initialize a FastqIndex object. For reading
# entries from file an _ios_ object must be supplied.
- def initialize(ios)
+ def initialize(ios = nil)
@ios = ios
@index = {}
@offset = 0
# Method to read from file a Fastq entry from an indexed position,
# and return the entry as a Seq object.
def get(seq_name)
- raise FastqError, "Sequence name: #{seq_name} not found in index." unless @index.has_key? seq_name
+ raise FastqError, "Sequence name: #{seq_name} not found in index." unless @index[seq_name]
elem = @index[seq_name]
@ios.sysseek(elem.offset_seq)