From 0cfd7b84b07f2b52aad6fcfba5f35f3025e7f557 Mon Sep 17 00:00:00 2001 From: Mike Lin Date: Tue, 19 Mar 2013 00:07:31 -0700 Subject: [PATCH] Add dispatch script to set PHYLOCSF_BASE --- Makefile | 2 -- PhyloCSF | 15 +++++++++++++++ README | 15 ++++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100755 PhyloCSF diff --git a/Makefile b/Makefile index 48c9f46..7c91983 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,6 @@ all: PhyloCSF .PHONY: PhyloCSF CamlPaml clean ARCH := $(shell uname).$(shell uname -m) -PHYLOCSF_BASE := $(shell pwd) -export PHYLOCSF_BASE PhyloCSF: CamlPaml $(MAKE) -C src clean diff --git a/PhyloCSF b/PhyloCSF new file mode 100755 index 0000000..f5580d0 --- /dev/null +++ b/PhyloCSF @@ -0,0 +1,15 @@ +#!/bin/bash + +ARCH=`uname`.`uname -m` +case $0 in + ./*) export PHYLOCSF_BASE=`pwd` ;; + * ) export PHYLOCSF_BASE=`dirname $0` +esac + +if [ -f "$PHYLOCSF_BASE/PhyloCSF.$ARCH" ]; then + $PHYLOCSF_BASE/PhyloCSF.$ARCH $@ +else + echo "No PhyloCSF executable found for architecture: $ARCH" + echo "You may need to compile/install it according to the README." + exit 1 +fi diff --git a/README b/README index bee8e7f..510fe51 100644 --- a/README +++ b/README @@ -42,6 +42,15 @@ Mac OS X, 'gsl' is available in both Homebrew and MacPorts. Now just run 'make' in this directory. This will build and install the CamlPaml library, then compile the PhyloCSF executable and copy it to -PhyloCSF.ARCH in this directory, where e.g. ARCH = Linux.x86_64. This -executable should be usable by anyone on the same machine/cluster; they don't -have to set up OPAM or anything else. +this directory. You can then use the ./PhyloCSF dispatch script like the +examples found on our website, e.g. + +./PhyloCSF 12flies PhyloCSF_Examples/tal-AA.fa + +PhyloCSF should be usable in this way by anyone on the machine/cluster with rx +permissions; they don't have to set up OPAM or anything else. PhyloCSF can +be started from any working directory. + +If you want to 'install' PhyloCSF somewhere, you must transplant PhyloCSF, +PhyloCSF.ARCH (where e.g. ARCH=Linux.x86_64), and the PhyloCSF_Parameters +directory to the desired location.