Coder Social home page Coder Social logo

bbop-graph's Introduction

Generic repository, README, and scratch space for the Berkeley BOP.

bbop-graph's People

Contributors

kltm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bbop-graph's Issues

Error in graph.prototype.walker

Hello,

I think there is a bug function graph.prototype.walker. As it is, it only works if for a given node X, the function walking_fun returns an edge in which node X is the object, but not if node X is the subject. This gave a problem with get_descendent_subgraph or get_ancestor_subgraph, I don't remember which one of the two.

Need metadata information as part of format

There are new use cases where we may be running into incomplete graphs. In order to catch these up and down the stack, we'll be switching metadata into a key/value variable, which can be generally used.

In this case, we'll be looking at:

{
   "incomplete-p": bool, // true or "true"
   "complete-node-count": 40,
   "complete-edge-count": 40,
}

tagging @hdietze

Allow multiple preidcates for walker

It would be great if for walker functions instead of allowing a single predicate, multiple predicates would be allowed. A recent use-case for me was to find all children of a given GO term related through part_of or is_a relationships. To do that I had to filter out relationships in the json before parsing the graph, but it would be nice to be able to do this within the library, providing a list instead of a string for the in_pred aragument in functions like the one below:

bbop-graph/lib/graph.js

Lines 1091 to 1099 in 8837355

graph.prototype.get_parent_edges = function(nb_id, in_pred){
var anchor = this;
var results = [];
// Get all parents, or just parents from a specific relation.
var preds_to_use = [];
if( in_pred ){
preds_to_use.push(in_pred);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.