Skip to content

Commit

Permalink
Build process updates, mostly for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
kpepper committed Nov 21, 2018
1 parent aa30c42 commit e846134
Show file tree
Hide file tree
Showing 14 changed files with 695 additions and 588 deletions.
6 changes: 5 additions & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand All @@ -20,13 +21,15 @@
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="test" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src/assembly"/>
<classpathentry kind="src" path="src/site"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Expand All @@ -37,6 +40,7 @@
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/evosuite">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test/coverage-report
dependency-reduced-pom.xml
maven.properties
.evosuite
maven-archiver
105 changes: 102 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,16 @@ Artemis is a free genome browser and annotation tool that allows visualisation o

ACT is a free tool for displaying pairwise comparisons between two or more DNA sequences. It can be used to identify and analyse regions of similarity and difference between genomes and to explore conservation of synteny, in the context of the entire sequences and their annotation.

DNAPlotter generates images of circular and linear DNA maps.

BamView is a standalone BAM/CRAM file viewer.

For further information, please see the [Artemis GitHub page](http://sanger-pathogens.github.io/Artemis/)

## Prerequisites

Java 9+ must be installed. Ideally Java 11.

## Installation

Please refer to the relevant documentation in the Documentation section below.
Expand All @@ -45,12 +53,103 @@ Please refer to the relevant documentation in the Documentation section below.
## Building

If you would prefer to build the applications from scratch rather than use the pre-built releases in GitHub, then you will firstly need the source code from GitHub. This can be obtained by cloning the repository:
```
git clone https://github.com/sanger-pathogens/Artemis.git
```
or by downloading the source zip file for a particular release. The latest version of Apache Maven (Java 11 compatible, e.g. v3.6.0) will need to be installed beforehand, in order to build. The application jars can be built by issuing the following commands in the top-level folder:

When building for the first time:
```
mvn validate
```
This is required to install some legacy libraries to the Maven repository and will be phased out in future releases.

And then to build/rebuild the applications :
```
mvn clean package
```
Clean is only required if you wish to do a complete rebuild.
If you do not wish to run tests then add the <i>-Dskip.tests=true</i> flag to the above command.

Note that if you are running a build from behind a proxy you will need to add the proxy parameters to the mvn command line, e.g.
```
mvn -Dhttps.proxyHost=myproxyhost -Dhttps.proxyPort=myproxyport -DproxySet=true package
```

## Searching and Using Local Sequence Databases

Artemis and ACT can optionally be used with local sequence databases on non-Windows systems.

[Note: this may require a lot of disk space]

If you wish to do this then carry out the following steps:

1. To download and install BLAST+ locally, check here:

```
ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/
```
to get the latest Mac OS X release:

```
ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.7.1+-x64-macosx.tar.gz
```
Uncompress, if you have downloaded a .tar.gz, e.g.

```
tar -zxvf ncbi-blast-2.7.1+-x64-macosx.tar.gz
```
For a Mac OS X install you can mount the resulting .dmg image by double-clicking it and then selecting the .pkg installer file to actually install the BLAST+ executables into the default location (/usr/local/ncbi/blast). Comprehensive installation instructions for all operating systems are provided [here](https://www.ncbi.nlm.nih.gov/books/NBK279690/).

2. To download and install Fasta locally, check here:

```
ftp://ftp.ebi.ac.uk/pub/software/unix/fasta/
```

and download the latest release, e.g.

```
ftp://ftp.ebi.ac.uk/pub/software/unix/fasta/fasta3/fasta-36.3.8g.tar.gz
```
Uncompress the tar:

```
tar -zxvf fasta-36.3.8g.tar.gz
```

Build the executables, e.g. for a Mac:

```
cd fasta/src
make -f ../make/Makefile.os_x86_64 all
```
Move the fasta folder to a convenient area, preferably /usr/local/ for Macs:

3. Ensure that the BLAST+ and Fasta executables are available in your PATH and that local databases can be found by Artemis:

On the command line type:

```
blastp -help
fasta36 -help
```
If the executables are not found then their respective installation bin folders will need to be added to your .profile PATH variable. This can be achieved by uncommenting and setting the relevant environment variables in the **Variables for locally installed Blast databases** section of the Artemis **setenv** script. The location of the databases is assumed by default to be &lt;home directory&gt;/blast-data but this can be overridden by setting the BLASTDB and FASTLIBS variables. The setenv script should then be called from your login **.profile** file. Alternatively copy the relevant variables into your profile.

Note that database locations can also be specified directly within the Artemis/ACT applications.

4. Download and format the uniprot database(s):

git clone http://github.com/sanger-pathogens/Artemis.git
You can do this by using the Artemis etc/setup_uniprot_dbs.sh script. This script can be changed as desired, to for instance, include additional databases or create a FASTLIBS file.

or by downloading the source zip file for a particular release. Apache Maven and Java 8 will need to be installed beforehand, in order to build. The applications can be built by issuing the following command in the top-level folder:
```
mkdir $HOME/blast-data
cd blast-data
cp <Artemis folder>/etc/setup_blast_dbs.sh .
./setup_blast_dbs.sh
```

mvn validate clean test package
(Note: the environment variable http_proxy may need to be set for the ftp downloads to work).

## License
Artemis is free software, licensed under [GPLv3](https://github.com/sanger-pathogens/artemis/blob/master/LICENSE).
Expand Down
12 changes: 9 additions & 3 deletions act
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ done

APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=act.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/unix-jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/$JAR_NAME
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME

#
# Use a custom Java version if necessary
Expand All @@ -117,7 +117,7 @@ fi
add_proxy_properties

#
# "-mx1g" sets the maximum amount of memory to use.
# "-mx2g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
Expand All @@ -127,6 +127,12 @@ else
FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi

#
# Temporary flags to avoid Java 9+ reflection warnings being written to the terminal.
# Should not be necessary when Ibatis is replaced.
#
FLAGS="$FLAGS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"

PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
Expand Down
13 changes: 10 additions & 3 deletions art
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ done

APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=artemis.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/unix-jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/$JAR_NAME
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME

#
# Use a custom Java version if necessary
Expand All @@ -123,7 +123,7 @@ fi
add_proxy_properties

#
# "-mx1g" sets the maximum amount of memory to use.
# "-mx2g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
Expand All @@ -133,6 +133,13 @@ else
FLAGS="$ARTEMIS_JVM_FLAGS -noverify"
fi


#
# Temporary flags to avoid Java 9+ reflection warnings being written to the terminal.
# Should not be necessary when Ibatis is replaced.
#
FLAGS="$FLAGS --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED"

PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
Expand Down
8 changes: 4 additions & 4 deletions bamview
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ done
APPLICATION_PROPERTIES="-Djdbc.drivers=org.postgresql.Driver -Dartemis.environment=UNIX $SANGER_ARTEMIS_OPTIONS"
APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=bamview.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/unix-jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/$JAR_NAME
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME

#
# Use a custom Java version if necessary
Expand All @@ -61,7 +61,7 @@ fi
add_proxy_properties

#
# "-mx1g" sets the maximum amount of memory to use.
# "-mx2g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
Expand All @@ -74,7 +74,7 @@ fi
PLATTMP=`uname`
if [[ "$PLATTMP" = "Darwin" ]]
then
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Xdock:name=BamView"
APPLICATION_PROPERTIES="$APPLICATION_PROPERTIES -Dapple.laf.useScreenMenuBar=true -Xdock:name=BamView"
fi

if [[ "$QUIET" = "no" ]]
Expand Down
6 changes: 3 additions & 3 deletions dnaplotter
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ done

APPLICATION_HOME=`dirname "$PRG"`
JAR_NAME=dnaplotter.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/unix-jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/$JAR_NAME
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME

#
# Use a custom Java version if necessary
Expand All @@ -98,7 +98,7 @@ fi
add_proxy_properties

#
# "-mx1g" sets the maximum amount of memory to use.
# "-mx2g" sets the maximum amount of memory to use.
# This may need to be increased when dealing with large files
#
if [[ "$ARTEMIS_JVM_FLAGS" = "" ]]
Expand Down
4 changes: 2 additions & 2 deletions etc/writedb_entry
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ FLAGS="-mx2048m -ms20m -Djdbc.drivers=org.postgresql.Driver -Dibatis"
DEFAULT_CONNECTION="-Dchado=db.genedb.org:5432/snapshot?genedb_ro -Dread_only"
APPLICATION_HOME=`dirname "$PRG"`/..
JAR_NAME=artemis.jar
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/unix-jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/$JAR_NAME
JAR_FILE_DEFAULT=$APPLICATION_HOME/target/jars/$JAR_NAME
JAR_FILE_INSTALLED=$APPLICATION_HOME/dist/$JAR_NAME

#
# Use a custom Java version if necessary
Expand Down
83 changes: 0 additions & 83 deletions icons/Readme.txt

This file was deleted.

2 changes: 2 additions & 0 deletions lib/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
These are old libraries and the intention is to remove or upgrade them.

Lib versions:
=============

Expand Down
Loading

0 comments on commit e846134

Please sign in to comment.