rbbt-rest 1.8.4 → 1.8.5

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: 6e2b9ecf9c546f18c529e7deffa7d8829339b943
4
- data.tar.gz: 1121811f2ea813adf3164fa8676b42c50eb4cc2e
3
+ metadata.gz: 3cf37f751208e4d5cbfc407fd164ae7e49022f17
4
+ data.tar.gz: 773c970644b6f15df0ad6bfed8b0f1893d74362b
5
5
  SHA512:
6
- metadata.gz: a1c5060636cb7383184b48de8b948cc67fc15ef7aba1961736b31d5ec8ed8ad069f04bd80de3f455a839d219dea07dfacd04ae8656cef49dd724248efecc280e
7
- data.tar.gz: dd39e56e9aedb3096d1ce1b1cb96d89a7682be237c23e458756baaf61d097d052187040e14189b6bf3b9d1339b6b9c39c06411c09de43f35b449177fefdb8280
6
+ metadata.gz: 1988193658bd442876356d325a0f1ac0e17aa69ee872d9f0600a18959dbffddf89761ed78c311be91298cca71c2596e03d567d3ccee58be0f7f34d499fc5abd4
7
+ data.tar.gz: 00d4e4a8a07de772cbc0e2ef145b52609710011f902a769113d30f1fa043c5ca28ff60d632410ce22da17bd345204a1be5489030a079e33340032b03a5fb3d10
@@ -244,8 +244,8 @@ module RbbtRESTHelpers
244
244
  def hash2dl(hash, options = {})
245
245
  entries = hash.collect{|k,v|
246
246
  v = v * ", " if Array === v
247
- html_tag(:dt, k) +
248
- html_tag(:dd, v)
247
+ v = hash2dl(v) if Hash === v
248
+ html_tag(:dt, k) + html_tag(:dd, v)
249
249
  } * "\n"
250
250
  html_tag(:dl, entries, options)
251
251
  end
@@ -283,6 +283,7 @@ module RbbtRESTHelpers
283
283
 
284
284
  Misc.prepare_entity(value, type, entity_options) if Entity.formats[type] and not options[:unnamed]
285
285
 
286
+ orig_value = value
286
287
  value = value.link if value.respond_to? :link and not options[:unnamed]
287
288
 
288
289
  if Array === value and value.length > 100
@@ -294,7 +295,7 @@ module RbbtRESTHelpers
294
295
  when true, "true", :true
295
296
  Array === value ? value.collect{|v| "<span class='table_value'>#{v.to_s}</span>"} * ", " : "<span class='table_value'>#{value}</span>"
296
297
  when :long, "long"
297
- Array === value ? value.collect{|v| "<span class='table_value long'>#{v.to_s}</span>"} * " " : "<span class='table_value long'>#{value}</span>"
298
+ Array === value ? value.zip(orig_value).collect{|v,ov| "<span class='table_value long' title='#{URI.escape(ov.to_s)}'>#{v.to_s}</span>"} * " " : "<span class='table_value long' title='#{URI.escape(orig_value)}'>#{value}</span>"
298
299
  else
299
300
  Array === value ? value.collect{|v| v.to_s} * ", " : value
300
301
  end
@@ -47,6 +47,10 @@ module KnowledgeBaseRESTHelpers
47
47
  kb.syndicate name, new
48
48
  end if KnowledgeBaseRESTHelpers.syndications.any?
49
49
 
50
+ user_studies[user].each do |study|
51
+ kb.syndicate study, study.knowledge_base
52
+ end
53
+
50
54
  kb
51
55
  end
52
56
  end
@@ -56,12 +56,3 @@ table > caption
56
56
  .filters + p
57
57
  margin-top: 2em
58
58
 
59
- .table_value
60
- white-space: nowrap
61
- &.strip
62
- font-weight: bold
63
- &.long
64
- overflow: hidden
65
- text-overflow: ellipsis
66
- float: left
67
- clear: left
@@ -114,11 +114,35 @@ body
114
114
  #footer
115
115
  display: none
116
116
 
117
+ table
118
+ td:after
119
+ content: ""
120
+ clear: both
121
+ display: block
122
+
123
+ .table_value
124
+ white-space: nowrap
125
+ &.strip
126
+ font-weight: bold
127
+ &.long
128
+ max-width: 40em
129
+ overflow: hidden
130
+ text-overflow: ellipsis
131
+ float: left
132
+ clear: left
133
+
117
134
  =small_screen
118
135
  table:not(.collapsing)
119
136
  caption
120
137
  width: 100%
121
138
 
139
+ .table_value.long
140
+ float: left
141
+ clear: none
142
+ margin-left: 0.5em
143
+ &:not(:last-child):after
144
+ content: ', '
145
+
122
146
 
123
147
  form.workflow_task
124
148
  .input.field.submit
@@ -187,7 +187,7 @@ label[title]
187
187
  clear: both
188
188
 
189
189
 
190
- .action_menu.ui.buttons
190
+ .action_menu.ui.buttons, .map_management.ui.buttons
191
191
  flex-wrap: wrap
192
192
 
193
193
  .flex-wrap
@@ -39,6 +39,6 @@
39
39
  = entity.action_link action, text, params.merge(:class => 'ui item button')
40
40
  - last_resource = resource
41
41
 
42
- .action_progress.ui.message
42
+ .action_progress.ui.info.message
43
43
 
44
44
  .action_loader.ui.very.basic.segment<
@@ -24,6 +24,35 @@
24
24
  - url = add_GET_param(@fullpath, '_format', 'pvalue_score')
25
25
  %a.ui.small.button(href=url) Pvalue score
26
26
 
27
+ = reveal "QQ-plot", nil, :class => 'ui small button plot' do
28
+ - pvalue = map.values.flatten.collect{|v| v.nil? or (String === v and v.empty?) ? nil : v.to_f}.compact.flatten
29
+ - pvalue = pvalue[0..100]
30
+ = resource map_id + '.qqplot.png', nil, :image do |file|
31
+ = fragment do
32
+ - FileUtils.mkdir_p File.dirname(file) unless File.exists? File.dirname(file)
33
+ :ruby
34
+ script =<<-EOF
35
+ library(ggplot2)
36
+ p = #{R.ruby2R pvalue}
37
+ ggd.qqplot = function(pvector, main=NULL, ...) {
38
+ Observed = -log10(sort(pvector,decreasing=F))
39
+ Expected = -log10( 1:length(Observed)/length(Observed) )
40
+ plot(Expected,Observed,pch=19,cex=1, ...,
41
+ xlim=c(0,max(Expected)), ylim=c(0,max(Observed)))
42
+ lines(Expected,Expected,col="red")
43
+ }
44
+ png(filename=#{R.ruby2R file})
45
+ ggd.qqplot(p)
46
+ #ggsave(file=#{R.ruby2R file}, plot, width=width, height=height);
47
+ EOF
48
+
49
+
50
+ - R.run script
51
+
52
+
53
+
54
+
55
+
27
56
  - if Gene == Entity.formats[map.key_field]
28
57
  - if map.key_field != "Ensembl Gene ID"
29
58
  - url = add_GET_param(@fullpath, '_format', 'ensembl')
@@ -6,7 +6,7 @@
6
6
  - table_class = table_options[:table_class] unless defined? table_class and table_class
7
7
  - header = table_options[:header] unless defined? header and header
8
8
  - row_ids = table_options[:row_ids] unless defined? row_ids and row_ids
9
- - row_ids = consume if row_ids and row_ids.to_s == "false"
9
+ - row_ids = :consume if row_ids and row_ids.to_s == "false"
10
10
  - table_url = table_options[:url] unless defined? table_url and table_url
11
11
  - total_size = table_options[:total_size] unless defined? total_size and total_size
12
12
  - filters = table_options[:filters] unless defined? filters and filters
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
4
+ version: 1.8.5
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-03-30 00:00:00.000000000 Z
11
+ date: 2016-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake