Mercurial > repos > mikel-egana-aranguren > oppl
changeset 20:46257c870179 draft
New installation procedure added
author | Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu> |
---|---|
date | Mon, 08 Oct 2012 12:55:08 +0200 (2012-10-08) |
parents | cc270db37d33 |
children | ffde1fafa066 |
files | README config_oppl_for_galaxy.sh install.sh sed_recipes stderr_wrapper.py wrapper.sh |
diffstat | 6 files changed, 86 insertions(+), 165 deletions(-) [+] |
line wrap: on
line diff
--- a/README Sat Oct 06 21:50:39 2012 +0200 +++ b/README Mon Oct 08 12:55:08 2012 +0200 @@ -1,8 +1,55 @@ +INSTALLATION VIA MERCURIAL (RECOMMENDED) +======================================== + +1.- Stop Galaxy. + +2.- Move to galaxy-dist/tools/ + +3.- Clone the OPPL-Galaxy repository with mercurial: + +hg clone http://mikel-egana-aranguren@toolshed.g2.bx.psu.edu/repos/mikel-egana-aranguren/oppl + +4.- Move to galaxy-dist/tools/oppl/ and run install.sh: + +chmod +x install.sh +./install.sh + +5.- Add the following lines to /galaxy-dist/tool_conf.xml: + + <section name="Ontology Pre Processor Language" id="oppl"> + <tool file="oppl/oppl.xml"/> + <tool file="oppl/inference.xml"/> + <tool file="oppl/query.xml"/> + <tool file="oppl/oppl_query.xml"/> + <tool file="oppl/merge.xml"/> + </section> + +6.- Start Galaxy. + +For updates: + +1.- Stop Galaxy. + +2.- Move to galaxy-dist/tools/oppl/ + +3.- Update local files: + +hg update + +4.- Run install.sh: + +./install.sh + +5.- Only edit /galaxy-dist/tool_conf.xml in case a tool (an XML file) has been added/removed. + +6.- Start Galaxy. -MANUAL INSTALLATION -============ +MANUAL INSTALLATION (DIRECT DOWNLOAD) +===================================== + +Download and uncompress anywhere you like, and then: 1.- Stop Galaxy. @@ -22,27 +69,24 @@ FaCT++-linux-v1.5.2/ FaCT++-OSX-v1.5.2/ -3.- Create directory /galaxy-dist/tools/OPPL/ +3.- Create directory /galaxy-dist/tools/oppl/ 4.- Copy oppl.xml, inference.xml, query.xml, oppl_query.xml and -merge.xml to /galaxy-dist/tools/OPPL/ +merge.xml to /galaxy-dist/tools/oppl/ 5.- Add the following lines to /galaxy-dist/tool_conf.xml: <section name="Ontology Pre Processor Language" id="oppl"> - <tool file="OPPL/oppl.xml"/> - <tool file="OPPL/inference.xml"/> - <tool file="OPPL/query.xml"/> - <tool file="OPPL/oppl_query.xml"/> - <tool file="OPPL/merge.xml"/> + <tool file="oppl/oppl.xml"/> + <tool file="oppl/inference.xml"/> + <tool file="oppl/query.xml"/> + <tool file="oppl/oppl_query.xml"/> + <tool file="oppl/merge.xml"/> </section> 6.- Start Galaxy. -INSTALLATION VIA MERCURIAL AND SHELL SCRIPT - - FORESEEN FEATURES =================
--- a/config_oppl_for_galaxy.sh Sat Oct 06 21:50:39 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -#!/bin/sh - -# Remove Kate backup files -rm *~ - -# Wrapper does not work -# cp stderr_wrapper.py /home/mikel/galaxy/galaxy-dist/tools/OPPL/ - -# Local installation - -cp oppl.xml /home/mikel/galaxy/galaxy-dist/tools/OPPL/ -cp inference.xml /home/mikel/galaxy/galaxy-dist/tools/OPPL/ -cp query.xml /home/mikel/galaxy/galaxy-dist/tools/OPPL/ -cp oppl_query.xml /home/mikel/galaxy/galaxy-dist/tools/OPPL/ -cp merge.xml /home/mikel/galaxy/galaxy-dist/tools/OPPL/ - -cp oppl_galaxy.jar /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp inference.jar /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp query.jar /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp oppl_query.jar /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp merge.jar /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ - -cp -r FaCT++-linux-v1.5.2 /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ - -cp -r oppl_galaxy_lib /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp -r inference_lib /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp -r query_lib /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp -r oppl_query_lib /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ -cp -r merge_lib /home/mikel/galaxy/galaxy-dist/tool-data/shared/jars/ - -# Copy src from Eclipse for release - -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/fi/dia/oeg/oppl/galaxy/OPPLGalaxy.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/fi/dia/oeg/oppl/galaxy/GalaxyOWLAPI.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/fi/dia/oeg/oppl/galaxy/InferenceGalaxy.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/fi/dia/oeg/oppl/galaxy/OWLQueryGalaxy.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/fi/dia/oeg/oppl/galaxy/OWLQueryGalaxy.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/cbgp/opplquery/oppl/galaxy/OPPLQueryGalaxy.java ./src/ -cp /home/mikel/UPM/Eclipse_Workspace/OPPL_Galaxy/src/es/upm/cbgp/opplquery/oppl/galaxy/MergeImportedOntologies.java ./src/ - -# Copy files for google code release ('Backup' release, not open to public) - -cp *.jar /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp *.xml /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp -r *_lib /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp -r FaCT++-* /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp -r src /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp -r test-data /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ -cp README /home/mikel/UPM/Paper/SWAT4LS_2011/JBS_review/oppl-galaxy.src/ - -# ##### NOTES - -# To kill Galaxy easily: ./run.sh --reload - -# Usual mercurial session: update, status, add, commit -m 'Changes', push - - -
--- a/install.sh Sat Oct 06 21:50:39 2012 +0200 +++ b/install.sh Mon Oct 08 12:55:08 2012 +0200 @@ -1,3 +1,32 @@ #!/bin/sh -# Shell script for installing OPPL-Galaxy \ No newline at end of file +# Shell script for installing OPPL-Galaxy + +# This script assumes that it is living in galaxy-dist/tools/oppl/ +# if that is not the case, simply edit the var $jars bellow + +jars="../../tool-data/shared/jars/" + +cp oppl_galaxy.jar $jars +cp inference.jar $jars +cp query.jar $jars +cp oppl_query.jar $jars +cp merge.jar $jars + +cp -r FaCT++-linux-v1.5.2 $jars +cp -r oppl_galaxy_lib $jars +cp -r inference_lib $jars +cp -r query_lib $jars +cp -r oppl_query_lib $jars +cp -r merge_lib $jars + +echo 'Now you should edit /galaxy-dist/tool_conf.xml:' +echo ' <section name="Ontology Pre Processor Language" id="oppl">' +echo ' <tool file="oppl/oppl.xml"/>' +echo ' <tool file="oppl/inference.xml"/>' +echo ' <tool file="oppl/query.xml"/>' +echo ' <tool file="oppl/oppl_query.xml"/>' +echo ' <tool file="oppl/merge.xml"/>' +echo ' </section>' + +# Foreseen feature: directly edit /galaxy-dist/tool_conf.xml with sed or something \ No newline at end of file
--- a/sed_recipes Sat Oct 06 21:50:39 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -less Elk_output.text | sed s/INFO/X/ > output -less Elk_output.text | sed s/.*org.semanticweb.elk.reasoner.*// > output -less Elk_output.text | sed /.*org.semanticweb.elk.reasoner.*/d > output - -| sed /.*org.semanticweb.elk.reasoner.*/d -less Elk_output.text | sed /^\s*\<.*\>/d - -
--- a/stderr_wrapper.py Sat Oct 06 21:50:39 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -#!/usr/bin/env python - -""" -Wrapper that execute a program and its arguments but reports standard error -messages only if the program exit status was not 0 -Example: ./stderr_wrapper.py myprog arg1 -f arg2 -""" - -import sys, subprocess - -assert sys.version_info[:2] >= ( 2, 4 ) - -def stop_err( msg ): - sys.stderr.write( "%s\n" % msg ) - sys.exit() - -def __main__(): - # Get command-line arguments - args = sys.argv - # Remove name of calling program, i.e. ./stderr_wrapper.py - args.pop(0) - # If there are no arguments left, we're done - if len(args) == 0: - return - - # If one needs to silence stdout - #args.append( ">" ) - #args.append( "/dev/null" ) - - cmdline = " ".join(args) - try: - # Run program - proc = subprocess.Popen( args=cmdline, shell=True, stderr=subprocess.PIPE ) - returncode = proc.wait() - # Capture stderr, allowing for case where it's very large - stderr = '' - buffsize = 1048576 - try: - while True: - stderr += proc.stderr.read( buffsize ) - if not stderr or len( stderr ) % buffsize != 0: - break - except OverflowError: - pass - # Running Grinder failed: write error message to stderr - if returncode != 0: - raise Exception, stderr - except Exception, e: - # Running Grinder failed: write error message to stderr - stop_err( 'Error:\n' + str( e ) ) - - -if __name__ == "__main__": __main__() \ No newline at end of file
--- a/wrapper.sh Sat Oct 06 21:50:39 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -#!/bin/sh - -# STDERR wrapper - discards STDERR if command execution was OK. - -# -# This script executes a given command line, -# while saving the STDERR in a temporary file. -# -# When the command is completed, it checks to see if the exit code was zero. -# if so - the command is assumed to have succeeded - the STDERR file is discarded. -# if not - the command is assumed to have failed, and the STDERR file is dumped to the real STDERR -# -# -# Use this wrapper for tools which insist on writting stuff to STDERR -# even if they succeeded - -# which throws galaxy off balance. -# -# -# Copyright 2009 (C) by Assaf Gordon -# This file is distributed under the BSD license. - -TMPFILE=$(mktemp) || exit 1 - -"$@" 2> $TMPFILE - -EXITCODE=$? -# Exitcode != 0 ? -if [ "$EXITCODE" -ne "0" ]; then - cat $TMPFILE >&2 -fi -rm $TMPFILE - -exit $EXITCODE