rbbt-marq 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -189,7 +189,7 @@ def goterms(org, list, slim, threshold)
189
189
  results.
190
190
  select{|info| info["S"].to_i > 2 }.
191
191
  select{|info| info["Hyp_c"].to_f < threshold }.
192
- collect{|info| info["Items"]}.collect{|id| GO::id2name(id)}
192
+ collect{|info| info["Items"].first }.collect{|id| GO::id2name(id)}
193
193
  end
194
194
 
195
195
  task 'annotate_GO' do
@@ -37,35 +37,6 @@ class String
37
37
  end
38
38
  end
39
39
 
40
- class Array
41
- def count_smaller(value)
42
- size = self.length
43
-
44
- low = 0
45
- last = size - 1
46
- hi = size - 1
47
- pos = size / 2
48
- while true
49
- case
50
- when value == self[pos]
51
- return pos
52
- when pos == last && self[pos] < value
53
- return size
54
- when pos == 0 && value <= self[pos]
55
- return 0
56
- when self[pos] < value && value < self[pos + 1]
57
- return pos + 1
58
- when value < self[pos]
59
- hi = pos
60
- pos = (pos - low) / 2 + low
61
- when self[pos] < value
62
- low = pos
63
- pos = (hi - pos) / 2 + pos + 1
64
- end
65
- end
66
- end
67
- end
68
-
69
40
 
70
41
  require 'DBcache'
71
42
 
@@ -1,4 +1,4 @@
1
- require 'MARQ'
1
+ require 'MARQ/util'
2
2
  require 'MARQ/main'
3
3
  module RankProduct
4
4
  def self.ranks(dataset, experiment , from_FC = false, invert = false)
@@ -1,4 +1,5 @@
1
1
  require 'png'
2
+ require 'MARQ/util'
2
3
  require 'inline'
3
4
 
4
5
  module Score
@@ -0,0 +1,30 @@
1
+ class Array
2
+ def count_smaller(value)
3
+ size = self.length
4
+
5
+ low = 0
6
+ last = size - 1
7
+ hi = size - 1
8
+ pos = size / 2
9
+ while true
10
+ case
11
+ when value == self[pos]
12
+ return pos
13
+ when pos == last && self[pos] < value
14
+ return size
15
+ when pos == 0 && value <= self[pos]
16
+ return 0
17
+ when self[pos] < value && value < self[pos + 1]
18
+ return pos + 1
19
+ when value < self[pos]
20
+ hi = pos
21
+ pos = (pos - low) / 2 + low
22
+ when self[pos] < value
23
+ low = pos
24
+ pos = (hi - pos) / 2 + pos + 1
25
+ end
26
+ end
27
+ end
28
+ end
29
+
30
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-marq
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-09 00:00:00 +01:00
12
+ date: 2010-04-11 00:00:00 +02:00
13
13
  default_executable: marq_config
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -324,6 +324,7 @@ files:
324
324
  - lib/MARQ/main.rb
325
325
  - lib/MARQ/rankproduct.rb
326
326
  - lib/MARQ/score.rb
327
+ - lib/MARQ/util.rb
327
328
  - tasks/install.rake
328
329
  - LICENSE
329
330
  - README.rdoc