Class: QSEQ

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

Overview

QSEQ record

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

#length

Constructor Details

#initialize(args = {}) ⇒ QSEQ

Returns a new instance of QSEQ.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/dna/parsers/qseq.rb', line 35

def initialize(args={})
  # These are the properties defined by the qseq spec
  # they must be in the same order that they appear in the tab-separated qseq file
  @properties = :machine, :run, :lane, :tile, :x, :y, :index, :read_no, :sequence, :quality, :filtered
  @machine = args[:machine]
  @run = args[:run]
  @lane = args[:lane]
  @tile = args[:tile]
  @x = args[:x]
  @y = args[:y]
  @index = args[:index]
  @read_no = args[:read_no]
  @sequence = args[:sequence]
  @quality = args[:quality]
  @filtered = args[:filtered]
end

Instance Attribute Details

#filteredObject

Returns the value of attribute filtered.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def filtered
  @filtered
end

#indexObject

Returns the value of attribute index.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def index
  @index
end

#laneObject

Returns the value of attribute lane.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def lane
  @lane
end

#machineObject

Returns the value of attribute machine.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def machine
  @machine
end

#qualityObject

Returns the value of attribute quality.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def quality
  @quality
end

#read_noObject

Returns the value of attribute read_no.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def read_no
  @read_no
end

#runObject

Returns the value of attribute run.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def run
  @run
end

#sequenceObject

Returns the value of attribute sequence.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def sequence
  @sequence
end

#tileObject

Returns the value of attribute tile.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def tile
  @tile
end

#xObject

Returns the value of attribute x.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def x
  @x
end

#yObject

Returns the value of attribute y.



33
34
35
# File 'lib/dna/parsers/qseq.rb', line 33

def y
  @y
end

Instance Method Details

#headerObject



56
57
58
# File 'lib/dna/parsers/qseq.rb', line 56

def header
  @properties.collect { |x| self.send(x) }.join("\t")
end

#to_sObject



52
53
54
# File 'lib/dna/parsers/qseq.rb', line 52

def to_s
  @properties.collect { |x| self.send(x) }.join("\t")
end