rbbt-util 5.17.61 → 5.17.62

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: 3b118eeecfa2079d442c02670893c6db20000987
4
- data.tar.gz: 6263e5906f7b7749f5ceaef1cfae1937c2bd7348
3
+ metadata.gz: 0a158c34f2f9f67c5542d0b7807872a862bd78a8
4
+ data.tar.gz: 6e824cbc978e3de48ee2a1e67ae426e8a9b11a80
5
5
  SHA512:
6
- metadata.gz: 10ac712ee0be37e90fd62ab1041fc58e198aa6eb90bf9563566a7e0c477f5dc9050303f0bcd7d49a1254ee1e3c4734686edf6c567a1c51c55814796059167ba7
7
- data.tar.gz: edd7f314041feff12c71c178c2c1da63d9c776132df668cd74917beb129f51f7243fa2b6aba127c2a2ab3efe013d51020fc6bd69759cd54f36f475aa68f6b7c3
6
+ metadata.gz: b4dad4beb5c8e9ff8c859eec4c57c629752a98374ffba4fa6557698d762754155113d25aab8079b43e39c9fbbfd01123bc9ddd87cc9d5867c10d28c10ec0768a
7
+ data.tar.gz: 14c900e1dd0e09f6895b83faf4e8c605cd890caf8e7f4ef6088e85169b2b29f4e0f409aebe2dad2350ddcd42195b39b9b7a4ca9b10de39d5ea90779906b7ac56
@@ -4,6 +4,12 @@ if ENV['RBBT_FINDER']
4
4
  organism = Organism.default_code("Hsa")
5
5
  finder.add_instance(KEGG.pathways, :grep => '^hsa\|^#', :fields => ["Pathway Name"], :namespace => organism, :fix => Proc.new{|l| l.sub(/ - Homo sapiens.*/,'')}) if defined? KEGG
6
6
  finder.add_instance(Organism.lexicon(organism), :persist => true, :namespace => organism, :grep => Organism.blacklist_genes(organism).list, :invert_grep => true) if defined? Organism
7
+
8
+ mutation_hash = {"Genomic Mutation" => /\w+:\d+:[ACTG\-\+]+/}
9
+ finder.add_instance(mutation_hash, :namespace => organism)
10
+
11
+ organism_hash = {"organism" => /[A-Z][a-z]{2}(?:\/[a-z]{3}20\d\d)?/}
12
+ finder.add_instance(organism_hash, :namespace => organism)
7
13
  end
8
14
  set :finder, finder
9
15
  Log.debug("Finder started with: #{finder.instances.length} instances")
@@ -154,7 +154,7 @@ module Resource
154
154
  content.call final_path
155
155
  end
156
156
  case data
157
- when String, IO
157
+ when String, IO, StringIO
158
158
  Misc.sensiblewrite(final_path, data)
159
159
  when Array
160
160
  Misc.sensiblewrite(final_path, data * "\n")
@@ -153,7 +153,9 @@ class WorkflowRESTClient
153
153
 
154
154
  def recursive_clean
155
155
  begin
156
- WorkflowRESTClient.get_raw(url, inputs.merge(:_update => :recursive_clean))
156
+ inputs = Array === self.inputs ? Hash[*self.inputs.flatten] : self.inputs
157
+ params = inputs.merge(:_update => :recursive_clean)
158
+ WorkflowRESTClient.get_raw(url, params)
157
159
  rescue Exception
158
160
  Log.exception $!
159
161
  end
@@ -162,7 +164,9 @@ class WorkflowRESTClient
162
164
 
163
165
  def clean
164
166
  begin
165
- WorkflowRESTClient.get_raw(url, inputs.merge(:_update => :clean))
167
+ inputs = Array === self.inputs ? Hash[*self.inputs.flatten] : self.inputs
168
+ params = inputs.merge(:_update => :clean)
169
+ WorkflowRESTClient.get_raw(url, params)
166
170
  rescue Exception
167
171
  Log.exception $!
168
172
  end
@@ -69,7 +69,7 @@ module Misc
69
69
  when Array === v
70
70
  v * ","
71
71
  else
72
- CGI.escape(v.to_s)
72
+ CGI.escape(v.to_s).gsub('%2F','/')
73
73
  end
74
74
  [ Symbol === k ? k.to_s : k, v] * "="
75
75
  }.compact * "&"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.17.61
4
+ version: 5.17.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake