iroki 0.0.33 → 0.0.34

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df837c589f22bbd555fb6a8afe7571524777cf14
4
- data.tar.gz: 6e9dc756c45e1b2916541c0a00168dcf0be57220
3
+ metadata.gz: ccdbbf04cbd02148f66cc862d584cb00e54c3793
4
+ data.tar.gz: 30d00c03802e3925167e41c5022519b1d1e7ba49
5
5
  SHA512:
6
- metadata.gz: b0fe9ffa5da9eba6812aaac4281ac4eabac97f813b3d61138784379d2ace0e2baf8c29a200488336219cc814136014e68bc01634ddd80e0f38fc2033646f9588
7
- data.tar.gz: 1270cc9ede4186ba4c191085ab776a6e5cc7a9f97cd3710c91db92ef39584ba436f0a6c4d8b0e01e2aaabd3f193a84e935c29b93d21b178a82d173afc588c174
6
+ metadata.gz: aa18e7831cc7bb1eebb4a0d282ed5a67f040afbb59bb886820df35090c03ecd243226bd7def3679ffd6acdab76089f2a9ca56e1c0a0fd868336b0c7174a15567
7
+ data.tar.gz: 0f44b3a502cfeb5c59703dedf384813128992bdf1589f7afe59568fbcb1193472a3285f5641ab6f9bcb0807801138c7913872f87922f75d9364719e82db85b9f
@@ -252,6 +252,10 @@ module Iroki
252
252
  name_map_f.nil?,
253
253
  "Newick file was given but no other files were given")
254
254
 
255
+ abort_if biom_f && !exact,
256
+ "Regex matching cannot be used with a biom file. " +
257
+ "Pass the --exact flag"
258
+
255
259
  # treeio = Bio::FlatFile.open(Bio::Newick, newick)
256
260
 
257
261
  # newick = treeio.next_entry
@@ -285,11 +289,11 @@ module Iroki
285
289
  #################################################################
286
290
  # get color patterns
287
291
  ####################
288
- if color_map_f && biom_f
289
- color_map_patterns = parse_color_map_iroki color_map_f,
290
- iroki_to_name,
291
- exact_matching: exact,
292
- auto_color: auto_color_hash
292
+ if biom_f
293
+ abort_if single_color,
294
+ "--single-color is not compatible with a two " +
295
+ "group biom file. Please remove that option."
296
+
293
297
  samples, counts, is_single_group = Biom.open(biom_f, "rt").parse
294
298
 
295
299
  if is_single_group
@@ -299,6 +303,9 @@ module Iroki
299
303
  min_lumin,
300
304
  max_lumin).patterns
301
305
  else
306
+ # abort_if single_color,
307
+ # "--single-color is incompatible with a two group biom file, please remove it."
308
+
302
309
  g1_counts = counts.map(&:first)
303
310
  g2_counts = counts.map(&:last)
304
311
  biom_patterns = TwoGroupGradient.new(samples,
@@ -307,6 +314,13 @@ module Iroki
307
314
  min_lumin,
308
315
  max_lumin).patterns
309
316
  end
317
+ end
318
+
319
+ if color_map_f && biom_f
320
+ color_map_patterns = parse_color_map_iroki color_map_f,
321
+ iroki_to_name,
322
+ exact_matching: exact,
323
+ auto_color: auto_color_hash
310
324
 
311
325
  # these patterns have the original name for the key, so change
312
326
  # the key to the iroki name
@@ -337,23 +351,7 @@ module Iroki
337
351
  exact_matching: exact,
338
352
  auto_color: auto_color_hash
339
353
  elsif biom_f
340
- samples, counts, is_single_group = Biom.open(biom_f, "rt").parse
341
-
342
- if is_single_group
343
- patterns = SingleGroupGradient.new(samples,
344
- counts,
345
- single_color,
346
- min_lumin,
347
- max_lumin).patterns
348
- else
349
- g1_counts = counts.map(&:first)
350
- g2_counts = counts.map(&:last)
351
- patterns = TwoGroupGradient.new(samples,
352
- g1_counts,
353
- g2_counts,
354
- min_lumin,
355
- max_lumin).patterns
356
- end
354
+ patterns = biom_patterns
357
355
 
358
356
  # these patterns have the original name for the key, so change
359
357
  # the key to the iroki name
@@ -18,7 +18,7 @@
18
18
 
19
19
  # Library metadata
20
20
  module Iroki
21
- VERSION = "0.0.33"
21
+ VERSION = "0.0.34"
22
22
  COPYRIGHT = "2015 - 2017 Ryan Moore"
23
23
  CONTACT = "moorer@udel.edu"
24
24
  WEBSITE = "https://github.com/mooreryan/iroki"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iroki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Moore
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-28 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler