histograph/graphmalizer-core

Name: graphmalizer-core

Owner: Histograph

Description: Graphmalizer core

Created: 2017-01-18 10:24:40.0

Updated: 2017-01-18 10:24:43.0

Pushed: 2018-01-16 11:02:58.0

Homepage: https://graphmalizer.github.io

Size: 291

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

js-standard-style wercker status

Config

You must configure a mapping type ? structure

j:
st: localhost
rt: 7474
s:
ing: node
lation: arc
uiv: equivalence

(in config.yaml, config.json or --config [filename.json|filename.yaml])

Input

Input data elements are of this form


taset: /* string */,
pe: /* what you defined in config */,
eration: /* 'add' or 'remove' */

 all optional, depends on the structure
: '123',
 '123',
 '123',

 whatever you want
ta: { /*...*/ }

API

One function, input: stream, output: stream.

Example code

H = require('highland');
Graphmalizer = require('graphmalizer-core');

config = {
Neo4J: { host: 'localhost', port: 7474 },
types: {
    thing: { node:{} },
    eats: { arc:{} },
    same: { equivalence: {} }
}


G = new Graphmalizer(config)

stream = H([ {type: 'thing', id: 'x'} ]);

gister(stream)
ach(H.log);

Neo4J

Installation on OSX

Homebrew does the trick.

brew install --devel neo4j
neo4j start
Authorization

Either set config.Neo4J.auth to user:pass

G = new Graphmalizer({
Neo4J: { auth: 'neo4j:neo4j' },
types: { /* ... */ }

Or disable HTTP authentication all together, see neo4j manual for details.

Set the following in the conf/neo4j-server.properties file and restart server, neo4j restart.

sable authorization
.security.auth_enabled=false

If you don't know where this file is, you can try mdfind neo4j-server.properties on OSX.

Development

You can also use the wercker commandline interface.

Setup docker host (automatically starts it) or just start it if you have done this before (check with docker-machine ls).

docker-machine create -d virtualbox graphmalizer
docker-machine start graphmalizer

Then you want to update your shell so I knows about the docker host.

eval $(docker-machine env graphmalizer) # bash
eval (docker-machine env graphmalizer)  # fish

Now you can build and test using wercker:

wercker build

Examples

See examples/


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.