Class: QSEQParser

Inherits:
Object
  • Object
show all
Defined in:
lib/dna/parsers/qseq.rb

Instance Method Summary collapse

Constructor Details

#initialize(handle) ⇒ QSEQParser

Returns a new instance of QSEQParser.



3
4
5
# File 'lib/dna/parsers/qseq.rb', line 3

def initialize(handle)
  @handle = handle
end

Instance Method Details

#eachObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/dna/parsers/qseq.rb', line 7

def each
  @handle.each do |line|
    line = line.strip.split("\t")
    record = QSEQ.new(
      :machine => line[0],
      :run => line[1],
      :lane => line[2],
      :tile => line[3],
      :x => line[4],
      :y => line[5],
      :index => line[6],
      :read_no => line[7],
      :sequence => line[8],
      :quality => line[9],
      :filtered => line[10]
    )
    yield record
  end
end