Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bbop-graph-noctua

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bbop-graph-noctua - npm Package Compare versions

Comparing version 0.0.15 to 0.0.16

6

lib/edit.js

@@ -405,10 +405,10 @@ /**

// Referenced instance ID.
prof.id = ind.id();
prof['id'] = ind.id();
// Collect class expressions and annotations.
each(ind.types(), function(ce){
prof.class_expressions.push(ce);
prof['class_expressions'].push(ce);
});
each(ind.annotations(), function(ann){
prof.annotations.push(ann);
prof['annotations'].push(ann);
});

@@ -415,0 +415,0 @@

{
"name": "bbop-graph-noctua",
"version": "0.0.15",
"version": "0.0.16",
"license": "BSD-3-Clause",

@@ -34,3 +34,3 @@ "description": "A subclass of bbop-graph that layers on a complete annotation and graph editing model for the Noctua set of tools.",

"bbop-graph": "0.0.13",
"class-expression": "0.0.7",
"class-expression": "0.0.8",
"underscore": "1.8.3"

@@ -37,0 +37,0 @@ },

@@ -7,2 +7,5 @@ ////

////
//// The file we're using is a JSONified version of 5525a0fc00000001
//// (Consistency Paper March dph)
////

@@ -223,3 +226,5 @@ var assert = require('chai').assert;

assert.isString(ev['id'], 'got RI id');
assert.equal(ev['cls'], 'ECO:0000021', 'got ev class');
// From class_expression.to_string()
//assert.equal(ev['cls'], 'ECO:0000021', 'got ev class');
assert.equal(ev['cls'], 'physical interaction evidence', 'got ev class');
assert.equal(ev['source'], 'PMID:12048186', 'got source ref');

@@ -259,2 +264,6 @@ });

// Example node.
var ex_nid =
'gomodel:taxon_559292-5525a0fc0000001-GO-0005515-5525a0fc0000023';
// Setup.

@@ -265,2 +274,13 @@ var g = new model.graph();

g.load_data_basic(raw_resp['data']);
// Check type label.
var ex_n = g.get_node(ex_nid);
var ex_types = ex_n.types()
assert.equal(ex_types.length, 1, 'has one type');
var ex_type = ex_types[0];
assert.equal(ex_type.type(), 'class', 'is a class');
assert.equal(ex_type.class_id(), 'GO:0005515', 'has good id');
assert.equal(ex_type.class_label(), 'protein binding', 'has good label');
// Fold and continue.
g.fold_go_noctua(rellist);

@@ -291,12 +311,23 @@

// Close examination of a single subgraph.
var nid = 'gomodel:taxon_559292-5525a0fc0000001-GO-0005515-5525a0fc0000023';
var n = g.get_node(nid);
var n = g.get_node(ex_nid);
assert.equal(n._is_a, 'bbop-graph-noctua.node', 'node is a node');
var s = n.subgraph();
//console.log(s);
assert.equal(s._is_a, 'bbop-graph-noctua.graph', 'graph is a graph');
assert.equal(s.all_nodes().length, 2, 'subgraph has two nodes');
assert.equal(s.all_edges().length, 1, 'subgraph has one edges');
assert.equal(s.all_edges()[0].predicate_id(), 'RO:0002333', 'correct subraph edge');
//console.log();
assert.equal(s.all_edges()[0].predicate_id(), 'RO:0002333',
'correct subraph edge');
// Unfold and retest labels.
(function(){
g.unfold();
var ex_n = g.get_node(ex_nid);
var ex_types = ex_n.types()
assert.equal(ex_types.length, 1, 'has one type');
var ex_type = ex_types[0];
assert.equal(ex_type.type(), 'class', 'is a class');
assert.equal(ex_type.class_id(), 'GO:0005515', 'has good id');
assert.equal(ex_type.class_label(), 'protein binding',
'has good label');
})();
});

@@ -303,0 +334,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc