Skip to content
Snippets Groups Projects
Commit 1d5452b6 authored by rds's avatar rds
Browse files

rename and recode (to keep instep with otterlace) of script to test zmap and otterlace

parent b0a4e029
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
############################################################
# Script to test zmap with otterlace
# Change these few variables to point to the correct places
SCRIPT_NAME=$(basename $0)
INITIAL_DIR=$(pwd)
SCRIPT_DIR=$(dirname $0)
if ! echo $SCRIPT_DIR | egrep -q "(^)/" ; then
BASE_DIR=$INITIAL_DIR/$SCRIPT_DIR
else
BASE_DIR=$SCRIPT_DIR
fi
# This should be the current live code for otter.
# Try ls -lt /software/anacode/otter
RELEASE=otter_rel47_zmap
. $BASE_DIR/zmap_functions.sh || { echo "Failed to load zmap_functions.sh"; exit 1; }
# Change the location of this to be where your zmap to test is.
ZMAP_TO_TEST=""
ZMAP_TO_TEST=/var/tmp/rds/ZMap/src/build/linux
############################################################
# Nothing much to change below here...
zmap_message_out "Start of script."
SOFTWARE=/software/anacode
OTTER_CONFIG=$HOME/.otter_config
OTTER_HOME=$SOFTWARE/otter/$RELEASE
export OTTER_HOME
if [ ! -d $OTTER_HOME ]; then
echo
echo "This executable is not available at the moment."
echo "Please try the non-test version."
echo
exit 1
# including VARIABLE=VALUE settings from command line
if [ $# -gt 0 ]; then
eval "$*"
fi
script='otterlace'
# otter_root is immutable
otter_root="/software/anacode/otter"
#. $SOFTWARE/bin/setup_anacode_env
zmap_check ${RELEASE:="otter_production_main"}
zmap_check ${OTTER_HOME:="$otter_root/$RELEASE"}
zmap_check ${ZMAP_HOME:="$HOME"}
zmap_check ${ZMAP_BIN_DIR:="$OTTER_HOME/bin"}
zmap_check ${TK_OTTER_HOME:=$OTTER_HOME}
zmap_check ${ACEDB_HOME:="/nfs/disk100/acedb/RELEASE.DEVELOPMENT/bin.LINUX_4"}
export OTTER_HOME ZMAP_HOME
zmap_message_out "Using OTTER_HOME '$OTTER_HOME'"
zmap_message_out "Using TK_OTTER_HOME '$TK_OTTER_HOME'"
zmap_message_out "Using ZMAP_HOME '$ZMAP_HOME'"
zmap_message_out "Using ZMAP_BIN_DIR '$ZMAP_BIN_DIR'"
# This should be in setup_env
################## START OF SETUP_ENV ######################
PERL5LIB="\
$OTTER_HOME/tk:\
$OTTER_HOME/PerlModules:\
$OTTER_HOME/ensembl-ace:\
$OTTER_HOME/ensembl-otter/modules:\
$OTTER_HOME/ensembl-pipeline/modules:\
$OTTER_HOME/ensembl/modules:\
$OTTER_HOME/ensembl_head/modules:\
$OTTER_HOME/bioperl-0.7.2:\
$OTTER_HOME/bioperl-1.2.3-patched:\
$OTTER_HOME/biodas-1.02:\
$OTTER_HOME/perl"
export PERL5LIB
otterlib="$OTTER_HOME/lib"
if [ -n "$LD_LIBRARY_PATH" ]
......@@ -57,7 +47,7 @@ else
fi
export LD_LIBRARY_PATH
otterbin="$OTTER_HOME/bin"
otterbin="$ZMAP_BIN_DIR:$OTTER_HOME/bin:/software/anacode/bin:/software/pubseq/bin/EMBOSS-5.0.0/bin"
if [ -n "$PATH" ]
then
PATH="$otterbin:$PATH"
......@@ -79,41 +69,22 @@ export WUBLASTMAT
ACEDB_NO_BANNER=1
export ACEDB_NO_BANNER
#################### END OF SETUP_ENV #######################
# Now _prepend_ our path to the PATH setup by above.
#emboss_prefix=/nfs/team71/analysis/rds/emboss
if [ "x$emboss_prefix" != "x" ]; then
PATH="$emboss_prefix/bin:$PATH"
if [ "x$LD_LIBRARY_PATH" == "x" ]; then
LD_LIBRARY_PATH="$emboss_prefix/lib"
else
LD_LIBRARY_PATH="$emboss_prefix/lib:$LD_LIBRARY_PATH"
fi
fi
if [ "x$ZMAP_TO_TEST" != "x" ]; then
PATH="$ZMAP_TO_TEST:$PATH"
fi
#cp -f "$OTTER_HOME/acedbrc" ~/.acedbrc
PERL5LIB="\
$TK_OTTER_HOME/ensembl-otter/tk:\
$OTTER_HOME/PerlModules:\
$OTTER_HOME/ensembl-ace:\
$OTTER_HOME/ensembl-otter/modules:\
$OTTER_HOME/ensembl-pipeline/modules:\
$OTTER_HOME/ensembl/modules:\
$OTTER_HOME/ensembl_head/modules:\
$OTTER_HOME/bioperl-0.7.2:\
$OTTER_HOME/bioperl-1.2.3-patched:\
$OTTER_HOME/biodas-1.02:\
$OTTER_HOME/perl"
enable_zmap()
{
echo "[client]" >> $OTTER_CONFIG
echo "show_zmap=enable" >> $OTTER_CONFIG
echo "zmap_main_window=1" >> $OTTER_CONFIG
}
export PERL5LIB
if [ -f $OTTER_CONFIG ]; then
# If it already exists
SHOW_ZMAP=`grep show_zmap=enable $OTTER_CONFIG`
if [ "x$SHOW_ZMAP" == "x" ]; then
enable_zmap
fi
else
enable_zmap
fi
exec /software/bin/perl "$OTTER_HOME/ensembl-otter/tk/otterlace" $@
exec /software/bin/perl -w "$OTTER_HOME/tk/$script" $@
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment