rbbt-rest 1.2.34 → 1.2.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGY2MmY0MWQ5MDNkY2YyNDliMDYxZWI3MzU2ZTVlNDY0NThkYTZiMg==
4
+ ZTdlZWRiOGE3MmQyMjU0YTQxODM0ODM0NjZkNzE3ZmM5ZGI4MDMzZA==
5
5
  data.tar.gz: !binary |-
6
- MjQxMGM2ODA5MjA5NGEyMmIxYjZlNjllZTUyNjU2NjhmMzg0M2E3ZA==
6
+ MmNlODFmYTYwZTRlMWJjMTZmNzhkODUyOTkyZjNlYzIyNTBiMmQwNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzQ4OTk3MDYzMmE1YzViM2Y1ZmM5YzRhZTBiNjhlOGViYzE0NmQxOTU0MDk2
10
- NGRhNzI4YzlkMTNjZWQxNDA0Mzg4MWNlMDM0NzlkMmY2MzBhMzYyYWI0NmE1
11
- OWFmYTBjM2EyZDk5ZjY4NGU5MWQ2ODQ2MWUwNjIxMDI0Njk2MWQ=
9
+ NzM4NGU4MDc1OTJiYTM4NjI0Zjk3MDZjYzA1YWI0OWZhZGE4OTczOTgyM2Fj
10
+ ODAyOWY5MTYzZTNiNGFlNTY1YzliMDMxOWM1ZmRmMTZkZWVjZWVmN2YzNjkz
11
+ YzM1ZDBmZTg3YjczYThjMTIzMWJiMDgwZTFiYjBkZjljODgwOGU=
12
12
  data.tar.gz: !binary |-
13
- NWEzOTM5NjU3MjYxZGNjYjBlNGQxNjljZmQ3NjAyNGJmNjBhMDE0MjU4OTI5
14
- NjE3MjIzMGYzNTUxZTEwZWRiZjcxMDRjNjg4MTNlNWFmNzNlMjIwNjJhZTky
15
- ZjQzYzU4ZjIxMTU1OWU4MWQxOGE3OWQ1ZDBkOGZkMGZmNzNhY2I=
13
+ M2M5NjQ3MGYxNmZiYTBlNDdkMmE5MjViNjRkOTVkYWViNTg5ZDVkOGEwZjIw
14
+ YzQ4NzY3NGRmMThmOThhODMwYWJjMTNmNWNmM2FiMjJiNmU4ZjQ0MjczZjEz
15
+ YjdhZTJiNmYzNzI3NGFhYzkyOTRkYWRiZTVjOThmNGM5Zjg4MmI=
@@ -1,3 +1,23 @@
1
1
  a.help
2
2
  font-size: 1.2em
3
3
  display: block
4
+
5
+ .UI
6
+ dd
7
+ .description, .images
8
+ +grid-column(6, $float:left)
9
+
10
+ & > dd
11
+ +grid-row()
12
+ & > .description, .images
13
+ +grid-column(6, $float:left)
14
+
15
+
16
+ & > .images > dl
17
+ & > dt
18
+ width: 40%
19
+ & > dd > img
20
+ display: block
21
+ margin: auto
22
+
23
+
@@ -1,78 +1,59 @@
1
1
  :markdown
2
2
 
3
- Overview
4
- ========
3
+ ##Overview
5
4
 
6
5
  This application is designed for integration of data and functionalities.
7
6
  It design is based on the idea of the `Entity`: any thing that can be
8
7
  unambiguously identified and be subject of investigation. Examples of
9
8
  entities are: genes, proteins, SNPs, samples, pathways, etc.
10
9
 
11
- Each entity has a report, which depends on the type of entity it is.
12
- All reports are computed on the fly and cached. In addition to the main
13
- report, entities have `actions`, which are sub-reports that implement
14
- particular analysis. For instance, for gene entities, one of the actions
15
- is to display a summary of the relevance of that gene across the collection
16
- of studies that you have access to.
17
-
18
- ## Miscellaneous comments
19
-
20
- ### A word on performance
10
+ Each entity has a report, which depends on the type of entity it is. All
11
+ reports are computed on the fly and cached. In addition to the main reports,
12
+ entities have `actions`, which are sub-reports that implement particular
13
+ analysis. For instance, for gene entities, one of the actions is to display a
14
+ summary of the relevance of that gene across the collection of studies that
15
+ you have access to. In addition to entities, there are reports for lists of
16
+ entities and for entity maps, which are tables that relate entities to values,
17
+ such as genes to their average mutation frequency.
21
18
 
22
- This application is intended to allow interactive investigation. But be
23
- aware, some analysis are slow and will not feel that much interactive. Some
24
- process may require plenty of infrastructure: downloading of datasets,
25
- building databases, computing preliminary results, etc. A lot of this
26
- processing is reused system-wide. This means that the application starts slow
27
- but gets quicker. Unlike other applications with a more limited scope this
28
- system cannot foresee what the user will be interested in, so not all this
29
- infrastructure can be built before hand and must be built on demand. We pay
30
- a price for flexibility by sacrificing responsiveness. But the system has
31
- plenty of tricks to be as efficient as possible and to reuse as much as
32
- possible.
33
-
34
- ### Entity annotations
35
-
36
- The `Entity` subsystem annotates identifiers for entities with additional information
37
- to help their complete and unambiguous identification.
38
-
39
- #### Organisms and builds
40
-
41
- When you identify a gene with the string `TP53` we might think that the gene
42
- is unambiguously identified, however, it is not. First of all, we need to
43
- know to which organism this gene belongs to, each TP53 gene from different
44
- organisms is a different gene. Not only that, but the TP53 gene changes
45
- slightly from build to build, in particular, its chromosomal position may
46
- shift. For that reason genes are not only characterized by the organism they
47
- belong to but also by the version of the build we are considering.
48
-
49
- We annotate entities with their organism and build using the following
50
- convention. The organism is specified with a three letter code, the first is
51
- uppercase and is the first letter of the first term in the organism name ("H"
52
- for Homo) and the last two the first two letter of the second term ("sa" for
53
- sapiens); this is the convention followed by KeGG, it is succinct and
54
- collision free in our experience. The build is specified afterwards with a
55
- date code; "Hsa/may2009" represents the _Homo s._ organism as was known in
56
- May 2009 i.e. hg18 build; whereas "Hsa/jan2013" corresponds to a recent
57
- version of the hg19 build.
58
-
59
-
60
- #### Identifier formats
61
-
62
- Genes can be identified through a substantial number of identifier formats:
63
- Ensembl Gene ID, Entrez Gene ID, Associated Gene Name (gene symbol). We use
64
- the Ensembl BioMart to download an identifier translation resource. The name
65
- of the formats corresponds to the names used in the Ensembl BioMart and must
66
- be *followed to the letter including case*. The gene `Entity` is prepared to handle all the
67
- necessary translations between identifiers across different resources
68
- transparently. But the user *must* be aware of this fact or may run into
69
- trouble.
19
+ :markdown
20
+ ##User interface
70
21
 
22
+ The user interface offers a general structure for all reports that allows to
23
+ enact workflows, explore the results and connect functionalities with one
24
+ another. This web site is 'responsive', meaning that it adapts to the size
25
+ of the device you are using: computer, tablet, or phone. On small devices many
26
+ of the layout elements shift around or get hidden behind toggle buttons to
27
+ acomodate themselves better to the screen size. The examples bellow are taken
28
+ from a computer screen.
71
29
 
72
- %h2 Subsystems
73
- %ul
74
- %li
75
- %a(href='/help/entity' class="help") Entity subsystem
30
+ =partial_render('help/UI')
76
31
 
77
- %li
78
- %a(href='/help/workflow' class="help") Workflow subsystem
32
+ :markdown
33
+ ##Workflows
34
+
35
+ In addition to exploring entity reports, this site servers collections of
36
+ core functionalities through the Workflow subsystem. This is the same
37
+ interface that is used as a REST web server, so it serves to document it.
38
+
39
+
40
+ %table
41
+ %caption Available workflows on this site
42
+ %thead
43
+ %tr
44
+ %th Workflow
45
+ %th Description
46
+ %tbody
47
+ - Sinatra::RbbtRESTWorkflow::WORKFLOWS.each do |workflow|
48
+ - next if workflow.asynchronous_exports.empty? and workflow.synchronous_exports.empty? and workflow.exec_exports.empty?
49
+ %tr
50
+ %th
51
+ %a(href="#{'/' << workflow.to_s}")= Misc.humanize(workflow.to_s)
52
+ %td
53
+ - description = workflow.workflow_description || ""
54
+
55
+ - case
56
+ - when description.empty?
57
+ No description
58
+ - else
59
+ = description.split("\n\n").first
@@ -0,0 +1,250 @@
1
+ %dl.tabs.UI.active
2
+
3
+ %dt.next.active.show Report structure
4
+ %dd.show
5
+ .description
6
+ :markdown
7
+
8
+ This application presents reports for individual entities, lists of
9
+ entities, and entity maps. Each type of entity (gene, study, pathway, etc.)
10
+ has its own report template, and they are prepared on demand.
11
+
12
+ All reports have the same overall structure; the images show a report
13
+ for a genotyping study from the ICGC project. The top-bar is always
14
+ there and provides a placeholder for several functionalities, most
15
+ importantly the control of `favourites`.
16
+
17
+
18
+ Bellow the top-bar comes the report itself. It consists of a title, a
19
+ side-bar, a description, and an `action controller`. In general the
20
+ side-bar is used to show general meta-data about the entity and the
21
+ description to show a brief overview.
22
+
23
+ The action controller offers access to `actions` which are like
24
+ sub-reports. Each type of entity has its own actions. If the entity
25
+ type in particular does not have any action defined the action
26
+ controller will not be displayed. When an action is selected, it will
27
+ be displayed below, in the area called action loader.
28
+
29
+ Actions can also be opened in their own page, these pages are like reports
30
+ but with no action controller or side-bar
31
+
32
+ .images
33
+ %dl.tabs.active.show
34
+ %dt.next.show Snapshot
35
+ %dd.show
36
+ %img(src="/img/UI/report.png")
37
+
38
+ %dt.next Explanation
39
+ %dd
40
+ %img(src="/img/UI/report_wire.png")
41
+
42
+
43
+ %dt.next Top-bar
44
+ %dd
45
+ .description
46
+ :markdown
47
+
48
+ The top-bar provides access to several functionalities. Clicking on the
49
+ title of the application will link to its front-page.
50
+
51
+ Next to it is the reload-button, which is used to force the server to
52
+ recalculate a report, otherwise the report will be taken from a cache.
53
+ This is useful when a report has given an error or when when it was
54
+ updated somehow. *Note:* After a reload of the report, the browser might
55
+ still try to get the file from its own cache, so you might need to use
56
+ the reload button in the browser as well. I'm planning to fix this.
57
+
58
+ Next is the `favourites` controls, which we will discuss shortly. After
59
+ that there might be a search box, if the server was started with that
60
+ functionality. This search box can be configured to identify any type
61
+ of entity, but generally it is only genes.
62
+
63
+ The final component of the top-bar, which I label "Extra", has the user
64
+ controls, which allows to login or logout, and the job bookmarks,
65
+ where bookmarked actions are kept. Will discuss bookmarking actions
66
+ latter.
67
+
68
+ .images
69
+ %dl.tabs.active.show
70
+ %dt.next.show Snapshot
71
+ %dd.show
72
+ %img(src="/img/UI/topbar.png")
73
+
74
+ %dt.next Explanation
75
+ %dd
76
+ %img(src="/img/UI/topbar_wire.png")
77
+
78
+
79
+ %dt.next Favourites
80
+ %dd
81
+ .description
82
+ :markdown
83
+
84
+ As we said before, we have reports for entities, lists, and maps.
85
+ Clicking the star on the favourites control makes a favourite out of
86
+ what-ever we are viewing: an entity, like a study; a list of entities,
87
+ such as the genes mutated in the study; or a map, which could for
88
+ instance map genes to the ratio of mutations per amino-acid in the
89
+ COSMIC database.
90
+
91
+ Favourites are used not only to track our interests, but as a means to
92
+ communicate between different functionalities or parts of the
93
+ application. We could for instance make a list of genes a favourite and
94
+ then go to a study report, open the "Gene list in study" action, select
95
+ our list from all the favourites and see a report of how these genes
96
+ are affected in the study
97
+
98
+ The favourite controls have an option to create a new list of entities
99
+ from scratch. This allows a user, for instance, to make a list with her
100
+ genes of interest instead of having to browse the application to find
101
+ it. *Note:* New lists are not made favourite be default, you still need to
102
+ click on the star once the report is shown.
103
+
104
+
105
+ .images
106
+ %dl.tabs.active.show
107
+ %dt.next.show Snapshot
108
+ %dd.show
109
+ %img(src="/img/UI/favourites.png")
110
+
111
+ %dt.next Explanation
112
+ %dd
113
+ %img(src="/img/UI/favourites_wire.png")
114
+
115
+
116
+ %dt.next Actions
117
+ %dd
118
+ .description
119
+ :markdown
120
+
121
+ Actions are the primary way to integrate data and functionalities.
122
+ Some actions are defined globally, but most commonly they are defined
123
+ inside workflows; when a report is produced, all workflows are
124
+ interrogated to see if they provide actions for it. The great majority
125
+ of the actions are defined in the `Genomics` workflow.
126
+
127
+ When an action is selected, it loads bellow the action controller. An
128
+ action report consists of the content of the action, and optionally,
129
+ parameter controls and an action description. When the action is loaded
130
+ inside a report the parameter controls and description are hidden, but
131
+ they can be shown using the action control buttons in the top left.
132
+ Actions can also be opened in their own report by right clicking on its
133
+ button.
134
+
135
+ As with all reports, they are executed the first time they are
136
+ requested and the result is cached for further access. The action
137
+ control buttons can be used to reload the action, just like the reload
138
+ button in the top-bar does for the complete report. The actions will
139
+ of-course be recomputed for each configuration of parameters. The
140
+ parameters of the action can be favourites from the user, lists or
141
+ maps. These are presented to the user using an input `select`, and are
142
+ synchronized with the user current favourites.
143
+
144
+ If an action is used often with a particular combination of parameters.
145
+ For instance the "Enrichment" action of gene lists performs an
146
+ over-representation based analysis of functional classes. The
147
+ functional classes include several pathway databases, protein domains,
148
+ gene ages, etc. If we where interesting in performing enrichment
149
+ analysis using GO biological process terms, we can use the paperclip
150
+ button to set that configuration of parameters as default so that it
151
+ always uses it initially.
152
+
153
+ Some actions may require a significant amount of time to compute. The
154
+ action controller tries to reload the action periodically until it is
155
+ completed. Instead of having to wait on that page for it to finish, the
156
+ user can click on the bookmark button, which will place a link in the
157
+ "jobs" tab on the "Extra" menu of the top-bar, and come back to it
158
+ later.
159
+
160
+ .images
161
+ %dl.tabs.active.show
162
+
163
+ %dt.next.show.active Action Snapshot
164
+ %dd.show
165
+ %img(src="/img/UI/actions.png")
166
+
167
+ %dt.next Action Explanation
168
+ %dd
169
+ %img(src="/img/UI/actions_wire.png")
170
+
171
+ %dt.next Controller Snapshot
172
+ %dd
173
+ %img(src="/img/UI/action_control.png")
174
+
175
+ %dt.next Controller Explanation
176
+ %dd
177
+ %img(src="/img/UI/action_control_wire.png")
178
+
179
+
180
+ %dt.next Tables
181
+ %dd
182
+ .description
183
+ :markdown
184
+
185
+ Tables in this application come enhanced with several functionalities.
186
+ The rows can be sort by the values of any column.
187
+
188
+ The values of the columns can also be used to filter the rows of the
189
+ table through the `filter` button. The filters are defined per-column,
190
+ and can contain exact strings, regular expressions like
191
+ `/(COMPLETE|PARTIAL) RESPONSE/i`, statements such as `> \< ==` or `!=`.
192
+ And, for columns containing entities they can be prefixed with the term
193
+ `name:` to force the filtering to work over the human readible text of
194
+ the entities e.g. `name:/SF3B\d+/` for a column containing 'Ensembl
195
+ Gene ID'.
196
+
197
+ When a column contains entities, these are usualy listed in the table using
198
+ some identifier like 'Ensembl Gene ID' for genes or 'GO Term IDs', etc. When
199
+ displaying the table, it automatically substitutes these identifiers with
200
+ links to their corresponding reports, and lists them by name. Additionally
201
+ the `column` button allows the user to report the list of entities of any column
202
+ or, if the first column is itselve an entity, it allows the user to report
203
+ the `map` between the entities in this column and the values of any other column.
204
+ Maps are generally used as inputs to actions and tools.
205
+
206
+ The content of the table can be downloaded in two forms, as TSV files,
207
+ which is the original source of the table, or as Excel files. When
208
+ downloding as Excel files, since are generally intended to be read by
209
+ people, all entities listed that can be translated to a more human
210
+ readible identifier are translated automatically. This includes change
211
+ genes identifiers from `Ensembl Gene ID` to `Associated Gene Name`, or
212
+ changing KEGG pathway ids to their descriptive name.
213
+
214
+ .images
215
+ %img(src="/img/UI/table.png")
216
+
217
+
218
+ %dt.next Tools
219
+ %dd
220
+ .description
221
+ :markdown
222
+
223
+ Some workflows implement `tools`, which provide special interactive
224
+ visualization for different types of data. For instance: the `Graph`
225
+ workflow implements the `cytoscape` tool, which is used to display
226
+ different kinds of entities connected through databases or analitical
227
+ results; the `Structure` `jmol` tool displays mutations in the
228
+ secondary and tertiary structures and complexes; and the `D3Js`
229
+ workflow that implements a tool to display `d3js` interactive SVG
230
+ figures. Alternative R is used through a native interface in Rbbt to
231
+ display plots using `ggplot2`.
232
+
233
+ These tools are used by different reports and actions. The `Graph`
234
+ workflow for instance redefines the template for `Gene` lists to
235
+ include a cytoscape plot to the description section of the report.
236
+
237
+
238
+ .images
239
+ %dl.tabs.active.show
240
+ %dt.next.show Cytoscape
241
+ %dd.show
242
+ %img(src="/img/UI/cytoscape.png")
243
+
244
+ %dt.next Jmol
245
+ %dd
246
+ %img(src="/img/UI/jmol.png")
247
+
248
+ %dt.next D3Js
249
+ %dd
250
+ %img(src="/img/UI/d3js.png")
@@ -1,7 +1,7 @@
1
1
  :markdown
2
2
 
3
3
  The Workflow subsystem
4
- ===================
4
+ ======================
5
5
 
6
6
  The workflow subsystem is used to package related functionalities and
7
7
  offer a common, flexible, interface. Each workflow is composed of a
Binary file
Binary file
Binary file
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.2.34
4
+ version: 1.2.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-18 00:00:00.000000000 Z
11
+ date: 2013-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -255,6 +255,7 @@ files:
255
255
  - share/views/error.haml
256
256
  - share/views/form.haml
257
257
  - share/views/help.haml
258
+ - share/views/help/UI.haml
258
259
  - share/views/help/entity.haml
259
260
  - share/views/help/workflow.haml
260
261
  - share/views/job_info.haml
@@ -284,6 +285,20 @@ files:
284
285
  - share/views/partials/table/filters.haml
285
286
  - share/views/partials/table/page.haml
286
287
  - share/views/public/favicon.gif
288
+ - share/views/public/img/UI/action_control.png
289
+ - share/views/public/img/UI/action_control_wire.png
290
+ - share/views/public/img/UI/actions.png
291
+ - share/views/public/img/UI/actions_wire.png
292
+ - share/views/public/img/UI/cytoscape.png
293
+ - share/views/public/img/UI/d3js.png
294
+ - share/views/public/img/UI/favourites.png
295
+ - share/views/public/img/UI/favourites_wire.png
296
+ - share/views/public/img/UI/jmol.png
297
+ - share/views/public/img/UI/report.png
298
+ - share/views/public/img/UI/report_wire.png
299
+ - share/views/public/img/UI/table.png
300
+ - share/views/public/img/UI/topbar.png
301
+ - share/views/public/img/UI/topbar_wire.png
287
302
  - share/views/public/js/_ajax_replace.js
288
303
  - share/views/public/js/_ellipsis.js
289
304
  - share/views/public/js/_md5.js