dna 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/dna.rb +15 -5
  2. metadata +2 -2
data/lib/dna.rb CHANGED
@@ -17,7 +17,7 @@ class Dna # iterator
17
17
  when :qseq
18
18
  qseq_parser
19
19
  else
20
- raise "#{@type} not supported."
20
+ raise "#{@format} not supported."
21
21
  end
22
22
  end
23
23
 
@@ -138,13 +138,23 @@ end
138
138
  #2
139
139
  class QSEQ < Record
140
140
 
141
+ attr_accessor :machine, :run, :lane, :tile, :x, :y, :index, :read_no, :sequence, :quality, :filtered
142
+
141
143
  def initialize(args={})
142
144
  # These are the properties defined by the qseq spec
143
145
  # they must be in the same order that they appear in the tab-separated qseq file
144
- @properties = [:machine, :run, :lane, :tile, :x, :y, :index, :read_no, :sequence, :quality, :filtered]
145
- @properties.each do |p|
146
- self.class.send(:define_method, p) { args[p] }
147
- end
146
+
147
+ @machine = args[:machine]
148
+ @run = args[:run]
149
+ @lane = args[:lane]
150
+ @tile = args[:tile]
151
+ @x = args[:x]
152
+ @y = args[:y]
153
+ @index = args[:index]
154
+ @read_no = args[:read_no]
155
+ @sequence = args[:sequence]
156
+ @quality = args[:quality]
157
+ @filtered = args[:filtered]
148
158
  end
149
159
 
150
160
  def to_s
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dna
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2010-02-01 00:00:00.000000000 Z
12
+ date: 2010-02-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: for parsing various types of DNA sequence files
15
15
  email: harekrishna@gmail.com