Newer
Older
#!/bin/sh -
# This script will start Artemis on a UNIX system. This script should
# be left in the same directory as the rest of the Artemis
# distribution, so that the java class files can be found. If
# necessary a symbolic link can be made to this script from
# /usr/local/bin/ or elsewhere.
# $Header: //tmp/pathsoft/artemis/art,v 1.26 2009-09-21 15:45:47 tjc Exp $
# resolve links - $0 may be a link
PRG=$0
progname=`basename $0`
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname $PRG`/$link"
fi
done
ARTEMIS_HOME=`dirname "$PRG"`/.
LIBDIR=/nfs/pathsoft/prod/javalibs
CLASSPATH=$ARTEMIS_HOME:$ARTEMIS_HOME/lib/biojava.jar:$ARTEMIS_HOME/lib/jemAlign.jar:$ARTEMIS_HOME/lib/jakarta-regexp-1.2.jar:$ARTEMIS_HOME/lib/macos.jar:$ARTEMIS_HOME/lib/postgresql-8.4-701.jdbc3.jar:$CLASSPATH
CLASSPATH=$CLASSPATH:$ARTEMIS_HOME/lib/j2ssh/commons-logging.jar:$ARTEMIS_HOME/lib/j2ssh/j2ssh-core.jar:$ARTEMIS_HOME/lib/j2ssh/
CLASSPATH=$CLASSPATH:$ARTEMIS_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$ARTEMIS_HOME/lib/ibatis/:$ARTEMIS_HOME/lib/ibatis/log4j-1.2.14.jar:$ARTEMIS_HOME/lib/ibatis/cglib-nodep-2.2.jar
CLASSPATH=$CLASSPATH:$ARTEMIS_HOME/lib/picard/sam.jar:$ARTEMIS_HOME/lib/picard/picard.jar:$ARTEMIS_HOME/lib/commons-net-2.2.jar
ARTEMIS_PROPERTIES="-Dartemis.environment=UNIX"
# Allow URLs to work from behind firewalls
if [ "$http_proxy" = "" ]
then
http_proxy=$HTTP_PROXY
fi
if [ "$http_proxy" = "" ]
then
http_proxy=$HTTP_proxy
fi
if [ "$http_proxy" != "" ]
then
ARTEMIS_PROPERTIES="$ARTEMIS_PROPERTIES -DproxySet=true "`echo $http_proxy | sed 's/http:\/\/\(.*\):\(.*\)/ -Dhttp.proxyHost=\1 -Dhttp.proxyPort=\2/'`
fi
# "-mx500m" sets the maximum amount of memory that Artemis can use. This may
# need to be increased when dealing with large files
MEM="-mx500m -ms20m"
if [ "$JVM_FLAGS" = "" ]
then
FLAGS="$MEM -noverify"
else
FLAGS="$MEM -noverify $JVM_FLAGS"
fi
QUIET=no
DEBUG=no
if [ $# = 0 ]
then
:
else
if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]
then
cat <<EOF
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
SYNOPSIS
Artemis: Genome Browser and Annotation Tool
USAGE
$0 [options] <SEQUENCE_FILE> [+FEATURE_FILE ...]
OPTIONS
SEQUENCE_FILE An EMBL, GenBank, FASTA, or GFF3 file
FEATURE_FILE An Artemis TAB file, or GFF file
-quiet Suppress normal info messages while running
-options FILE Read a text file of options from FILE
-debug Run using the debugging JVM instead
-fast | -fast64 Use the FastVM (hp Tru64 UNIX) with 32/64 bit pointers
-Dblack_belt_mode=? Keep warning messages to a minimum [true,false]
-Doffset=XXX Open viewer at base position XXX [integer >= 1]
-Duserplot=FILE[,FILE2] Open one or more userplots
-Dbam=FILE[,FILE2,...] Open one or more BAM, VCF or BCF files
-Dshow_forward_lines=? Hide/show forward frame lines [true,false]
-Dshow_reverse_lines=? Hide/show reverse frame lines [true,false]
-Dchado="h:p/d?u" Get Artemis to open this CHADO database
-Dread_only Open CHADO database read-only
EXAMPLES
% art AJ006275.embl
% art contigs.fa +annotation.gff +islands.tab
% art -Dblack_belt_mode=true -Dbam=ecoli_hiseq.bam E_coli_K12.gbk
% art -Duserplot=repeatmap.plot,geecee.plot Plasmid.gff3
HOMEPAGE
http://www.sanger.ac.uk/resources/software/artemis/
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
EOF
exit 0
fi
while test $# != 0
do
case $1 in
-options) FLAGS="$FLAGS -Dextra_options=$2"; shift ;;
-D*) FLAGS="$FLAGS $1" ;;
-fast) FAST_FLAG="-fast " ;; # -fast must be the first argument
-fast64) FAST_FLAG="-fast64 " ;; # -fast64 must be the first argument
-quiet) QUIET=yes ; FLAGS="$FLAGS -Drun_quietly=true" ;;
-debug) DEBUG=yes ;;
*) break ;;
esac
shift
done
fi
FLAGS=$FAST_FLAG$FLAGS
if [ "$JAVA_VM" = "" ]
then
if [ "$DEBUG" = yes ]
then
JAVA=java_g
else
PLATTMP=`uname`
if [ "$PLATTMP" = "Darwin" ]
then
FLAGS="$FLAGS -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=Artemis"
fi
if [ "$QUIET" = no ]
then
echo starting Artemis with flags: $FLAGS $ARTEMIS_PROPERTIES 1>&2
fi
$JAVA -Djdbc.drivers=org.postgresql.Driver $FLAGS $ARTEMIS_PROPERTIES uk.ac.sanger.artemis.components.ArtemisMain $*