Skip to content

Instantly share code, notes, and snippets.

@inutano
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inutano/eefb1a3e87f02afaf034 to your computer and use it in GitHub Desktop.
Save inutano/eefb1a3e87f02afaf034 to your computer and use it in GitHub Desktop.

sem4j to go

A galaxy-based web application to enable semantic/path search by cypher query on Neo4j, designed for everyone.

Demo site

Running galaxy here

Getting Started

Detailed manual will be available soon (At least we hope it will).

  • Launch instance from public AMI (working)
  • Open Galaxy
    • http://<your instance's url>:8080
  • Use Cypher Tools
    • Convert data to graph
      • Tab-to-Graph
    • Load it to Neo4J
      • Graph-to-DB
    • Visualize and search
      • Graph Viewer

Components

How we built

AMI Configuration log

# into the cloud...

# Download Neo4J
wget "http://dist.neo4j.org/neo4j-community-2.0.1-unix.tar.gz"

# Download Python and build it
wget "http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz"

# Download galaxy
hg clone "https://bitbucket.org/galaxy/galaxy-dist/"

# Start Neo4J and Galaxy on reboot
nano /etc/init.d/neo4j-init
nano /etc/init.d/galaxy-init
chkconfig --add neo4j-init
chkconfig --add galaxy-init
chkconfig neo4j-init on
chkconfig galaxy-init on

# Clone sem4j viewer repo
git clone https://github.com/sem4j-jp/sem4j-viewer.git

make sure that the permission of *-init scripts and running scripts is 755!

#!/bin/sh
# chkconfig: 2345 98 98
# description: initialize Neo4J server
# processname: neo4j-init

do_start(){
  export JAVA_HOME=/home/ec2-user/java/latest && /home/ec2-user/neo4j/latest/bin/neo4j start
}

do_stop(){
  /home/ec2-user/neo4j/latest/bin/neo4j stop  
}

case "$1" in
  start)
    do_start
    ;;
  stop)
    do_stop
    ;;
  restart)
    do_stop
    do_start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    RETVAL=1
esac

exit $RETVAL
#!/bin/sh
# chkconfig: 2345 99 99
# description: initialize galaxy daemon

do_start(){
  /home/ec2-user/galaxy/galaxy-dist/run.sh --daemon
}

do_stop(){
  echo "stop"
}

case "$1" in
  start)
    do_start
    ;;
  stop)
    do_stop
    ;;
  restart)
    do_stop
    do_start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    RETVAL=1
esac

exit $RETVAL
@inutano
Copy link
Author

inutano commented May 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment