bio-ngs 0.4.6.alpha.02 → 0.4.7.alpha.02

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.6.alpha.02
1
+ 0.4.7.alpha.02
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bio-ngs"
8
- s.version = "0.4.6.alpha.01"
8
+ s.version = "0.4.7.alpha.02"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Francesco Strozzi", "Raoul J.P. Bonnal"]
12
- s.date = "2012-05-18"
12
+ s.date = "2012-05-25"
13
13
  s.description = "bio-ngs provides a framework for handling NGS data with BioRuby"
14
14
  s.email = "francesco.strozzi@gmail.com"
15
15
  s.executables = ["biongs"]
@@ -131,7 +131,7 @@ Gem::Specification.new do |s|
131
131
  s.homepage = "http://github.com/helios/bioruby-ngs"
132
132
  s.licenses = ["MIT"]
133
133
  s.require_paths = ["lib"]
134
- s.rubygems_version = "1.8.15"
134
+ s.rubygems_version = "1.8.10"
135
135
  s.summary = "bio-ngs provides a framework for handling NGS data with BioRuby"
136
136
 
137
137
  if s.respond_to? :specification_version then
@@ -21,7 +21,7 @@ module Bio
21
21
  end
22
22
  end
23
23
 
24
- module FastqGz
24
+ module FastqGz #TODO this module can be move in another namespace more generic
25
25
  require 'zlib'
26
26
  class << self
27
27
 
@@ -31,7 +31,7 @@ module Bio
31
31
  "json_class" => self.class.name,
32
32
  "name" => name,
33
33
  "sample_sheet" => sample_sheet,
34
- "samples" => samples.each_key.map{|k| samples[k].to_json }
34
+ "samples" => samples#each_key.map{|k| samples[k].to_json }
35
35
  }.to_json(*a)
36
36
  end
37
37
  end
@@ -12,6 +12,19 @@ module Bio
12
12
  metadata[:type]=:file
13
13
  metadata[:format]=:fastq
14
14
  end
15
+
16
+ def to_json(*a)
17
+ {
18
+ "json_class" => self.class.name,
19
+ "name" => name,
20
+ "metadata" => metadata
21
+ #{}"filenames" => filenames_paths
22
+ }.to_json(*a)
23
+ end
24
+
25
+ def self.json_create(o)
26
+ me = new(o["name"], o["metadata"]["path"],o["metadata"]["parent"])
27
+ end
15
28
  end #File
16
29
 
17
30
  class Sample < Meta::Pool
@@ -62,7 +75,7 @@ module Bio
62
75
  self.add MetaReads.new(SecureRandom.uuid, metadata)
63
76
  end
64
77
 
65
- #REMOVE # def get(tag=filtered)
78
+ #REMOVE # def get(tag=filtered)
66
79
  # @files.get(tag)
67
80
  # end
68
81
 
@@ -72,12 +85,17 @@ module Bio
72
85
  end.flatten
73
86
  end
74
87
 
75
- # def to_json(*a)
76
- # {
77
- # "json_class" => self.class.name,
78
- # "name" => name,
79
- # "filenames" => filenames_paths
80
- # }.to_json(*a)
88
+ def to_json(*a)
89
+ {
90
+ "json_class" => self.class.name,
91
+ "name" => name,
92
+ "metadata" => metadata,
93
+ "files" => pool
94
+ }.to_json(*a)
95
+ end
96
+
97
+ # def self.json_create(o)
98
+ # me = new(o["name"], o["metadata"]["path"],o["metadata"]["parent"])
81
99
  # end
82
100
  end #Sample
83
101
  end #Illumina
@@ -64,12 +64,24 @@ module Meta
64
64
  class Pool < Data
65
65
  include Enumerable
66
66
  # include Data
67
- attr_accessor :pool
67
+ attr_accessor :pool
68
68
  def initialize(name=SecureRandom.uuid)
69
69
  super(name)
70
70
  @pool = {}
71
71
  end
72
72
 
73
+ def to_json(*a)
74
+ {
75
+ "json_class" => self.class.name,
76
+ "name" => name,
77
+ "pool" => pool
78
+ #{}"filenames" => filenames_paths
79
+ }.to_json(*a)
80
+ end
81
+
82
+ def self.json_create(o)
83
+ me = new(o["name"], o["metadata"]["path"],o["metadata"]["parent"])
84
+ end
73
85
 
74
86
  def each &block
75
87
  @pool.each_pair{|name, member| block.call(member)}
@@ -97,14 +109,18 @@ module Meta
97
109
  @pool.keys
98
110
  end
99
111
 
100
- def get(name_or_tag_or_value=nil)
112
+ def get(name_or_tag_or_value, value=nil)
101
113
  # TODO implement recursive query or passing multiple values as hash, insercet or etc.....
102
114
  # if name_or_tag_or_value.is_a? Hash
103
115
  # name_or_tag_or_value.each_pair do |tag, value|
104
116
  #
105
117
  # end
106
118
  # else
107
- get_by_name(name_or_tag_or_value) || get_by_tag(name_or_tag_or_value) || get_by_value(name_or_tag_or_value) || get_down_to_childer(name_or_tag_or_value)
119
+ if value
120
+ get_by_tag_and_value(name_or_tag_or_value, value)
121
+ else
122
+ get_by_name(name_or_tag_or_value) || get_by_tag(name_or_tag_or_value) || get_by_value(name_or_tag_or_value) || get_down_to_childer(name_or_tag_or_value)
123
+ end
108
124
  # end
109
125
  end #get
110
126
 
@@ -142,6 +158,9 @@ module Meta
142
158
  ret_pool unless ret_pool.empty?
143
159
  end
144
160
 
161
+
162
+
163
+
145
164
  private
146
165
  def get_generic(type, data)
147
166
  ret_pool = Pool.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-ngs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6.alpha.02
4
+ version: 0.4.7.alpha.02
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-21 00:00:00.000000000 Z
13
+ date: 2012-05-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bio
17
- requirement: &2153665000 !ruby/object:Gem::Requirement
17
+ requirement: &2152729020 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.4.2
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2153665000
25
+ version_requirements: *2152729020
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bio-samtools
28
- requirement: &2153664500 !ruby/object:Gem::Requirement
28
+ requirement: &2152728500 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 0.3.2
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2153664500
36
+ version_requirements: *2152728500
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: thor
39
- requirement: &2153795800 !ruby/object:Gem::Requirement
39
+ requirement: &2152727960 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - =
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.14.6
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2153795800
47
+ version_requirements: *2152727960
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rubyvis
50
- requirement: &2153795320 !ruby/object:Gem::Requirement
50
+ requirement: &2152727380 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 0.5.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2153795320
58
+ version_requirements: *2152727380
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: daemons
61
- requirement: &2153794840 !ruby/object:Gem::Requirement
61
+ requirement: &2152726800 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.1.0
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *2153794840
69
+ version_requirements: *2152726800
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: ruby-ensembl-api
72
- requirement: &2153794300 !ruby/object:Gem::Requirement
72
+ requirement: &2152726260 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.0.1
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2153794300
80
+ version_requirements: *2152726260
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: activerecord
83
- requirement: &2153793160 !ruby/object:Gem::Requirement
83
+ requirement: &2152725720 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 3.0.5
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *2153793160
91
+ version_requirements: *2152725720
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: sqlite3
94
- requirement: &2153791580 !ruby/object:Gem::Requirement
94
+ requirement: &2152725140 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: 1.3.3
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *2153791580
102
+ version_requirements: *2152725140
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: bio-blastxmlparser
105
- requirement: &2153790980 !ruby/object:Gem::Requirement
105
+ requirement: &2152740860 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :runtime
112
112
  prerelease: false
113
- version_requirements: *2153790980
113
+ version_requirements: *2152740860
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: progressbar
116
- requirement: &2153790500 !ruby/object:Gem::Requirement
116
+ requirement: &2152740240 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: 0.9.0
122
122
  type: :runtime
123
123
  prerelease: false
124
- version_requirements: *2153790500
124
+ version_requirements: *2152740240
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rake
127
- requirement: &2153789980 !ruby/object:Gem::Requirement
127
+ requirement: &2152739680 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - =
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: 0.9.2.2
133
133
  type: :runtime
134
134
  prerelease: false
135
- version_requirements: *2153789980
135
+ version_requirements: *2152739680
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: json
138
- requirement: &2153789440 !ruby/object:Gem::Requirement
138
+ requirement: &2152739120 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
@@ -143,10 +143,10 @@ dependencies:
143
143
  version: '0'
144
144
  type: :runtime
145
145
  prerelease: false
146
- version_requirements: *2153789440
146
+ version_requirements: *2152739120
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: parallel
149
- requirement: &2153788960 !ruby/object:Gem::Requirement
149
+ requirement: &2152738540 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ! '>='
@@ -154,10 +154,10 @@ dependencies:
154
154
  version: '0'
155
155
  type: :runtime
156
156
  prerelease: false
157
- version_requirements: *2153788960
157
+ version_requirements: *2152738540
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: shoulda
160
- requirement: &2153788480 !ruby/object:Gem::Requirement
160
+ requirement: &2152738020 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ! '>='
@@ -165,10 +165,10 @@ dependencies:
165
165
  version: '0'
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *2153788480
168
+ version_requirements: *2152738020
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: bundler
171
- requirement: &2153787960 !ruby/object:Gem::Requirement
171
+ requirement: &2152737500 !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
174
  - - ~>
@@ -176,10 +176,10 @@ dependencies:
176
176
  version: 1.1.0
177
177
  type: :development
178
178
  prerelease: false
179
- version_requirements: *2153787960
179
+ version_requirements: *2152737500
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: jeweler
182
- requirement: &2153846060 !ruby/object:Gem::Requirement
182
+ requirement: &2152736960 !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements:
185
185
  - - ~>
@@ -187,10 +187,10 @@ dependencies:
187
187
  version: 1.8.3
188
188
  type: :development
189
189
  prerelease: false
190
- version_requirements: *2153846060
190
+ version_requirements: *2152736960
191
191
  - !ruby/object:Gem::Dependency
192
192
  name: rcov
193
- requirement: &2153845580 !ruby/object:Gem::Requirement
193
+ requirement: &2152736400 !ruby/object:Gem::Requirement
194
194
  none: false
195
195
  requirements:
196
196
  - - ~>
@@ -198,10 +198,10 @@ dependencies:
198
198
  version: 0.9.11
199
199
  type: :development
200
200
  prerelease: false
201
- version_requirements: *2153845580
201
+ version_requirements: *2152736400
202
202
  - !ruby/object:Gem::Dependency
203
203
  name: bio
204
- requirement: &2153844960 !ruby/object:Gem::Requirement
204
+ requirement: &2152735800 !ruby/object:Gem::Requirement
205
205
  none: false
206
206
  requirements:
207
207
  - - ! '>='
@@ -209,10 +209,10 @@ dependencies:
209
209
  version: 1.4.2
210
210
  type: :development
211
211
  prerelease: false
212
- version_requirements: *2153844960
212
+ version_requirements: *2152735800
213
213
  - !ruby/object:Gem::Dependency
214
214
  name: thor
215
- requirement: &2153844140 !ruby/object:Gem::Requirement
215
+ requirement: &2152735180 !ruby/object:Gem::Requirement
216
216
  none: false
217
217
  requirements:
218
218
  - - =
@@ -220,10 +220,10 @@ dependencies:
220
220
  version: 0.14.6
221
221
  type: :development
222
222
  prerelease: false
223
- version_requirements: *2153844140
223
+ version_requirements: *2152735180
224
224
  - !ruby/object:Gem::Dependency
225
225
  name: ffi
226
- requirement: &2153843400 !ruby/object:Gem::Requirement
226
+ requirement: &2152734620 !ruby/object:Gem::Requirement
227
227
  none: false
228
228
  requirements:
229
229
  - - ! '>='
@@ -231,10 +231,10 @@ dependencies:
231
231
  version: 1.0.6
232
232
  type: :development
233
233
  prerelease: false
234
- version_requirements: *2153843400
234
+ version_requirements: *2152734620
235
235
  - !ruby/object:Gem::Dependency
236
236
  name: rubyvis
237
- requirement: &2153842920 !ruby/object:Gem::Requirement
237
+ requirement: &2152734120 !ruby/object:Gem::Requirement
238
238
  none: false
239
239
  requirements:
240
240
  - - ! '>='
@@ -242,10 +242,10 @@ dependencies:
242
242
  version: 0.5.0
243
243
  type: :development
244
244
  prerelease: false
245
- version_requirements: *2153842920
245
+ version_requirements: *2152734120
246
246
  - !ruby/object:Gem::Dependency
247
247
  name: rspec
248
- requirement: &2153842440 !ruby/object:Gem::Requirement
248
+ requirement: &2152733600 !ruby/object:Gem::Requirement
249
249
  none: false
250
250
  requirements:
251
251
  - - ! '>='
@@ -253,10 +253,10 @@ dependencies:
253
253
  version: 2.5.0
254
254
  type: :development
255
255
  prerelease: false
256
- version_requirements: *2153842440
256
+ version_requirements: *2152733600
257
257
  - !ruby/object:Gem::Dependency
258
258
  name: daemons
259
- requirement: &2153841880 !ruby/object:Gem::Requirement
259
+ requirement: &2152775800 !ruby/object:Gem::Requirement
260
260
  none: false
261
261
  requirements:
262
262
  - - ! '>='
@@ -264,10 +264,10 @@ dependencies:
264
264
  version: 1.1.0
265
265
  type: :development
266
266
  prerelease: false
267
- version_requirements: *2153841880
267
+ version_requirements: *2152775800
268
268
  - !ruby/object:Gem::Dependency
269
269
  name: bio-samtools
270
- requirement: &2153841380 !ruby/object:Gem::Requirement
270
+ requirement: &2152775280 !ruby/object:Gem::Requirement
271
271
  none: false
272
272
  requirements:
273
273
  - - ! '>='
@@ -275,10 +275,10 @@ dependencies:
275
275
  version: 0.3.2
276
276
  type: :development
277
277
  prerelease: false
278
- version_requirements: *2153841380
278
+ version_requirements: *2152775280
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: ruby-ensembl-api
281
- requirement: &2153840900 !ruby/object:Gem::Requirement
281
+ requirement: &2152774760 !ruby/object:Gem::Requirement
282
282
  none: false
283
283
  requirements:
284
284
  - - ! '>='
@@ -286,10 +286,10 @@ dependencies:
286
286
  version: 1.0.1
287
287
  type: :development
288
288
  prerelease: false
289
- version_requirements: *2153840900
289
+ version_requirements: *2152774760
290
290
  - !ruby/object:Gem::Dependency
291
291
  name: activerecord
292
- requirement: &2153840400 !ruby/object:Gem::Requirement
292
+ requirement: &2152774240 !ruby/object:Gem::Requirement
293
293
  none: false
294
294
  requirements:
295
295
  - - ! '>='
@@ -297,10 +297,10 @@ dependencies:
297
297
  version: 3.0.5
298
298
  type: :development
299
299
  prerelease: false
300
- version_requirements: *2153840400
300
+ version_requirements: *2152774240
301
301
  - !ruby/object:Gem::Dependency
302
302
  name: sqlite3
303
- requirement: &2153839920 !ruby/object:Gem::Requirement
303
+ requirement: &2152773740 !ruby/object:Gem::Requirement
304
304
  none: false
305
305
  requirements:
306
306
  - - ! '>='
@@ -308,10 +308,10 @@ dependencies:
308
308
  version: 1.3.3
309
309
  type: :development
310
310
  prerelease: false
311
- version_requirements: *2153839920
311
+ version_requirements: *2152773740
312
312
  - !ruby/object:Gem::Dependency
313
313
  name: bio-blastxmlparser
314
- requirement: &2153839360 !ruby/object:Gem::Requirement
314
+ requirement: &2152773180 !ruby/object:Gem::Requirement
315
315
  none: false
316
316
  requirements:
317
317
  - - ! '>='
@@ -319,10 +319,10 @@ dependencies:
319
319
  version: '0'
320
320
  type: :development
321
321
  prerelease: false
322
- version_requirements: *2153839360
322
+ version_requirements: *2152773180
323
323
  - !ruby/object:Gem::Dependency
324
324
  name: progressbar
325
- requirement: &2153838840 !ruby/object:Gem::Requirement
325
+ requirement: &2152772640 !ruby/object:Gem::Requirement
326
326
  none: false
327
327
  requirements:
328
328
  - - ! '>='
@@ -330,10 +330,10 @@ dependencies:
330
330
  version: 0.9.0
331
331
  type: :development
332
332
  prerelease: false
333
- version_requirements: *2153838840
333
+ version_requirements: *2152772640
334
334
  - !ruby/object:Gem::Dependency
335
335
  name: json
336
- requirement: &2153838360 !ruby/object:Gem::Requirement
336
+ requirement: &2152772040 !ruby/object:Gem::Requirement
337
337
  none: false
338
338
  requirements:
339
339
  - - ! '>='
@@ -341,10 +341,10 @@ dependencies:
341
341
  version: '0'
342
342
  type: :development
343
343
  prerelease: false
344
- version_requirements: *2153838360
344
+ version_requirements: *2152772040
345
345
  - !ruby/object:Gem::Dependency
346
346
  name: rake
347
- requirement: &2153897220 !ruby/object:Gem::Requirement
347
+ requirement: &2152770800 !ruby/object:Gem::Requirement
348
348
  none: false
349
349
  requirements:
350
350
  - - =
@@ -352,10 +352,10 @@ dependencies:
352
352
  version: 0.9.2.2
353
353
  type: :development
354
354
  prerelease: false
355
- version_requirements: *2153897220
355
+ version_requirements: *2152770800
356
356
  - !ruby/object:Gem::Dependency
357
357
  name: parallel
358
- requirement: &2153896700 !ruby/object:Gem::Requirement
358
+ requirement: &2152769720 !ruby/object:Gem::Requirement
359
359
  none: false
360
360
  requirements:
361
361
  - - ! '>='
@@ -363,7 +363,7 @@ dependencies:
363
363
  version: '0'
364
364
  type: :development
365
365
  prerelease: false
366
- version_requirements: *2153896700
366
+ version_requirements: *2152769720
367
367
  description: bio-ngs provides a framework for handling NGS data with BioRuby
368
368
  email: francesco.strozzi@gmail.com
369
369
  executables:
@@ -497,7 +497,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
497
497
  version: '0'
498
498
  segments:
499
499
  - 0
500
- hash: -1070352367343550027
500
+ hash: -2512494530563499590
501
501
  required_rubygems_version: !ruby/object:Gem::Requirement
502
502
  none: false
503
503
  requirements: