rbbt-rest 1.8.7 → 1.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/rest/entity.rb +5 -5
- data/lib/rbbt/rest/helpers.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cff29021a179c10bc6cc157b4b68c167f0d0cbce
|
4
|
+
data.tar.gz: bd58e81210656647a893ce423b3afacd1959f36a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3813b05fb8974c6b8ca3141bd0f2eb7108f8e979e68f932a888dc9ce8c9e505c978120037e11e2d9a4087bf2bcd1c21056aff5f95b941c9425b11c1de6d84d6a
|
7
|
+
data.tar.gz: eb7519b674f9c552f771d6fcd7f4ac75c8a244820a28820c80b5c42742d0b7fb1b0138727fd3a5a23439a88a9430884ac1c62f68279f363f77a277e7eb95814f
|
data/lib/rbbt/rest/entity.rb
CHANGED
@@ -293,7 +293,6 @@ module Sinatra
|
|
293
293
|
when :name
|
294
294
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, user)
|
295
295
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, nil) unless File.exists? file
|
296
|
-
#new = TSVWorkflow.job(:swap_id, "Map #{ map_id }", :format => "Associated Gene Name", :tsv => TSV.open(file)).exec
|
297
296
|
new = TSV.open(file).change_key "Associated Gene Name"
|
298
297
|
new_id = map_id << " [Names]"
|
299
298
|
Entity::Map.save_map(entity_type, column, new_id, new, user)
|
@@ -301,7 +300,7 @@ module Sinatra
|
|
301
300
|
when :ensembl
|
302
301
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, user)
|
303
302
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, nil) unless File.exists? file
|
304
|
-
new =
|
303
|
+
new = TSV.open(file).change_key "Ensembl Gene ID"
|
305
304
|
new_id = map_id << " [Ensembl]"
|
306
305
|
Entity::Map.save_map(entity_type, column, new_id, new, user)
|
307
306
|
redirect to(Entity::REST.entity_map_url(new_id, entity_type, column))
|
@@ -323,7 +322,7 @@ module Sinatra
|
|
323
322
|
when :ranks
|
324
323
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, user)
|
325
324
|
file = Entity::Map.map_file(entity_type.split(":").first, column, map_id, nil) unless File.exists? file
|
326
|
-
tsv = TSV.open(file)
|
325
|
+
tsv = TSV.open(file, :cast => :to_f)
|
327
326
|
new = tsv.ranks_for(tsv.fields.first)
|
328
327
|
new_id = map_id << " [Ranks]"
|
329
328
|
column = 'Ranks'
|
@@ -411,13 +410,14 @@ module Sinatra
|
|
411
410
|
file1 = Entity::Map.map_file(entity_type.split(":").first, column, map1, user)
|
412
411
|
file1 = Entity::Map.map_file(entity_type.split(":").first, column, map1, nil) unless File.exists? file1
|
413
412
|
raise "Map not found: #{ map1 }" unless File.exists? file1
|
414
|
-
tsv1 = TSV.open(file1)
|
413
|
+
tsv1 = TSV.open(file1, :cast => :to_f)
|
415
414
|
|
416
415
|
file2 = Entity::Map.map_file(entity_type.split(":").first, column2, map2, user)
|
417
416
|
file2 = Entity::Map.map_file(entity_type.split(":").first, column2, map2, nil) unless File.exists? file2
|
418
417
|
raise "Map not found: #{ map2 } - #{ file2 }" unless File.exists? file2
|
419
|
-
tsv2 = TSV.open(file2)
|
418
|
+
tsv2 = TSV.open(file2, :cast => :to_f)
|
420
419
|
|
420
|
+
tsv1 = tsv1.select :key => tsv2.keys
|
421
421
|
tsv1.attach tsv2, :fields => tsv2.fields
|
422
422
|
|
423
423
|
new = TSV.setup(tsv1.rank_product(tsv1.fields), :key_field => tsv1.key_field, :fields => ["Log rank-product"], :type => :single, :cast => :to_f)
|
data/lib/rbbt/rest/helpers.rb
CHANGED
@@ -45,7 +45,7 @@ module Sinatra
|
|
45
45
|
parts = name.split("_")
|
46
46
|
hash = parts.pop
|
47
47
|
clean_name = parts * "_"
|
48
|
-
"<span class='name' jobname='#{ name }'>#{ clean_name }</span
|
48
|
+
"<span class='name' jobname='#{ name }'>#{ clean_name }</span> <span class='hash'>#{ hash }</span>"
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-rest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|