Skip to content
Commits on Source (5)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="corba"/>
<classpathentry kind="src" path="lib"/>
<classpathentry including="nsdb/|seqdb/|type/" kind="src" path="ant-build/src/main"/>
<classpathentry excluding="ant-build/src/main/|uk/ac/sanger/artemis/ExternalProgramUtils.java" including="nsdb/|org/|seqdb/|type/|uk/" kind="src" path=""/>
<classpathentry excluding="ant-build|cobertura-lib|coverage-report|data|docs|evosuite-dependencies|evosuite-libs|evosuite-tests|jacoco-lib|lib|evosuite-tests/" including="uk/**" kind="src" output="eclipse-classes" path="test"/>
<classpathentry including="uk/**" kind="src" output="eclipse-classes" path="test/evosuite-tests"/>
<classpathentry excluding="main/" kind="src" path="ant-build/src"/>
<classpathentry excluding="ant-build/classes/|ant-build/src/|docs|test|test/evosuite-tests/|uk/ac/sanger/artemis/ExternalProgramUtils.java" including="org/|uk/" kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/jemAlign.jar"/>
<classpathentry kind="lib" path="lib/jakarta-regexp-1.2.jar"/>
......@@ -14,9 +14,6 @@
<classpathentry kind="lib" path="lib/ibatis/ibatis-2.3.4.726.jar"/>
<classpathentry kind="lib" path="lib/ibatis/log4j-1.2.14.jar"/>
<classpathentry kind="lib" path="lib/postgresql-8.4-701.jdbc3.jar"/>
<classpathentry kind="lib" path="lib/picard/picard.jar"/>
<classpathentry kind="lib" path="lib/picard/sam.jar"/>
<classpathentry kind="lib" path="lib/commons-net-2.2.jar"/>
<classpathentry kind="lib" path="lib/batik/batik-awt-util.jar"/>
<classpathentry kind="lib" path="lib/batik/batik-codec.jar"/>
<classpathentry kind="lib" path="lib/batik/batik-dom.jar"/>
......@@ -25,5 +22,10 @@
<classpathentry kind="lib" path="lib/batik/batik-util.jar"/>
<classpathentry kind="lib" path="lib/batik/batik-xml.jar"/>
<classpathentry kind="lib" path="lib/commons-lang-2.6.jar"/>
<classpathentry kind="output" path="ant-build/classes/main"/>
<classpathentry kind="lib" path="test/lib/junit-4.11.jar"/>
<classpathentry kind="lib" path="/Users/kp11/workspace/applications/Artemis/eclipse-classes"/>
<classpathentry kind="lib" path="test/evosuite-lib/evosuite-1.0.5.jar"/>
<classpathentry kind="lib" path="lib/commons-net-3.6.jar"/>
<classpathentry kind="lib" path="lib/picard/picard.jar"/>
<classpathentry kind="output" path="eclipse-classes"/>
</classpath>
*.class
.settings
ant-build
test/ant-build
**/.DS_Store
**/*.log
test/coverage-report
jar_build
tar_build
artemis_compiled.tar
/eclipse-classes/
/test-kjp/
language: java
jdk:
- openjdk7
- openjdk6
- oraclejdk7
- openjdk8
- oraclejdk8
sudo: false
env:
global:
- BUILD_CMD='make'
- RUN_TESTS=false
matrix:
include:
- jdk: openjdk7
env: BUILD_CMD='ant -f build.xml'
- jdk: oraclejdk8
env:
- BUILD_CMD='ant -f build.xml'
- RUN_TESTS=true
cache:
directories:
- "${HOME}/dependencies"
......@@ -21,6 +23,9 @@ before_install:
- "source install_dependencies.sh"
install:
- "$BUILD_CMD"
- "cd test"
- "ln -s $(pwd)/../etc/log4j.properties ."
script: ant -f build-test.xml test -DEMBOSS_ROOT=$EMBOSS_ROOT | tee test.log && [ -z "$(grep 'Failures:\s[^0]\|Errors:\s[^0]' test.log)" ]
script:
- if [ "$RUN_TESTS" == "true" ]; then
cd test;
ln -s $(pwd)/../etc/log4j.properties .;
./RunDefaultUnitTests.sh | tee test.log && [ -z "$(grep 'Failures:\s[^0]\|Errors:\s[^0]' test.log)" ];
fi
Tim Carver (path-help@sanger.ac.uk)
Sascha Steinbiss (path-help@sanger.ac.uk)
Kim Rutherford (path-help@sanger.ac.uk)
Kevin Pepper (path-help@sanger.ac.uk)
Version 17
Artemis/ACT and associated applications have been upgraded to Java 8. Java 7/6/5 are now no longer supported - RT ticket #589103
BamView fixes/changes -
1) Improved mouse selection of reads.
2) Fixed exceptions thrown when zooming into an area with secondary reads or SNPs enabled - RT ticket #596489: Problem zooming in using isoseq data
3) Removed Samtools (htsjdk) jar and updated Picard jar (which includes htsjdk).
4) Upgraded Apache Commons Net jar - used for ftp'ing.
5) Added Cram file loading and fixed defects around that code area (also related RT ticket #560982: Artemis fails to build from source).
6) Added display of bam secondary & supplementary alignment flags to read details pop-up window.
7) Improved error handling/reporting, although this still needs more work.
8) Added buffer sizing to FTPSeekableStream.
9) Performance tweak for BAM file indexing.
10) Fixed issue in BamView whereby if you went to the end of a long contig and then switched to a shorter one (via the combo), you would end up off the end of the sequence
resulting in a negative array index exception. Code has been changed to reset display to the start of sequence when the combo is changed (i.e. same as Artemis).
11) Added bamview_perform_detailed_validation boolean property that can be set to perform more detailed sam validation during loading - this can be slow for large files.
Added EvoSuite unit tests and additional targeted tests (RT ticket #419534: Develop a test suite for Artemis).
Added Jacoco unit test coverage reporting - manual tests only currently. This may be switched to Clover in the future if this proves compatible with EvoSuite
- for the moment we are stuck with two coverage reports - evosuite and Jacoco.
Removed redundant Corba libraries.
Upgraded JUnit jar.
Changed Travis yml build file. RT ticket #597497: Set up artemis tests to run on travis build.
Changed all build scripts and startup scripts - RT ticket #598617. Removed building of artemis_mac.jar which is not used.
Removed etc/gene_builder script and the gff2embl script (and documentation references) - no longer supported.
Fixed RT ticket #606061 - Using EBI-Dbfetch on ARTEMIS. Change to DbfetchEntrySource.java due to incorrect regular expression and EBI URL.
Resized splash screen, as it was too small to the accommodate text info.
Updated splash screen logo.
Added error handling for dnaplotter template file loading in standalone mode.
Bioconda recipe prep work - RT ticket #341139.
Fixed RT ticket #467433 - Genbank DBSOURCE field was not recognised by Artemis. DBLINK was already added.
Fixed RT ticket #503254 - Act doesn't detect if file does not exist.
KNOWN ISSUES:
1) Java JDKs 1.8.0_131 and above have a Swing bug related to overlaying of modal dialogs for Mac OS X: https://bugs.openjdk.java.net/browse/JDK-8179335
2) There is a current bug in htsjdk whereby calls to the queryMate functionality can throw an exception on reads with secondaries and/or supplementals.
This affects looking up properties for a selected read on bamview - https://github.com/samtools/htsjdk/issues/1065
Version 16
Add 'Features Within Selection' option to the 'Select' menu to select
features that are contained by a selected base range.
......
......@@ -68,4 +68,8 @@ Running the test suite
======================
cd test
ant -f build-test.xml
RunDefaultUnitTests.sh - this runs all hand-written unit tests.
RunEvoSuiteUnitTests.sh - this runs all EvoSuite generated unit tests. It will take well over 30 mins to run.
RunAllUnitTests.sh - this runs all hand-written and EvoSuite generated unit tests. It will take well over 30 mins to run.
This software is Copyright (c) 2013 by Wellcome Trust Sanger Institute.
This software is Copyright (c) 2018 by Wellcome Trust Sanger Institute.
This is free software, licensed under:
......
......@@ -4,9 +4,9 @@ SHELL=/bin/sh
#OPT_FLAGS = -g -deprecation
JAVAC := javac -source 1.5 -target 1.5 $(OPT_FLAGS) $(EXTRA_FLAGS)
JAVAC := javac -source 1.8 -target 1.8 $(OPT_FLAGS) $(EXTRA_FLAGS)
REAL_CLASSPATH := CLASSPATH=lib/commons-lang-2.6.jar:lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard/picard.jar:lib/picard/sam.jar:lib/commons-net-2.2.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:.
REAL_CLASSPATH := CLASSPATH=lib/commons-lang-2.6.jar:lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard/picard.jar:lib/commons-net-3.6.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:.
ARTEMIS_DIRS = uk/ac/sanger/artemis \
uk/ac/sanger/artemis/chado \
......@@ -21,6 +21,7 @@ uk/ac/sanger/artemis/components/genebuilder/cv \
uk/ac/sanger/artemis/components/genebuilder/gff \
uk/ac/sanger/artemis/components/genebuilder/ortholog \
uk/ac/sanger/artemis/components/variant \
uk/ac/sanger/artemis/components/ref \
uk/ac/sanger/artemis/editor \
uk/ac/sanger/artemis/io \
uk/ac/sanger/artemis/j2ssh \
......@@ -31,7 +32,7 @@ uk/ac/sanger/artemis/util
SOURCES := $(foreach DIR,$(ARTEMIS_DIRS),$(wildcard $(DIR)/*.java))
CLASSES := $(SOURCES:%.java=%.class)
all: idl code
all: code
# Utils needs to be built before controller
uk/ac/sanger/artemis/circular/digest/CircularGenomeController.class:uk/ac/sanger/artemis/circular/digest/Utils.class
......@@ -39,27 +40,12 @@ uk/ac/sanger/artemis/circular/digest/CircularGenomeController.class:uk/ac/sanger
code: $(CLASSES)
topdown: idl
topdown:
$(REAL_CLASSPATH) $(JAVAC) uk/ac/sanger/artemis/components/ArtemisMain.java
%.class : %.java
$(REAL_CLASSPATH) $(JAVAC) $<
idl : type/*.java nsdb/*.java seqdb/*.java
IDL = idlj
IDLCMD = $(IDL) -Icorba
type/*.java : corba/types.idl
$(IDLCMD) corba/types.idl
nsdb/*.java : corba/nsdb.idl corba/nsdb_write.idl
$(IDLCMD) corba/nsdb.idl
$(IDLCMD) corba/nsdb_write.idl
seqdb/*.java : corba/seqdb.idl
$(IDLCMD) corba/seqdb.idl
doc :
$(REAL_CLASSPATH) javadoc -J-mx200m -version \
AppGlobal.java \
......@@ -70,69 +56,66 @@ doc :
manual :
(cd docs; make)
CLASS_FILES := `find org uk nsdb type seqdb -name '*.class' -print`
CLASS_FILES := `find org uk -name '*.class' -print`
OTHER_FILES := `find images/PSUlogo.gif images/icon.gif COPYING README.md`
OTHER_FILES := `find images/Wellcome_Sanger_Institute_Logo_Landscape_Digital_RGB_Full_Colour.jpg images/icon.gif README.md`
dist :
rm -rf artemis_compiled.tar.gz tar_build
mkdir tar_build
mkdir tar_build/artemis
rm -f artemis_compiled_latest.tar.gz
tar cf - $(OTHER_FILES) act art Makefile corba etc | (cd tar_build/artemis; tar xf -)
tar cf - artemis_sqlmap dnaplotter uk org nsdb type seqdb lib | (cd tar_build/artemis; tar xf -)
tar cf - $(OTHER_FILES) act art dnaplotter bamview setenv Makefile etc | (cd tar_build/artemis; tar xf -)
tar cf - artemis_sqlmap dnaplotter uk org lib | (cd tar_build/artemis; tar xf -)
(cd tar_build; find . -name 'CVS' -print | xargs rm -rf; find . -name '.svn' -print | xargs rm -rf; tar cvf ../artemis_compiled.tar artemis)
jar : all artemis.jar
artemis.jar : $(CLASSES)
mkdir jar_build
rm -f artemis.jar
cd jar_build; \
if [ ! -d org ]; then \
for fileJar in ../lib/*.jar; do \
mkdir -p jar_build/build
rm -f *.jar
cd jar_build/build; \
for fileJar in ../../lib/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/j2ssh/*.jar; do \
for fileJar in ../../lib/j2ssh/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/ibatis/*.jar; do \
for fileJar in ../../lib/ibatis/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/batik/*.jar; do \
for fileJar in ../../lib/batik/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/picard/*.jar; do \
for fileJar in ../../lib/picard/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
fi; \
cp -R ../lib/LICENSE.Apache ../uk ../org ../nsdb ../type ../seqdb ../etc ../images ../lib/j2ssh/j2ssh.properties \
../images/PSUlogo.gif ../images/icon.gif ../README.md ../artemis_sqlmap .
find jar_build -name '*.java' -print | xargs rm -f
find jar_build -name '.svn' -print | xargs rm -rf
cd jar_build; \
cp -R ../../lib/LICENSE.* ../../uk ../../org ../../etc ../../images ../../lib/j2ssh/j2ssh.properties \
../../images/Wellcome_Sanger_Institute_Logo_Landscape_Digital_RGB_Full_Colour.jpg ../../images/icon.gif ../../README.md ../../artemis_sqlmap .
find jar_build/build -name '*.java' -print | xargs rm -f
find jar_build/build -name '.svn' -print | xargs rm -rf
find jar_build/build -name '*.DS_Store' -print | xargs rm -rf
cd jar_build/build; \
rm -rf META-INF/MANIFEST.MF; \
echo "Main-Class: uk.ac.sanger.artemis.components.ArtemisMain\nPermissions: all-permissions" > manifest-art; \
jar cmf manifest-art artemis.jar META-INF/services images/PSUlogo.gif images/icon.gif README.md etc \
artemis_sqlmap org uk com net nsdb type seqdb LICENSE.Apache j2ssh.properties; \
jar cmf manifest-art ../artemis.jar META-INF/services images/Wellcome_Sanger_Institute_Logo_Landscape_Digital_RGB_Full_Colour.jpg images/icon.gif README.md etc \
artemis_sqlmap org uk com net htsjdk picard gov joptsimple ngs freemarker LICENSE.Apache LICENSE.Picard LICENSE.JDBC LICENSE j2ssh.properties; \
echo "Main-Class: uk.ac.sanger.artemis.circular.DNADraw\nPermissions: all-permissions" > manifest-circular; \
jar cmf manifest-circular DNAPlotter.jar images/PSUlogo.gif README.md etc \
uk org/gmod org/w3c org/apache org/biojava/bio/ com/ibatis/common/jdbc/ net/sf/samtools/ LICENSE.Apache j2ssh.properties; \
jar cmf manifest-circular ../DNAPlotter.jar images/Wellcome_Sanger_Institute_Logo_Landscape_Digital_RGB_Full_Colour.jpg README.md etc \
org uk com net htsjdk picard gov joptsimple ngs freemarker LICENSE.Apache LICENSE.Picard LICENSE.JDBC LICENSE j2ssh.properties; \
echo "Main-Class: uk.ac.sanger.artemis.components.alignment.BamView\nPermissions: all-permissions" > manifest-bamview; \
jar cmf manifest-bamview BamView.jar META-INF/services etc uk org/apache org/biojava org/biojavax org/gmod org/w3c net/sf com/ibatis; \
jar cmf manifest-bamview ../bamview.jar META-INF/services etc org uk com net htsjdk picard gov joptsimple ngs freemarker LICENSE.Apache LICENSE.Picard LICENSE.JDBC LICENSE; \
echo "Main-Class: uk.ac.sanger.artemis.components.ActMain\nPermissions: all-permissions" > manifest-act; \
jar cmf manifest-act act.jar META-INF/services images/PSUlogo.gif images/icon.gif README.md etc \
artemis_sqlmap org uk com net nsdb type seqdb LICENSE.Apache j2ssh.properties; \
rm -f etc/log4j.properties; \
jar cmf manifest-art artemis_mac.jar images/PSUlogo.gif images/icon.gif README.md \
uk org/gmod nsdb type seqdb LICENSE.Apache artemis_sqlmap
jar cmf manifest-act ../act.jar META-INF/services images/Wellcome_Sanger_Institute_Logo_Landscape_Digital_RGB_Full_Colour.jpg images/icon.gif README.md etc \
artemis_sqlmap org uk com net htsjdk picard gov joptsimple ngs freemarker LICENSE.Apache LICENSE.Picard LICENSE.JDBC LICENSE j2ssh.properties; \
rm -rf jar_build/build;
clean :
-rm -rf *.html artemis.jar seqdb nsdb type resources uk/ac/sanger/jcon/ jar_build tar_build artemis_compiled.tar
-rm -rf *.html artemis.jar resources uk/ac/sanger/jcon/ jar_build tar_build artemis_compiled.tar
-rm -rf TAGS* *.o
-find . -name '*.class' -print | xargs rm -f
......@@ -18,10 +18,17 @@ of the entire sequences and their annotation.
# DOCUMENTATION
The Artemis user manual is at:
http://www.sanger.ac.uk/resources/software/artemis/
http://www.sanger.ac.uk/science/tools/artemis
The ACT user manual is at:
http://www.sanger.ac.uk/resources/software/act/
http://www.sanger.ac.uk/science/tools/artemis-comparison-tool-act
The DNA plotter user manual is at:
http://www.sanger.ac.uk/science/tools/dnaplotter
The BAM View user manual is at:
http://www.sanger.ac.uk/science/tools/bamview
# INSTALLATION
......@@ -34,12 +41,12 @@ Artemis may be freely distributed under the terms of the GNU Public License,
and should run on any system with a recent version of Java.
For information on how to get Artemis see this web page:
http://www.sanger.ac.uk/resources/software/artemis/
http://www.sanger.ac.uk/science/tools/artemis
# COPYRIGHT
Copyright (C) 1998-2013 Genome Research Limited
Copyright (C) 1998-2018 Genome Research Limited
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
......
#!/bin/sh -
#!/bin/bash -
# This script will start ACT on a UNIX system. This script should
# be left in the same directory as the rest of the ACT
# 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.
#
# This script will start ACT on a UNIX system.
#
QUIET=no
PRG=$0
# $Header: //tmp/pathsoft/artemis/act,v 1.15 2009-08-10 08:14:46 tjc Exp $
usage () {
echo "SYNOPSIS"
echo " Artemis Comparison Tool (ACT): Genome Comparison Tool"
echo "USAGE"
echo " $0 [options] <SEQUENCE_1> <COMPARISON_1_2> <SEQUENCE_2> ..."
echo "OPTIONS"
echo " SEQUENCE An EMBL, GenBank, FASTA, or GFF3 file"
echo " FEATURE An Artemis TAB file, or GFF file"
echo " COMPARISON A BLAST comparison file in tabular format"
echo
echo " -options FILE Read a text file of options from FILE"
echo " -chado Connect to a Chado database (using PGHOST, PGPORT, PGDATABASE, PGUSER environment variables)"
echo
echo " -Dblack_belt_mode=? Keep warning messages to a minimum [true,false]"
echo " -DuserplotX=FILE[,FILE2] For sequence 'X' open one or more userplots"
echo " -DloguserplotX=FILE[,FILE2] For sequence 'X' open one or more userplots, take log(data)"
echo " -DbamX=FILE[,FILE2,...] For sequence 'X' open one or more BAM, CRAM, VCF, or BCF files"
echo " -Dchado=\"h:p/d?u\" Get ACT to open this CHADO database"
echo " -Dread_only Open CHADO database read-only"
echo "EXAMPLES"
echo " % act"
echo " % act af063097.embl af063097_v_b132222.crunch b132222.embl"
echo " % act -Dblack_belt_mode=true -Dbam1=MAL_0h.bam -Dbam2=MAL_7h.bam,var.raw.new.bcf"
echo " % act -Duserplot2=/pathToFile/userPlot"
echo
echo "HOMEPAGE"
echo " http://www.sanger.ac.uk/science/tools/artemis-comparison-tool-act"
echo
exit 1
}
add_proxy_properties() {
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_PROXY
fi
# resolve links - $0 may be a link
PRG=$0
progname=`basename $0`
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_proxy
fi
#PSU_PROD_JAVA_VERSION=1.4.2
#. $PSU_CONFIG_DIR/shell/java_environment.sh
if [[ "$http_proxy" != "" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -DproxySet=true "`echo $http_proxy | sed 's/http:\/\/\(.*\):\(.*\)/ -Dhttp.proxyHost=\1 -Dhttp.proxyPort=\2/'`
fi
}
#
# Resolve links - $0 may be a link
#
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
......@@ -26,125 +70,89 @@ while [ -h "$PRG" ] ; do
fi
done
ACT_HOME=`dirname "$PRG"`/.
CLASSPATH=$ACT_HOME:$ACT_HOME/lib/JacORB.jar:$ACT_HOME/lib/jemAlign.jar:$ACT_HOME/lib/jakarta-regexp-1.2.jar:$ACT_HOME/lib/macos.jar:$ACT_HOME/lib/chado-14-interface.jar:$ACT_HOME/lib/postgresql-8.4-701.jdbc3.jar:$CLASSPATH
# batik jars
CLASSPATH=$CLASSPATH:$ACT_HOME/lib/batik/batik-awt-util.jar:$ACT_HOME/lib/batik/batik-dom.jar:$ACT_HOME/lib/batik/batik-ext.jar:$ACT_HOME/lib/batik/batik-svggen.jar:$ACT_HOME/lib/batik/batik-util.jar:$ACT_HOME/lib/batik/batik-xml.jar
# j2ssh jars
CLASSPATH=$CLASSPATH:$ACT_HOME/lib/j2ssh/commons-logging.jar:$ACT_HOME/lib/j2ssh/j2ssh-core.jar:$ACT_HOME/lib/j2ssh/
# iBatis jars
CLASSPATH=$CLASSPATH:$ACT_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$ACT_HOME/lib/ibatis/:$ACT_HOME/lib/ibatis/log4j-1.2.14.jar:$ACT_HOME/lib/ibatis/cglib-nodep-2.2.jar:$ACT_HOME/lib/retrotranslator-runtime-1.1.0.jar
# picard jars
CLASSPATH=$ACT_HOME/lib/picard/sam.jar:$ACT_HOME/lib/picard/picard.jar:$CLASSPATH
CLASSPATH="$ACT_HOME/lib/commons-lang-2.6.jar:$CLASSPATH"
export CLASSPATH
ACT_PROPERTIES="-Dartemis.environment=UNIX"
MEM="-mx500m -ms20m"
if [ "$JVM_FLAGS" = "" ]
then
FLAGS="$MEM -noverify"
else
FLAGS="$MEM -noverify $JVM_FLAGS"
fi
# work-around for OSF JVM core dump problem
if [ `uname` = OSF1 ]
then
FLAGS="$FLAGS -Dsimple_splash_screen=true"
fi
QUIET=no
if [ $# = 0 ]
# Special Sanger override on chado PGUSER
if [[ "$ARTEMIS_SANGER_DBUSER" != "" ]]
then
:
else
if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]
then
cat <<EOF
SYNOPSIS
Artemis Comparison Tool (ACT): Genome Comparison Tool
USAGE
$0 [options] <SEQUENCE_1> <COMPARISON_1_2> <SEQUENCE_2> ...
OPTIONS
SEQUENCE An EMBL, GenBank, FASTA, or GFF3 file
FEATURE An Artemis TAB file, or GFF file
COMPARISON A BLAST comparison file in tabular format
-options FILE Read a text file of options from FILE
-debug Run using the debugging JVM instead
-Dblack_belt_mode=? Keep warning messages to a minimum [true,false]
-DuserplotX=FILE[,FILE2] For sequence 'X" open one or more userplots
-DloguserplotX=FILE[,FILE2] For sequence 'X" open one or more userplots, take log(data)
-DbamX=FILE[,FILE2,...] For sequence 'X" open one or more BAM, VCF, or BCF files
-Dchado="h:p/d?u" Get ACT to open this CHADO database
-Dread_only Open CHADO database read-only
EXAMPLES
% act
% act af063097.embl af063097_v_b132222.crunch b132222.embl
% act -Dblack_belt_mode=true -Dbam1=MAL_0h.bam -Dbam2=MAL_7h.bam,var.raw.new.bcf
% act -Duserplot2=/pathToFile/userPlot
HOMEPAGE
http://www.sanger.ac.uk/resources/software/act/
EOF
exit 0
export PGUSER=$ARTEMIS_SANGER_DBUSER
fi
#
# Parse arguments.
#
APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX $SANGER_ARTEMIS_OPTIONS"
while test $# != 0
do
case $1 in
-options) FLAGS="$FLAGS -Dextra_options=$2"; shift ;;
-D*) FLAGS="$FLAGS $1" ;;
-fast) FLAGS="$FLAGS -fast" ;;
-quiet) QUIET=yes ; FLAGS="$FLAGS -Drun_quietly=true" ;;
-debug) DEBUG=yes ;;
-options) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dextra_options=$2"; shift ;;
-chado) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dchado=$PGHOST:$PGPORT/$PGDATABASE?$PGUSER -Dibatis" ;;
-D*) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES $1" ;;
-quiet) QUIET=yes ; APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Drun_quietly=true" ;;
-help) usage ;;
--help) usage ;;
-h) usage ;;
*) break ;;
esac
shift
done
fi
if [ "$JAVA_VM" = "" ]
then
if [ "$DEBUG" = yes ]
APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=act.jar
JAR_FILE=$APPLICATION_HOME/$JAR_NAME
#
# Use a custom Java version if necessary
#
if [[ "$ARTEMIS_JAVA_JRE" = "" ]]
then
JAVA=java_g
JAVA=`which java`
else
JAVA=java
JAVA_HOME=$ARTEMIS_JAVA_JRE
JAVA=$ARTEMIS_JAVA_JRE/bin/java
fi
#
# Allow URLs to work from behind firewalls.
#
add_proxy_properties
#
# "-mx1g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
then
FLAGS="-mx2g -ms100m -noverify"
else
JAVA=$JAVA_VM
FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi
PLATTMP=`uname`
if [ "$PLATTMP" = "Darwin" ]
if [[ "$PLATTMP" = "Darwin" ]]
then
FLAGS="$FLAGS -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=ACT"
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=ACT"
fi
if [[ "$QUIET" = no ]]
then
echo "Starting ACT with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi
if [ $QUIET = no ]
if [[ -e $JAR_FILE ]]
then
echo starting ACT with flags: $FLAGS 1>&2
$JAVA $FLAGS $APPLICATION_PROPERTIES -jar $JAR_FILE $*
result=$?
else
CLASSPATH=$APPLICATION_HOME:$APPLICATION_HOME/lib/biojava.jar:$APPLICATION_HOME/lib/jemAlign.jar:$APPLICATION_HOME/lib/jakarta-regexp-1.2.jar:$APPLICATION_HOME/lib/postgresql-8.4-701.jdbc3.jar:$CLASSPATH
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/batik/batik-awt-util.jar:$APPLICATION_HOME/lib/batik/batik-dom.jar:$APPLICATION_HOME/lib/batik/batik-ext.jar:$APPLICATION_HOME/lib/batik/batik-svggen.jar:$APPLICATION_HOME/lib/batik/batik-util.jar:$APPLICATION_HOME/lib/batik/batik-xml.jar:$APPLICATION_HOME/lib/batik/batik-codec.jar
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/j2ssh/commons-logging.jar:$APPLICATION_HOME/lib/j2ssh/j2ssh-core.jar:$APPLICATION_HOME/lib/j2ssh/
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$APPLICATION_HOME/lib/ibatis/:$APPLICATION_HOME/lib/ibatis/log4j-1.2.14.jar:$APPLICATION_HOME/lib/ibatis/cglib-nodep-2.2.jar
CLASSPATH=$APPLICATION_HOME/lib/picard/picard.jar:$APPLICATION_HOME/lib/commons-net-3.6.jar:$CLASSPATH
CLASSPATH=$APPLICATION_HOME/lib/commons-lang-2.6.jar:$CLASSPATH
export CLASSPATH
$JAVA $FLAGS $APPLICATION_PROPERTIES uk.ac.sanger.artemis.components.ActMain $*
result=$?
fi
$JAVA $FLAGS -Djdbc.drivers=org.postgresql.Driver $ACT_PROPERTIES uk.ac.sanger.artemis.components.ActMain $*
exit $result
#!/bin/sh -
# This script will start ACT on a UNIX system. This script should
# be left in the same directory as the rest of the ACT
# 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/act.command,v 1.1 2005-06-20 09:56:09 tjc Exp $
# resolve links - $0 may be a link
PRG=$0
progname=`basename $0`
#PSU_PROD_JAVA_VERSION=1.4.2
#. $PSU_CONFIG_DIR/shell/java_environment.sh
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
ACT_HOME=`dirname "$PRG"`/.
CLASSPATH=$ACT_HOME:$ACT_HOME/lib/JacORB.jar:$ACT_HOME/lib/jemAlign.jar:$ACT_HOME/lib/jakarta-regexp-1.2.jar:$ACT_HOME/lib/macos.jar:$CLASSPATH
export CLASSPATH
ACT_PROPERTIES="-Dartemis.environment=UNIX"
MEM="-mx150m -ms20m"
if [ "$JVM_FLAGS" = "" ]
then
FLAGS="$MEM -noverify"
else
FLAGS="$MEM -noverify $JVM_FLAGS"
fi
# work-around for OSF JVM core dump problem
if [ `uname` = OSF1 ]
then
FLAGS="$FLAGS -Dsimple_splash_screen=true"
fi
QUIET=no
if [ $# = 0 ]
then
:
else
if [ x$1 = x-h -o x$1 = x--help ]
then
cat <<EOF
usage: $0 [EMBL/GENBANK/SEQUENCE file] [EMBL/GENBANK/SEQUENCE file] [crunch file]
EOF
exit 0
fi
while test $# != 0
do
case $1 in
-options) FLAGS="$FLAGS -Dextra_options=$2"; shift ;;
-D*) FLAGS="$FLAGS $1" ;;
-fast) FLAGS="$FLAGS -fast" ;;
-quiet) QUIET=yes ; FLAGS="$FLAGS -Drun_quietly=true" ;;
-debug) DEBUG=yes ;;
*) break ;;
esac
shift
done
fi
if [ "$JAVA_VM" = "" ]
then
if [ "$DEBUG" = yes ]
then
JAVA=java_g
else
JAVA=java
fi
else
JAVA=$JAVA_VM
fi
if [ $QUIET = no ]
then
echo starting ACT with flags: $FLAGS 1>&2
fi
$JAVA -Dcom.apple.mrj.application.apple.menu.about.name="ACT" $FLAGS $ACT_PROPERTIES uk.ac.sanger.artemis.components.ActMain $*
#!/bin/sh -
#!/bin/bash -
# 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.
#
# This script will start Artemis on a UNIX system.
#
# resolve links - $0 may be a link
QUIET=no
PRG=$0
progname=`basename $0`
#PSU_PROD_JAVA_VERSION=1.4.2
#. $PSU_CONFIG_DIR/shell/java_environment.sh
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
# batik jars
CLASSPATH=$CLASSPATH:$ARTEMIS_HOME/lib/batik/batik-awt-util.jar:$ARTEMIS_HOME/lib/batik/batik-dom.jar:$ARTEMIS_HOME/lib/batik/batik-ext.jar:$ARTEMIS_HOME/lib/batik/batik-svggen.jar:$ARTEMIS_HOME/lib/batik/batik-util.jar:$ARTEMIS_HOME/lib/batik/batik-xml.jar:$ARTEMIS_HOME/lib/batik/batik-codec.jar
# j2ssh jars
CLASSPATH=$CLASSPATH:$ARTEMIS_HOME/lib/j2ssh/commons-logging.jar:$ARTEMIS_HOME/lib/j2ssh/j2ssh-core.jar:$ARTEMIS_HOME/lib/j2ssh/
# iBatis jars
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
export CLASSPATH
# picard jars
CLASSPATH=$ARTEMIS_HOME/lib/picard/sam.jar:$ARTEMIS_HOME/lib/picard/picard.jar:$ARTEMIS_HOME/lib/commons-net-2.2.jar:$CLASSPATH
CLASSPATH="$ARTEMIS_HOME/lib/commons-lang-2.6.jar:$CLASSPATH"
export CLASSPATH
ARTEMIS_PROPERTIES="-Dartemis.environment=UNIX"
# Allow URLs to work from behind firewalls
if [ "$http_proxy" = "" ]
usage () {
echo "SYNOPSIS"
echo " Artemis: Genome Browser and Annotation Tool"
echo "USAGE"
echo " $0 [options] <SEQUENCE_FILE> [+FEATURE_FILE ...]"
echo "OPTIONS"
echo " SEQUENCE_FILE An EMBL, GenBank, FASTA, or GFF3 file"
echo " FEATURE_FILE An Artemis TAB file, or GFF file"
echo
echo " -options FILE Read a text file of options from FILE"
echo " -chado Connect to a Chado database (using PGHOST, PGPORT, PGDATABASE, PGUSER environment variables)"
echo
echo " -Dblack_belt_mode=? Keep warning messages to a minimum [true,false]"
echo " -Doffset=XXX Open viewer at base position XXX [integer >= 1]"
echo " -Duserplot=FILE[,FILE2] Open one or more userplots"
echo " -Dloguserplot=FILE[,FILE2] Open one or more userplots, take log(data)"
echo " -Dbam=FILE[,FILE2,...] Open one or more BAM, CRAM, VCF or BCF files"
echo " -DbamClone=n Open all BAM, CRAM, VCF or BCF files in multiple (n > 1) panels"
echo " -Dbam[1,2,..]=FILE[,FILE2,..] Open BAM, CRAM, VCF or BCF files in separate panels"
echo " -Dshow_snps Show SNP marks in BamView"
echo " -Dshow_snp_plot Open SNP plot in BamView"
echo " -Dshow_cov_plot Open coverage plot in BamView"
echo " -Dshow_forward_lines=? Hide/show forward frame lines [true,false]"
echo " -Dshow_reverse_lines=? Hide/show reverse frame lines [true,false]"
echo " -Dchado=\"h:p/d?u\" Get Artemis to open this CHADO database"
echo " -Dread_only Open CHADO database read-only"
echo "EXAMPLES"
echo " % art AJ006275.embl"
echo " % art contigs.fa +annotation.gff +islands.tab"
echo " % art -Dblack_belt_mode=true -Dbam=ecoli_hiseq.bam E_coli_K12.gbk"
echo " % art -Duserplot=repeatmap.plot,geecee.plot Plasmid.gff3"
echo "HOMEPAGE"
echo " http://www.sanger.ac.uk/science/tools/artemis"
echo
exit 1
}
add_proxy_properties() {
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_PROXY
fi
if [ "$http_proxy" = "" ]
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_proxy
fi
if [ "$http_proxy" != "" ]
if [[ "$http_proxy" != "" ]]
then
ARTEMIS_PROPERTIES="$ARTEMIS_PROPERTIES -DproxySet=true "`echo $http_proxy | sed 's/http:\/\/\(.*\):\(.*\)/ -Dhttp.proxyHost=\1 -Dhttp.proxyPort=\2/'`
APPLICATION_PROPERTIES="$APPLICATION_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"
#
# Resolve links - $0 may be a link
#
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
FLAGS="$MEM -noverify $JVM_FLAGS"
PRG="`dirname $PRG`/$link"
fi
done
QUIET=no
DEBUG=no
if [ $# = 0 ]
then
:
else
if [ "$1" = "-h" -o "$1" = "--help" -o "$1" = "-help" ]
# Special Sanger override on chado PGUSER
if [[ "$ARTEMIS_SANGER_DBUSER" != "" ]]
then
cat <<EOF
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
-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
-Dloguserplot=FILE[,FILE2] Open one or more userplots, take log(data)
-Dbam=FILE[,FILE2,...] Open one or more BAM, VCF or BCF files
-DbamClone=n Open all BAMs in multiple (n > 1) panels
-Dbam[1,2,..]=FILE[,FILE2,..] Open BAMs in separate panels
-Dshow_snps Show SNP marks in BamView
-Dshow_snp_plot Open SNP plot in BamView
-Dshow_cov_plot Open coverage plot in BamView
-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/
EOF
exit 0
export PGUSER=$ARTEMIS_SANGER_DBUSER
fi
#
# Parse arguments.
#
APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX $SANGER_ARTEMIS_OPTIONS"
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 ;;
-options) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dextra_options=$2"; shift ;;
-chado) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dchado=$PGHOST:$PGPORT/$PGDATABASE?$PGUSER -Dibatis" ;;
-D*) APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES $1" ;;
-quiet) QUIET=yes ; APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Drun_quietly=true" ;;
-help) usage ;;
--help) usage ;;
-h) usage ;;
*) break ;;
esac
shift
done
fi
FLAGS=$FAST_FLAG$FLAGS
APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=artemis.jar
JAR_FILE=$APPLICATION_HOME/$JAR_NAME
if [ "$JAVA_VM" = "" ]
#
# Use a custom Java version if necessary
#
if [[ "$ARTEMIS_JAVA_JRE" = "" ]]
then
if [ "$DEBUG" = yes ]
then
JAVA=java_g
JAVA=`which java`
else
JAVA=java
JAVA_HOME=$ARTEMIS_JAVA_JRE
JAVA=$ARTEMIS_JAVA_JRE/bin/java
fi
#
# Allow URLs to work from behind firewalls.
#
add_proxy_properties
#
# "-mx1g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
then
FLAGS="-mx2g -ms100m -noverify"
else
JAVA=$JAVA_VM
FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi
PLATTMP=`uname`
if [ "$PLATTMP" = "Darwin" ]
if [[ "$PLATTMP" = "Darwin" ]]
then
FLAGS="$FLAGS -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=Artemis"
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name=Artemis"
fi
if [ "$QUIET" = no ]
if [[ "$QUIET" = "no" ]]
then
echo starting Artemis with flags: $FLAGS $ARTEMIS_PROPERTIES 1>&2
echo "Starting Artemis with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi
$JAVA -Djdbc.drivers=org.postgresql.Driver $FLAGS $ARTEMIS_PROPERTIES uk.ac.sanger.artemis.components.ArtemisMain $*
if [[ -e $JAR_FILE ]]
then
$JAVA $FLAGS $APPLICATION_PROPERTIES -jar $JAR_FILE $*
result=$?
else
CLASSPATH=$APPLICATION_HOME:$APPLICATION_HOME/lib/biojava.jar:$APPLICATION_HOME/lib/jemAlign.jar:$APPLICATION_HOME/lib/jakarta-regexp-1.2.jar:$APPLICATION_HOME/lib/postgresql-8.4-701.jdbc3.jar:$CLASSPATH
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/batik/batik-awt-util.jar:$APPLICATION_HOME/lib/batik/batik-dom.jar:$APPLICATION_HOME/lib/batik/batik-ext.jar:$APPLICATION_HOME/lib/batik/batik-svggen.jar:$APPLICATION_HOME/lib/batik/batik-util.jar:$APPLICATION_HOME/lib/batik/batik-xml.jar:$APPLICATION_HOME/lib/batik/batik-codec.jar
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/j2ssh/commons-logging.jar:$APPLICATION_HOME/lib/j2ssh/j2ssh-core.jar:$APPLICATION_HOME/lib/j2ssh/
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$APPLICATION_HOME/lib/ibatis/:$APPLICATION_HOME/lib/ibatis/log4j-1.2.14.jar:$APPLICATION_HOME/lib/ibatis/cglib-nodep-2.2.jar
CLASSPATH=$APPLICATION_HOME/lib/picard/picard.jar:$APPLICATION_HOME/lib/commons-net-3.6.jar:$CLASSPATH
CLASSPATH=$APPLICATION_HOME/lib/commons-lang-2.6.jar:$CLASSPATH
export CLASSPATH
$JAVA $FLAGS $APPLICATION_PROPERTIES uk.ac.sanger.artemis.components.ArtemisMain $*
result=$?
fi
exit $result
File mode changed from 100644 to 100755
#!/bin/bash -
#
# This script will start Bam View on a UNIX system.
#
QUIET=no
PRG=$0
add_proxy_properties() {
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_PROXY
fi
if [[ "$http_proxy" = "" ]]
then
http_proxy=$HTTP_proxy
fi
if [[ "$http_proxy" != "" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -DproxySet=true "`echo $http_proxy | sed 's/http:\/\/\(.*\):\(.*\)/ -Dhttp.proxyHost=\1 -Dhttp.proxyPort=\2/'`
fi
}
#
# Resolve links - $0 may be a link
#
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
APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX $SANGER_ARTEMIS_OPTIONS"
APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=bamview.jar
JAR_FILE=$APPLICATION_HOME/$JAR_NAME
#
# Use a custom Java version if necessary
#
if [[ "$ARTEMIS_JAVA_JRE" = "" ]]
then
JAVA=`which java`
else
JAVA_HOME=$ARTEMIS_JAVA_JRE
JAVA=$ARTEMIS_JAVA_JRE/bin/java
fi
#
# Allow URLs to work from behind firewalls.
#
add_proxy_properties
#
# "-mx1g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
then
FLAGS="-mx2g -ms100m -noverify"
else
FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi
PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dcom.apple.mrj.application.apple.menu.about.name=BamView"
fi
if [[ "$QUIET" = "no" ]]
then
echo "Starting BamView with arguments: $FLAGS $APPLICATION_PROPERTIES $*"
fi
if [[ -e $JAR_FILE ]]
then
$JAVA $FLAGS $APPLICATION_PROPERTIES -jar $JAR_FILE $*
result=$?
else
CLASSPATH=$APPLICATION_HOME:$APPLICATION_HOME/lib/biojava.jar:$APPLICATION_HOME/lib/jemAlign.jar:$APPLICATION_HOME/lib/jakarta-regexp-1.2.jar:$APPLICATION_HOME/lib/postgresql-8.4-701.jdbc3.jar:$CLASSPATH
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/batik/batik-awt-util.jar:$APPLICATION_HOME/lib/batik/batik-dom.jar:$APPLICATION_HOME/lib/batik/batik-ext.jar:$APPLICATION_HOME/lib/batik/batik-svggen.jar:$APPLICATION_HOME/lib/batik/batik-util.jar:$APPLICATION_HOME/lib/batik/batik-xml.jar:$APPLICATION_HOME/lib/batik/batik-codec.jar
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/j2ssh/commons-logging.jar:$APPLICATION_HOME/lib/j2ssh/j2ssh-core.jar:$APPLICATION_HOME/lib/j2ssh/
CLASSPATH=$CLASSPATH:$APPLICATION_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$APPLICATION_HOME/lib/ibatis/:$APPLICATION_HOME/lib/ibatis/log4j-1.2.14.jar:$APPLICATION_HOME/lib/ibatis/cglib-nodep-2.2.jar
CLASSPATH=$APPLICATION_HOME/lib/picard/picard.jar:$APPLICATION_HOME/lib/commons-net-3.6.jar:$CLASSPATH
CLASSPATH=$APPLICATION_HOME/lib/commons-lang-2.6.jar:$CLASSPATH
export CLASSPATH
$JAVA $FLAGS $APPLICATION_PROPERTIES uk.ac.sanger.artemis.components.alignment.BamView $*
result=$?
fi
exit $result
......@@ -96,31 +96,17 @@
<target name="prepare-src" depends="init,prepare-core" />
<!-- Compile IDL stub classes into the build directory (jar preparation) -->
<target name="compile-idl" depends="init,prepare-core">
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/types.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/nsdb.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/nsdb_write.idl" />
</exec>
<exec executable="idlj" dir="${build.src.main}">
<arg line="-Icorba corba/seqdb.idl" />
</exec>
</target>
<!-- Compiles the source directory -->
<target name="compile" depends="init,compile-idl,prepare-src">
<target name="compile" depends="init,print-version,prepare-src">
<javac
target="1.8"
fork="true"
includeantruntime="false"
memoryinitialsize="256m"
memorymaximumsize="256m"
srcdir="${build.src.main}"
destdir="${build.dest.main}"
excludes="nsdb/**,seqdb/**,type/**,lib/**,src/**,uk/ac/sanger/artemis/components/MacHandler.java,uk/ac/sanger/artemis/components/filetree/FileTree.java,uk/ac/sanger/artemis/components/filetree/SshFileTree.java,uk/ac/sanger/artemis/ExternalProgramUtils.java"
excludes="lib/**,src/**,uk/ac/sanger/artemis/components/MacHandler.java,uk/ac/sanger/artemis/components/filetree/FileTree.java,uk/ac/sanger/artemis/components/filetree/SshFileTree.java,uk/ac/sanger/artemis/ExternalProgramUtils.java"
deprecation="false"
depend="no"
debug="true">
......@@ -163,4 +149,9 @@
<delete file="${name}-${version}.tar" />
<delete file="${name}-${version}.zip" />
</target>
<target name="print-version">
<echo>Java/JVM version: ${ant.java.version}</echo>
<echo>Java/JVM detail version: ${java.version}</echo>
</target>
</project>
// Apollo transport layer
// all syntax subject to change
// typedef sequence <Xxx> XxxList assumed
// maybe some of the paramsets should be
// more strongly typed
//
// Ewan Birney and Chris Mungall. Apollo list apollo@ebi.ac.uk
//
module Apollo {
exception NotSupported { string reason; }; // more exceptions to come
exception ProcessError { string reason; };
exception OutOfRange { string reason; };
exception NeedsUpdate { string reason;};
struct Param {
string name;
string value;
};
typedef sequence <Param> ParamList;
// use a enum for unit (%, ratio, etc)?
struct Score {
string type;
string value;
// EB - lets also have this as a number. Clients have to figure out by the
// type.
double double_value;
};
typedef sequence <Score> ScoreList;
// we should abstract out identifier aspects into
// a seperate struct - that way we can attach this to
// any kind of object
struct Identifier {
string name; //main display label
string description; //detailed desc
sequence <string> synonyms;
// DbXrefList dbxrefs;
};
typedef sequence <Identifier> IdentifierList;
enum StrandType { plus, minus};
// a range can be attached to any seq-featurey object
struct Range {
long range_min;
long range_max;
StrandType strand;
};
struct ResultSpan {
string result_id;
ScoreList scores;
Range range1;
Range range2;
};
typedef sequence<ResultSpan> ResultSpanList;
// any kind of analysis result or alignment
// (genscan-gene, genscan-exon, sim4exonset, sim4exon, blasthit,
// blast-hsp, etc)
struct ResultSet {
string result_id;
ScoreList scores;
string type;
ResultSpanList ResultSpans; // eg hsps for a blast hit
Range range1; // eg query start/end
Range range2; // eg subject start/end
};
typedef sequence <ResultSet> ResultSetList;
// Evidence is one of the Result lists
typedef string Evidence;
typedef sequence <Evidence> EvidenceList;
// collection of analysis results
struct Analysis {
// eg Blast, Pfam
string program;
ParamList parameters;
ResultList results;
};
typedef sequence <Analysis> AnalysisList;
// Annotation Comments etc
struct Person {
string readable_name;
string person_id;
}
typedef long TimeStamp;
struct Comment {
string comment_id;
string text;
Person person;
TimeStamp time;
};
typedef sequence<Comment> CommentList;
// Design decision: most of these inherit from a notional seqfeature
// superclass - do we (1) merge them into a single struct, with
// the seqfeature struct having 'type' and contained-seqfeatures
// or (2) have distinct structs and delegate out the commonalities.
// i chose the latter, with all the strcuts having a Range attribute
// to fetch the sequence for a gene, it has to be spliced
// from the exons
struct Exon {
Identifier ident;
Range range;
EvidenceList evidence_list;
};
typedef sequence <Exon> ExonList;
struct Transcript {
Identifier ident;
ExonList exons;
Range cds_Range; // start/end of translation
// note we don't need range including UTR, its implicit from exons
EvidenceList evidence_list;
CommentList comments;
};
typedef sequence <Transcript> TranscriptList;
enum GeneType { PROTEIN_CODING_GENE, TRNA_GENE, TRANSPOSON_GENE };
// Where does silly text annotation go?
struct AnnotatedGene {
GeneType type;
Identifier ident;
TranscriptList transcripts;
CommentList comments;
};
typedef sequence <AnnotatedGene> AnnotatedGeneList;
struct GenericAnnotation {
Identifier ident;
string type;
ParamList qualifiers;
CommentList comments;
Range range;
EvidenceList evidence_list;
};
typedef sequence <GenericAnnotation> GenericAnnotationList;
// collection of annotations and analyses on
// a particular piece of sequence
// (could be a clone, a contig , a scaffold (order&oriented contigs), an
// arbitrary slice of a scaffold, a chromosome, etc)
interface AnnotatedRegion {
// bind sequence here
string sequence_as_string();
string sequence_region_as_string(in long start,in long end)
raises ( OutOfRange );
// gets
AnalysisList get_analysis_list() raises ( ProcessError ) ;
AnnotatedGeneList get_gene_list() raises (ProcessError);
GenericAnnotation get_generic_annotation() raises (ProcessError);
// sets
void save_AnnotatedGenes(in AnnotatedGeneList new,
in AnnotatedGeneList updated,
in AnnotatedGeneList dead)
raises (NeedsUpdate, ProcessError,OutOfRange);
void save_GenericAnnotation(in GenericAnnotationList new,
in GenericAnnotationList updated,
in GenericAnnotationList dead)
raises (NeedsUpdate, ProcessError, OutOfRange );
};
// session [or persistence handle]
interface Session {
void connect(in ParamList param_set);
AnnotatedRegion get_AnnotatedRegion(in string id);
};
// singleton;
interface SessionManager {
Session initiate_Session(in ParamList param_set);
Session retrieve_Session(in ParamList param_set)
raises (NotSupported);
};
};
module Ensembl {
module artemis {
exception RequestedSequenceTooLong { };
exception NoEntry { string reason; };
interface BioSequence {
string getSubSequence(in long start,in long end) raises (RequestedSequenceTooLong);
long length();
long max_sequence_request();
};
struct Qualifier {
string name;
sequence<string> values;
};
typedef sequence <Qualifier> QualifierList;
interface Feature {
string getKey();
string getLocation();
QualifierList getQualifiers();
};
typedef sequence <Feature> FeatureList;
interface Entry {
string getName(); // accession number usually.
long getFeatureCount();
FeatureList getAllFeatures();
BioSequence getSequence();
};
typedef sequence<string> QualifierDefinitionList;
struct FeatureDefinition {
string key;
QualifierDefinitionList qualifiers;
};
typedef sequence<FeatureDefinition> FeatureDefinitionList;
typedef sequence<string> EntryNameList;
interface DB {
Entry getEntry(in string entryname) raises (NoEntry);
EntryNameList getallEntryNames();
// coordination of the ORB.
FeatureDefinitionList getFeatureDefinitionList();
};
};
};
/* **************************************************************************
* $Source: //tmp/pathsoft/artemis/corba/nsdb.idl,v $
* $Revision: 1.1 $
* $Date: 2004-06-09 12:06:34 $
* $Author: tjc $
* **************************************************************************/
// Version 2.0
#ifndef embl_ebi_nsdb_idl
#define embl_ebi_nsdb_idl
#include "types.idl"
#include "seqdb.idl"
/**
* IDL interfaces for the
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/embl_db.html">
* EMBL Nucleotide Sequence Database</A>.
*/
module nsdb {
// ====================
// Forward declarations
// ====================
interface NucSeq;
typedef sequence<NucSeq> NucSeqList;
interface NucFeature;
typedef sequence<NucFeature> NucFeatureList;
interface Location;
typedef sequence<Location> LocationList;
interface FeatureLocation;
typedef sequence<FeatureLocation> FeatureLocationList;
interface EntryInfo;
typedef sequence<EntryInfo> EntryInfoList;
/**
* If a sub-sequence is retrieved for which the location information is
* inexact, an InexactLocation is raised
*/
exception InexactLocation { string reason;};
/**
* The EMBL database contains information, which is not really part of the
* sequence information. This information is stored in the EntryInfo.
*/
interface EntryInfo {
/**
* Retrieve entry indentifier. More information on the
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/usrman/id_line.html">format</A> of
* an entry name is available in the
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/usrman/usrman.html">
* EMBL User Manual</A>.
*/
string getEntryName();
/**
* The entry version defines the current version of an EMBL Sequence Database
* Entry. I.e. the complete set information related to a particular sequence.
* The Entry version is incremented whenever anything changes in the sequence or it's
* associated information.
*/
unsigned long getEntryVersion();
/**
* Get entry status code.
* @see meta::nsdb
*/
string getEntryStatus();
/**
* Sequence of revisions when Entry was created/changed.
*/
type::RevisionList getRevisions();
/**
* List of secondary accession numbers. I.e. accession numbers
* of deprecated entries, now merged into the current entry or
* split over multiple entries, as decribed in the
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/usrman/ac_line.html">
* AC line</A> documentation in the User manual.
*/
type::stringList getSecondaryIds();
/**
* number of adenine
*/
unsigned long getCountA();
/**
* number of cytosine
*/
unsigned long getCountC();
/**
* number of guanine
*/
unsigned long getCountG();
/**
* number of thymine (in DNA sequence)
* or
* number of uracil (in RNA sequence)
*/
unsigned long getCountT();
};
// =========================
// Location
// =========================
/**
* A location is built from one or more nodes forming a tree
* local node IDs are only unique within a location tree
* the root node has id == 0
* the Node id defines the position of the node in the sequence<LocationNode>
* The value is relative to the current (parent) node
* e.g if the current node is at position x in the LocationNodes sequence
* and there is a childId with value j
* then the position of this child in the LocationNodes sequence will be x+j
*/
interface Location {
typedef sequence<unsigned long> IdList;
/**
* valid types of Location Nodes in a Location
* are defined by LocNodeTypeCode. Currently values 1-4 are in use.
* 6-10 are reserved for future use.
*/
typedef long LocNodeTypeCode;
/**
* The sequence segment is derived from another sequence
*/
const long VirtualSegment_ltc = 1;
/**
* The sequence segment is explicitly given as a DNA string.
*/
const long PhysicalSegment_ltc = 2;
/**
* Sequence is unknown. Only it's (estimated) size in known.
*/
const long Gap_ltc = 3;
/**
* defines how to link a set of LocationNodes
*/
const long Operator_ltc = 4;
/**
* Virtual segment of a sequence.The sequence segment is derived from another sequence.
* <p><dl>
* <dt>bio_seq_id
* <dd>sequence from which this segment is derived
* <dd>contains an accession number
* <dt>start
* <dd>start position of segment (inclusive)
* <dt>end
* <dd>end position of segment (inclusive)
* <dd>In the case that start defines a 'between' position, end is unused
* <dt>complement
* <dd> true if segment should be complemented before any further manipulations
* </dl>
*/
struct LocVirtualSegment {
string bio_seq_id;
type::Fuzzy start;
type::Fuzzy end;
boolean complement;
};
/**
* spacer between sequence fragments
*/
typedef type::Fuzzy LocGap;
/**
* The sequence segment is explicitly given as a DNA string
* that should be inserted literally.
*/
typedef string LocPhysicalSegment;
/**
* Location operator. This is a node in the location tree that combines
* nodes lower down in the tree
* <dl>
* <dt> op
* <dd> operator defining what to do with the nodes
* <dd> <dl>
* <dt> join
* <dd> The indicated elements should be joined (placed end-to-end)
* to form one contiguous sequence
* <dt> order
* <dd> The elements can be found in the specified order
* (5' to 3' direction), but nothing is implied about the
* reasonableness about joining them
* </dl>
* <dt> childIds
* <dd> identifiers of the child nodes
* <dd> Ids is an array of IDs relative to the current node
* e.g if the current node is at position x in the LocationNodes sequence
* and there is a childId with value j
* then the position of this child in the LocationNodes sequence will be x+j
*</dl>
*/
struct LocOperator {
string op;
IdList childIds;
};
union LocationNode_u switch (LocNodeTypeCode) {
case VirtualSegment_ltc: LocVirtualSegment virtual;
case PhysicalSegment_ltc: LocPhysicalSegment physical;
case Gap_ltc: LocGap gap;
case Operator_ltc: LocOperator operator;
};
typedef sequence<LocationNode_u> LocationNodeList;
/**
* retrieve
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/ft/components.html#location">
* string representation of location</A>
*/
string getLocationString();
/**
* retrieve tree representation of location
*/
LocationNodeList getNodes();
/**
* Create nucleotide sequence defined by location. This can imply getting
* fragments from multiple sequences and concatenating.
* If it is not possible to resolve the location into a single sequence
* (e.g. when it contains a 'group' operator, or gap nodes)
* each fragment will be returned as a seperate string. No assumption should be
* made on the order, if multiple fragments are returned
* @raises InexactLocation if an exact sequence cannot be
* determined due to the location being inexact
*/
string getSeq()
raises ( InexactLocation );
};
/**
* Location of a NucFeature
* This interface does not allow to change the nuc_feature
* If a location is assigned to a nucfeature, the inverse relation
* should be properly updated
* @see NucFeature.getLocation
*/
interface FeatureLocation : Location {
/**
* nucfeature to which the location is associated
*/
NucFeature getNucFeature();
};
// ============================
// Features
// ============================
/**
* Nucleotide Sequence Feature interface. Features are <I>owned</I> by a
* sequence and contain information about that (and maybe other) sequence.
* The relation between the feature and the sequence is defined by it's
* location.
* @see Location
*/
interface NucFeature : seqdb::Feature {
/**
* Qualifier TypeCode definitions.
* Each Qualifier type has an assigned typecode. values 1-100
* are reserved to allow for future extension.
* <p>
* this is a stripped down version of the <B>featuremeta</B> IDL. Types which
* are typedefs of the same base-type in <B>featuremeta</B> are not
* distinguished here.
* @see featuremeta
*/
typedef long QualifierTypeCode;
// values 1-100 are reserved for EBI QualifierTypeCodes
const long string_qtc = 1;
const long boolean_qtc = 2;
const long integer_qtc = 3;
const long real_qtc = 4;
const long TranslationException_qtc = 17;
const long CodonTranslation_qtc = 18;
const long Anticodon_qtc = 19;
const long SpliceConsensus_qtc = 20;
const long RepeatUnit_qtc = 21;
const long DbXref_qtc = 22;
union QualifierValue_u switch (QualifierTypeCode) {
// EBI typecodes
case boolean_qtc : boolean applicable;
case string_qtc : string text;
case integer_qtc : long integer;
case real_qtc : float real;
case TranslationException_qtc : type::TranslationException translation_exception;
case CodonTranslation_qtc : type::CodonTranslation codon_translation;
case Anticodon_qtc : type::AntiCodon anti_codon;
case SpliceConsensus_qtc : type::SpliceConsensus splice_consensus;
case RepeatUnit_qtc : type::RepeatUnit repeat_unit;
case DbXref_qtc : type::DbXref db_xref;
// add your own extension types below
#ifdef ANALYSIS
// analysis qualifier extension
// see analysis.idl
case ANALYSIS::Analysis_qtc : ANALYSIS::Scores score;
#endif
};
typedef sequence<QualifierValue_u> QualifierValueList;
/**
* Qualifier.<p>
* <dl>
* <dt> name
* <dd> name of the qualifier
* <dt> values
* <dd> sequence of QualifierValues. All QualifierValues associated with
* a single Qualifier are of the same type
* </dl>
*/
struct Qualifier {
string name;
QualifierValueList values;
};
typedef sequence<Qualifier> QualifierList;
/**
* Retrieve sequence of qualifiers.
* @raises type::NoResult if no qualifiers are associated with
* the feature.
*/
QualifierList getQualifiers()
raises (type::NoResult);
/**
* retrieve qualifier of a certain type.
* To find out which qualifier/feature combinations are valid, a client should
* query the NucFeatureMeta server.
* @raises type::NoResult if no qualifier of this type is associated with
* the feature
* @raises type::InvalidRelation if the requested qualifier cannot be
* associated to the current feature type
* @see metafeature::NucFeatureMeta
*/
Qualifier getQualifier(in string qualifier_name)
raises (type::NoResult, type::InvalidRelation);
/**
* If the location of the feature references multiple sequences, get a
* sequence of all sequences referenced
* This method is equivalent to retrieving the feature location, and looping
* through all location nodes to find the referenced sequences, converting
* the accession numbers into DbXref's.
*/
type::DbXrefList getNucSeqs();
/**
* retrieve location of feature.
* @raises type::NoResult if no location is associated with the feature.
*/
FeatureLocation getLocation()
raises (type::NoResult);
};
/**
* Generic Nucleotide sequence interface.
* The accession number is retrieved using the getBioSeqId method inherited from BioSeq.
* @see EmblSeq
* @see seqdb::BioSeq
*/
interface NucSeq : seqdb::BioSeq {
/**
* retrieve string representation of nucleotide sequence. Each character
* in the string is a
* <href="http://www.ebi.ac.uk/ebi_docs/embl_db/ft/iupac_codes.html">
* IUPAC nucleotide base code</A>
* <P>
* This method can be used instead of the getAnySeq()
* method in seqdb::BioSeq
* @see seqdb::BioSeq
*/
string getSeq();
/**
* Checksum on sequence to allow validation.
*
*/
unsigned long getCheckSum();
/**
* topology of the nucleotide sequence
* @see meta::nsdb
*/
string getTopology();
/**
* molecule type of the nucleotide sequence
* @see meta::nsdb
*/
string getMoleculeType();
/**
* retrieve sequence of NucFeatureList associated with
* the nucleotide sequence.
* A sequence has <I>ownership</I> of all these
* features. It is possible on the other hand that
* features, owned by another sequence, reference
* the current sequence. Currently there is no way to find out.
* @raises type::NoResult if no features are owned by the sequence
*/
NucFeatureList getNucFeatures()
raises (type::NoResult);
/**
* A location of a NucFeature can span multiple sequences.
* If only the location of a feature relevant to the current
* sequence is required, this method will calculate that.
* @parm nuc_feature Feature from which location needs to be
* intersected with the current sequence.
* @raises type::InvalidRelation if the nuc_feature
* is not associated to the current sequence
*/
Location getLocalLocation(in NucFeature nuc_feature)
raises (type::InvalidRelation);
/**
* organism(s) from which the NucSeq was obtained.
* If the sequence is chimeric, multiple organisms will be returned.
* For each organism, there should be a source feature associated
* with the current sequence. This source feature has a location
* defining which part of the sequence was derived from the specified
* organism.
* This method provides a shortcut to:
* invoke getNucFeaturesByKey("source"), invoke getQualifiers() on each
* source feature and loop through qualifiers to find DbXref.
* @raises type::NoResult if no source features are associated with
* the sequence (should never happen).
*/
type::DbXrefList getOrganisms()
raises (type::NoResult);
/**
* retreive all features of a specific kind (FeatureKey)
* @parm key Type of features to be retrieved
* @raises type::NoResult if the sequence has no associated features
* of the requested type.
* @raises type::InvalidArgumentValue if the key is not a
* <A href="http://www.ebi.ac.uk/ebi_docs/embl_db/ft/feature_table.html">
* valid feature key</A>
* @see NucFeature
*/
NucFeatureList getNucFeaturesByKey(in string key)
raises (type::NoResult, type::InvalidArgumentValue);
/**
* Create nucleotide sequence of the segment specified
* The first base in the sequence is numbered 1
*
* @parm start first base of sub-sequence (inclusive)
* @parm end last base of sub-sequence (inclusive)
* @raises type::IndexOutOfRange if start &lt 1
* or end &gt length
*/
string getSubSeq(in unsigned long start, in unsigned long end)
raises (type::IndexOutOfRange);
/**
* Create nucleotide sequence of the location derived from the specified feature
* and contained in the current NucSeq.
* @raises type::InvalidRelation if the nuc_feature
* is not associated to the current sequence
* @raises InexactLocation if an exact sequence cannot be
* determined due to the feature's location being inexact
*/
string getSubSeqByFeature(in NucFeature feature)
raises (type::InvalidRelation, InexactLocation);
/**
* @raises type::InvalidRelation if reference does not exist
* @raises type::InvalidRelation if reference is not
* associated to the current sequence
* @raises type::NoResult if there is no location associated with this reference
*/
Location getReferenceLocation(in string reference_id)
raises (type::InvalidRelation, type::NoResult);
};
/**
* EMBL Nucleotide sequence interface. An EMBL sequence contains all information
* to generate a flat-file entry out of it.
* It defines no new behaviour but inherits from
* several interfaces and acts as a container of the combined functionality.
*/
interface EmblSeq : NucSeq, seqdb::SeqInfo , EntryInfo {
};
/**
* Entry point for Nucleotide Sequence Database.
* Query methods on the database are defined here.
* Currently this is minimal, but should be extended later on.
*/
interface Embl {
exception Superceded { type::stringList bio_seq_ids; };
/**
* retrieve Nucleotide sequence, given it's accession number. If a client only supports
* NucSeq, and not EmblSeq, than it can widen the EmblSeq to a NucSeq (implicit).
* @raises type::NoResult if the accession number does not exist.
* @raises Superceded if the sequence referenced by the accession
* number does not exist any more, because it was merged, or split.
*/
EmblSeq getEmblSeq(in string bio_seq_id)
raises (type::NoResult, Superceded);
};
};
#endif // embl_ebi_nsdb_idl
#ifndef EMBL_EBI_NSDB_WRITE_IDL
#define EMBL_EBI_NSDB_WRITE_IDL
#include "nsdb.idl"
module nsdb {
exception OutOfDate { };
exception ReadOnlyException { };
exception LocationParse {
string reason;
};
exception QualifierParse {
string reason;
};
exception InvalidQualifier { };
interface EmblSeqWriter;
interface NucFeatureWriter;
typedef sequence<NucFeatureWriter> NucFeatureWriterList;
// datestamp_t is seconds since the standard "the epoch", namely
// January 1, 1970, 00:00:00 GMT
typedef long datestamp_t;
struct Datestamp {
datestamp_t value;
};
struct EntryStats {
string name;
datestamp_t last_change_time;
};
struct ServerInfo {
// Information about the loaded entries
sequence <EntryStats> entry_stats_list;
// Information about the files in the server directory
sequence <EntryStats> file_stats_list;
};
interface EmblWriter : Embl {
/**
* Retrieve a writable Nucleotide sequence object, given a
* sequence_id.
* @raises type::NoResult if the given sequence_id does not exist.
*/
EmblSeqWriter getEmblSeqWriter (in string sequence_id)
raises (type::NoResult);
/**
* Return a ServerInfo structure for the server.
**/
ServerInfo getServerInfo ();
};
exception InvalidKey { };
exception CommitFailed {
string reason;
};
interface EmblSeqWriter : EmblSeq {
/**
* Create a new feature in this EmblSeq object.
* @parm key Type of the feature to be created
* @parm location_string The location of the new NucFeature
* @raises LocationParse If the location string is not a valid location.
* @raises type::IndexOutOfRange If any part of the location is beyond the
* end of the sequence
* @raises InvalidKey if the given key is not a possible EMBL key.
*/
NucFeatureWriter createNucFeature (in string key,
in string location)
raises (LocationParse, type::IndexOutOfRange, InvalidKey,
ReadOnlyException);
/**
* Remove the given feature.
*/
void remove (in NucFeature nuc_feature)
raises (ReadOnlyException);
/**
* retrieve sequence of NucFeatureList associated with
* the nucleotide sequence that are within the given range of bases.
* @raises type::NoResult if no features are owned by the sequence
* @raises type::IndexOutOfRange if either of start_base or end_base is
* less than 1 or greater than the length of the sequence.
*/
NucFeatureList getNucFeaturesInRange (in long start_base, in long end_base)
raises (type::NoResult, type::IndexOutOfRange);
/**
* Return the number of features
*/
long getNucFeatureCount ();
/**
* Return the ith NucFeature from this Entry. The feature are returned in
* a consistent order, sorted by the first base of each Feature.
* @raises type::IndexOutOfRange if the index is less than 0 or greater
* than the number of features.
**/
NucFeature getFeatureAtIndex (in long i)
raises (type::IndexOutOfRange);
/**
* Return the index of the given Feature. This does the reverse of
* getFeatureAtIndex (). Returns -1 if the given NucFeature is not in
* this EmblSeq object.
**/
long indexOf (in NucFeature feature);
/**
* commit any pending changes to the database immediately.
*/
void commit ()
raises (CommitFailed);
/**
* Return a Datestamp that will be passed to the set methods on the
* EmblSeqWriter methods and NucFeatureWriter methods. The object that is
* returned represents the time when the entry was last changed (the last
* time a feature was added, removed or changed location).
*/
Datestamp getDatestamp ();
};
interface NucFeatureWriter : NucFeature {
/**
* Set the key, location and qualifiers of this NucFeature
* @parm key The new feature key
* @parm location The new feature location
* @raises InvalidKey if the given key is not a possible EMBL key.
* @raises LocationParse If the location string is not a valid location.
* @raises type::IndexOutOfRange If any part of the location is out
* of range for the sequence.
* @raises type::InvalidRelation if one of the qualifiers in this
* feature cannot be associated with the given feature key.
* @raises QualifierParse if the format of any the qualifiers is not
* appropriate for a Qualifier with the given name. For
* example the value part of /codon_start qualifier must be a number: 1,
* 2 or 3. Also thrown if a qualifier has value when it should not or
* vice versa.
* @raises InvalidQualifier if the name of the Qualifier is not a
* valid embl qualifier name.
* @raises ReadOnlyException If this Feature cannot be changed.
* @raises OutOfDate If the key has changed since the time given by
* datestamp.
*/
void set (in Datestamp datestamp,
in string key,
in string location,
in QualifierList qualifier_list)
raises (InvalidKey, LocationParse, type::IndexOutOfRange,
type::InvalidRelation, QualifierParse,
InvalidQualifier, OutOfDate, ReadOnlyException);
/**
* Set the key of this NucFeature
* @parm key The new feature key
* @raises InvalidKey if the given key is not a possible EMBL key.
* @raises type::InvalidRelation if one of the qualifiers in this
* feature cannot be associated with the given feature key.
* @raises OutOfDate If the key has changed since the time given by
* datestamp.
*/
void setKey (in Datestamp datestamp,
in string key)
raises (InvalidKey, type::InvalidRelation, OutOfDate, ReadOnlyException);
/**
* Set the location of this NucFeature
* @parm location The new feature location
* @raises LocationParse If the location string is not a valid location.
* @raises type::IndexOutOfRange If any part of the location is out
* of range for the sequence.
* @raises OutOfDate If the location has changed since the time given by
* datestamp.
*/
void setLocation (in Datestamp datestamp,
in string location)
raises (LocationParse, type::IndexOutOfRange, OutOfDate, ReadOnlyException);
/**
* Set the qualifiers of this feature, replacing the current qualifiers.
* @raises InvalidRelationException if this Feature cannot
* contain one of the given qualifiers.
* @raises QualifierParse if the format of any the qualifiers is not
* appropriate for a Qualifier with the given name. For
* example the value part of /codon_start qualifier must be a number: 1,
* 2 or 3. Also thrown if a qualifier has value when it should not or
* vice versa.
* @raises InvalidQualifier if the name of the Qualifier is not a
* valid embl qualifier name.
* @raises OutOfDate if any of the qualifiers has changed since the time
* given by datestamp.
*/
void setQualifiers (in Datestamp datestamp,
in QualifierList qualifier_list)
raises (type::InvalidRelation, QualifierParse, InvalidQualifier,
OutOfDate, ReadOnlyException);
/**
* Add the given Qualifier to this Feature. If this Feature contains a
* Qualifier with the same name as the new Qualifier it will be replaced.
* @parm qualifier The new qualifier to add.
* @raises InvalidRelationException if this Feature cannot
* contain the given Qualifier.
* @raises QualifierParse if the format of the qualifier is not
* appropriate for a Qualifier with the given name. For
* example the value part of /codon_start qualifier must be a number: 1,
* 2 or 3. Also thrown if a qualifier has value when it should not or
* vice versa.
* @raises InvalidQualifier if the name of the Qualifier is not a
* valid embl qualifier name.
* @raises OutOfDate if there is a an existing qualifier with the same
* name as the argument qualifier and it has changed since the time
* given by datestamp.
*/
void setQualifier (in Datestamp datestamp,
in Qualifier qualifier)
raises (type::InvalidRelation, QualifierParse, InvalidQualifier,
OutOfDate, ReadOnlyException);
/**
* Remove the Qualifier with the given name. If there is no Qualifier
* with that name, then return immediately.
* @parm name The Qualifier name to look for.
* @raises OutOfDate if there is a an existing qualifier with the same
* name as the argument name and it has changed since the time given by
* the datestamp.
*/
void removeQualiferByName (in Datestamp datestamp,
in string name)
raises (type::InvalidRelation, OutOfDate, ReadOnlyException);
/**
* Return a Datestamp that will be passed to the set methods on the
* EmblSeqWriter methods and NucFeatureWriter methods. The object that is
* returned represents the time when the feature was last changed (the
* last time the key, location or qualifiers changed).
*/
Datestamp getDatestamp ();
};
};
#endif
/* **************************************************************************
* $Source: //tmp/pathsoft/artemis/corba/seqdb.idl,v $
* $Revision: 1.1 $
* $Date: 2004-06-09 12:06:36 $
* $Author: tjc $
* **************************************************************************/
#ifndef embl_ebi_seqdb_idl
#define embl_ebi_seqdb_idl
#include "types.idl"
/**
* seqdb contains the (abstract) definition
* of common attributes of biosequences
*/
module seqdb {
/**
* generic biosequence. Provides al functionality we would like to see
* on any sequence.
*/
interface BioSeq {
/**
* retrieve unique identifier
*/
string getBioSeqId();
/**
* length (nr of elements) of the biosequence
*/
unsigned long getLength();
/**
* sequence of objects describing the elements in the biosequence
* This is a generic description. Most subclasses
* will define more convenient methods for accessing the biosequence.
* @returns any containing an set of objects. The any should have
* a typecode tk_array.
*/
any getAnySeq();
/**
* Return current version of the BioSeq. returns 0 if versioning is not
* implemented on the bioseq.
*/
unsigned long getBioSeqVersion();
};
/**
* generic Feature. Only has a key to identify it's type, an ID to
* identify the instance and a version.
*/
interface Feature {
/**
* feature identifier.
*/
string getFeatureId();
/**
* Feature types are defined by a key.
*/
string getKey();
/**
* return current version of the feature. returns 0 if
* no versioning is implemented.
*/
unsigned long getFeatureVersion();
};
/**
* Information associated with a sequence
*/
interface SeqInfo {
/**
* short (one line) description
*/
string getDescription()
raises (type::NoResult);
/**
* sequence of keywords, describing the characteristics of the sequence
*/
type::stringList getKeywords()
raises (type::NoResult);
/**
* sequence of comments, describing the characteristics of the sequence
*/
type::stringList getComments()
raises (type::NoResult);
/**
* cross references to other databases containing related or additional
* information
*/
type::DbXrefList getDbXrefs()
raises (type::NoResult);
/**
* cross references to the EMBL publication database
* information
*/
type::DbXrefList getReferences()
raises (type::NoResult);
};
};
#endif // embl_ebi_seqdb_idl