Skip to content

Commit 6778c5e

Browse files
authored
Merge pull request #722 from geneontology/dev
Updating Noctua Production
2 parents b947429 + f35f668 commit 6778c5e

File tree

6 files changed

+54343
-53946
lines changed

6 files changed

+54343
-53946
lines changed

config/startup.yaml.environment-development

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ WORKBENCHES:
8181
value:
8282
- '../noctua-form/workbenches'
8383
- '../noctua-landing-page/workbenches'
84-
- '../noctua-annotation-review/workbenches'
85-
- '../noctua-search/workbenches'
8684
- '../noctua-form-legacy/workbenches'
8785
- 'workbenches'
8886
## Minerva operations preferences.

js/NoctuaEditor.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,10 @@ var MMEnvInit = function(model_json, in_relations, in_token){
739739
});
740740
var vvm = new widgetry.contained_modal(
741741
null, 'Violations',
742-
'<p>This feature is <strong>currently under development</strong>, with more user friendly error reports coming. If you have questions about the error messages you\'re seeing, please create a <a href="https://github.com/geneontology/noctua"><u>ticket</u></a>.</p>' +
742+
'<div class="alert alert-dismissable alert-warning">' +
743+
'<button type="button" class="close" data-dismiss="alert">&times;</button>' +
744+
'This feature is <strong>currently under development</strong>, with more user friendly error reports coming. If you have questions about the error messages you\'re seeing, please create a <a href="https://github.com/geneontology/noctua"><u>ticket</u></a>.' +
745+
'</div>' +
743746
violation_renderings.join(' <hr /> '));
744747
vvm.show();
745748
}

js/lib/noctua-widgetry/widgetry.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,18 @@ function repaint_info(ecore, aid, info_div){
104104
// Assemble a human-readable label.
105105
var nid = v.node_id();
106106
var node = ecore.get_node(nid);
107-
var node_label = '';
108-
var std_types = node.types();
109-
us.each(std_types, function(in_type){
110-
node_label += type_to_span(in_type);
111-
});
107+
// This /could/ be a model.
108+
// See: https://github.com/geneontology/noctua/issues/683
109+
if( ! node ){
110+
// This is likely a model-level violation and cannot be
111+
// matched with a node.
112+
}else{
113+
var node_label = '';
114+
var std_types = node.types();
115+
us.each(std_types, function(in_type){
116+
node_label += type_to_span(in_type);
117+
});
118+
}
112119
if( node_label === '' ){
113120
node_label = nid;
114121
}
@@ -971,6 +978,10 @@ function add_edge_modal(ecore, manager, relations, aid, source_id, target_id){
971978
_fuse('positively regulates', 'RO:0002213', radio_name, 3),
972979
_fuse('directly positively regulates', 'RO:0002629', radio_name, 4),
973980
_fuse('has participant', 'RO:0000057', radio_name, 0),
981+
_fuse('has small molecule regulator', 'RO:0012000', radio_name, 1),
982+
_fuse('has small molecule activator', 'RO:0012001', radio_name, 2),
983+
_fuse('has small molecular inhibitor', 'RO:0012002', radio_name, 2),
984+
_fuse('acts on population of', 'RO:0012003', radio_name, 1),
974985
_fuse('has input', 'RO:0002233', radio_name, 1),
975986
_fuse('has output', 'RO:0002234', radio_name, 1),
976987
_fuse('transports or maintains localization of', 'RO:0002313', radio_name, 1),

noctua.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ var NoctuaLauncher = function(){
163163
var workbenches_model = [];
164164
var workbenches_individual = [];
165165
var workbenches_edge = [];
166+
var workbenches_universal_beta_test = [];
167+
var workbenches_model_beta_test = [];
166168
each(workbench_maybe_dirs, function(dir){
167169
//console.log('dir', dir);
168170

@@ -258,7 +260,13 @@ var NoctuaLauncher = function(){
258260
wb['public-directory'] = wbpath_try_public;
259261

260262
// Load workbench for later.
261-
if( wb['type'] === 'universal' ){
263+
if(wb['is-beta'] && wb['type'] === 'universal' ) {
264+
workbenches_universal_beta_test.push(wb);
265+
console.log('Added workbench (b: ' + wbid + ')');
266+
}else if(wb['is-beta'] && wb['type'] === 'model' ) {
267+
workbenches_model_beta_test.push(wb);
268+
console.log('Added workbench (b: ' + wbid + ')');
269+
}else if( wb['type'] === 'universal' ){
262270
workbenches_universal.push(wb);
263271
console.log('Added workbench (u: '+wbid+')');
264272
}else if( wb['type'] === 'model' ){
@@ -280,7 +288,12 @@ var NoctuaLauncher = function(){
280288
});
281289

282290
// Apply external to internal variables.
283-
var all_workbenches = workbenches_universal.concat(workbenches_model).concat(workbenches_individual).concat(workbenches_edge);
291+
var all_workbenches = workbenches_universal
292+
.concat(workbenches_model)
293+
.concat(workbenches_individual)
294+
.concat(workbenches_edge)
295+
.concat(workbenches_universal_beta_test)
296+
.concat(workbenches_model_beta_test);
284297
if( us.isEmpty(all_workbenches) ){
285298
console.log('No workbenches defined.');
286299
}else{
@@ -617,6 +630,10 @@ var NoctuaLauncher = function(){
617630
value: workbenches_individual },
618631
{name: 'global_workbenches_edge',
619632
value: workbenches_edge },
633+
{name: 'global_workbenches_universal_beta_test',
634+
value: workbenches_universal_beta_test },
635+
{name: 'global_workbenches_model_beta_test',
636+
value: workbenches_model_beta_test },
620637
// SPARQL templates.
621638
{name: 'global_sparql_templates_named',
622639
value: sparql_templates_named },
@@ -662,7 +679,9 @@ var NoctuaLauncher = function(){
662679
'noctua_workbenches_universal': workbenches_universal,
663680
'noctua_workbenches_model': workbenches_model,
664681
'noctua_workbenches_individual': workbenches_individual,
665-
'noctua_workbenches_edge': workbenches_edge
682+
'noctua_workbenches_edge': workbenches_edge,
683+
'noctua_workbenches_universal_beta_test': workbenches_universal_beta_test,
684+
'noctua_workbenches_model_beta_test': workbenches_model_beta_test
666685
};
667686

668687
// Load in the additions.

workbenches/companion/Companion.js

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var widgetry = require('noctua-widgetry');
3333
var jQuery = require('jquery');
3434
/* jshint ignore:end */
3535

36-
// Items
36+
// Items
3737
var barista_response = require('bbop-response-barista');
3838
var class_expression = require('class-expression');
3939
var minerva_requests = require('minerva-requests');
@@ -47,6 +47,7 @@ var gserv = global_golr_server;
4747
var defs = new amigo.data.definitions();
4848
var handler = new amigo.handler();
4949
var linker = new amigo.linker();
50+
linker.app_base = 'http://amigo.geneontology.org';
5051
//var dlimit = defs.download_limit();
5152
var dlimit = 1000;
5253

@@ -113,7 +114,7 @@ var CompanionInit = function(user_token){
113114
var mmanager = new minerva_manager(global_barista_location,
114115
global_minerva_definition_name,
115116
user_token, engine, 'async');
116-
117+
117118
// GOlr location and conf setup.
118119
var gconf = new bbop_legacy.golr.conf(amigo.data.golr);
119120

@@ -211,15 +212,15 @@ var CompanionInit = function(user_token){
211212
///
212213
/// AmiGO comms.
213214
///
214-
215+
215216
// Ready the primary widget manager.
216217
var widget_manager = new bbop_legacy.golr.manager.jquery(gserv, gconf);
217218
var confc = gconf.get_class('annotation');
218219
widget_manager.set_personality('annotation');
219220
widget_manager.add_query_filter('document_category',
220221
confc.document_category(), ['*']);
221222
widget_manager.add_query_filter('aspect', 'F'); // removable
222-
223+
223224
// Attach filters to manager.
224225
var hargs = {
225226
meta_label: 'Total documents:&nbsp;',
@@ -230,24 +231,24 @@ var CompanionInit = function(user_token){
230231
var filters = new bbop_legacy.widget.live_filters(
231232
'input-filter-accordion', widget_manager, gconf, hargs);
232233
filters.establish_display();
233-
234+
234235
// Attach pager to manager.
235236
var pager_opts = {
236237
};
237238
var pager = new bbop_legacy.widget.live_pager('pager', widget_manager,
238239
pager_opts);
239-
240-
// Describe the button that will attempt to compact the selected
240+
241+
// Describe the button that will attempt to compact the selected
241242
// annotations and send macro commands to noctua/minerva.
242243
// The alrorithm is derived from a diagram here:
243244
// https://github.com/geneontology/noctua/issues/170#issuecomment-134414048
244245
var port_to_noctua_button = {
245246
label: 'Import',
246247
diabled_p: false,
247-
click_function_generator: function(results_table, widget_manager){ //
248-
248+
click_function_generator: function(results_table, widget_manager){ //
249+
249250
return function(event){
250-
251+
251252
var selected_ids = results_table.get_selected_items();
252253
var resp = results_table.last_response();
253254

@@ -256,7 +257,7 @@ var CompanionInit = function(user_token){
256257
alert('No action can be taken currently.');
257258
}else{
258259
//alert('Actionable input.');
259-
260+
260261
// Extract the documents that we'll operate on.
261262
var docs_to_run = [];
262263
each(selected_ids, function(sid){
@@ -265,11 +266,11 @@ var CompanionInit = function(user_token){
265266
docs_to_run.push(doc);
266267
}
267268
});
268-
269+
269270
// Assemble a batch to run.
270271
var acls_set = {};
271272
each(docs_to_run, function(doc){
272-
273+
273274
// Who are we talking about?
274275
var acls = doc['annotation_class'];
275276
var bio = doc['bioentity'];
@@ -325,7 +326,7 @@ var CompanionInit = function(user_token){
325326
withs: withs
326327
});
327328
});
328-
329+
329330
// WARNING: Warn if we are going to be batching a lot.
330331
if( us.keys(acls_set).length > 3 ){
331332
alert('You have a lot of requests from different ' +
@@ -342,45 +343,45 @@ var CompanionInit = function(user_token){
342343
// Now let's actually assemble the /generic/ requests
343344
// for the run.
344345
var reqs = new minerva_requests.request_set(
345-
global_barista_token, global_id);
346+
global_barista_token, global_id);
346347
reqs.use_groups([
347348
// WARNING: We're minting money that we
348349
// might not honor here.
349350
'http://purl.obolibrary.org/go/groups/' + assby
350351
]);
351352

352353
us.each(acls_assby_subset, function(bio_set, acls){
353-
354+
354355
var sub = reqs.add_individual(acls);
355-
356+
356357
us.each(bio_set, function(ev_list, bio){
357-
358+
358359
var obj = reqs.add_individual(bio);
359360
var edge = reqs.add_fact(
360361
[sub, obj, 'RO:0002333']);
361-
362+
362363
us.each(ev_list, function(ev_set){
363-
364+
364365
// Recover.
365366
var ev = ev_set['ev'];
366367
var refs = ev_set['refs'];
367368
var withs = ev_set['withs'];
368369
var assby = ev_set['assigned_by'];
369-
370+
370371
// Tag on the final evidence.
371372
reqs.add_evidence(
372373
ev, refs, withs,
373374
[sub, obj, 'RO:0002333']);
374375
});
375376
});
376-
377-
// ???
377+
378+
// ???
378379
});
379380

380381
// Fire and forget.
381382
mmanager.request_with(reqs);
382383
});
383-
384+
384385
}
385386
};
386387
}
@@ -397,7 +398,7 @@ var CompanionInit = function(user_token){
397398
var results = new bbop_legacy.widget.live_results('results', widget_manager,
398399
confc, handler, linker,
399400
results_opts);
400-
401+
401402
// Add pre and post run spinner (borrow filter's for now).
402403
widget_manager.register('prerun', 'foo', function(){
403404
filters.spin_up();

0 commit comments

Comments
 (0)