Skip to content

Commit

Permalink
Merge pull request #233 from kpepper/artemis_unit_testing
Browse files Browse the repository at this point in the history
Artemis unit testing v17.0.0 branch merge
  • Loading branch information
kpepper authored Feb 12, 2018
2 parents f784a13 + c684658 commit 3b3a534
Show file tree
Hide file tree
Showing 3,388 changed files with 471,490 additions and 5,852 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 10 additions & 8 deletions .classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?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"/>
Expand All @@ -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"/>
Expand All @@ -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>
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
*.class
.settings
ant-build
test/ant-build
**/.DS_Store
**/*.log
test/coverage-report
jar_build
tar_build
artemis_compiled.tar
/eclipse-classes/
/test-kjp/
21 changes: 13 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
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"
Expand All @@ -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
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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)
49 changes: 49 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
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 for standalone BamView application.
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.

Added error handling for dnaplotter template file loading in standalone mode.

Added Bioconda recipe. 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.
Expand Down
6 changes: 5 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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:

Expand Down
115 changes: 49 additions & 66 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -31,35 +32,20 @@ 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
$(REAL_CLASSPATH) $(JAVAC) $(@:%.class=%.java)

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 \
Expand All @@ -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/PSUlogo.gif 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 \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/j2ssh/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/ibatis/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../lib/batik/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
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; \
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 \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../../lib/ibatis/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../../lib/batik/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
for fileJar in ../../lib/picard/*.jar; do \
jar xvf $$fileJar; \
rm -rf META-INF/MANIFEST.MF; \
done; \
cp -R ../../lib/LICENSE.* ../../uk ../../org ../../etc ../../images ../../lib/j2ssh/j2ssh.properties \
../../images/PSUlogo.gif ../../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; \
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-art ../artemis.jar META-INF/services images/PSUlogo.gif 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 \
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/PSUlogo.gif 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
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ The Artemis user manual is at:
http://www.sanger.ac.uk/science/tools/artemis

The ACT user manual is at:
http://www.sanger.ac.uk/science/tools/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

Expand All @@ -39,7 +46,7 @@ For information on how to get Artemis see this web page:

# COPYRIGHT

Copyright (C) 1998-2016 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
Expand Down
Loading

0 comments on commit 3b3a534

Please sign in to comment.