Redistributing walkers

From GSA

Jump to: navigation, search

Contents

Packaging and releasing the GATK (GSA members only, please!)

  • It is crucial that you verify from everyone in the dev and software engineering group that all recent changes to the repository are complete and stable. Also, sanity check that the Sting Performance Test run times look reasonable
  • Verify that the version you're about to release passes all integration tests, by either run 'ant clean test integrationtest' locally or checking the output of our Bamboo server. Bamboo build numbers can be matched to svn revisions via the 'Recently Completed Builds' section of the 'Current Activity' tab.
  • Add any new required walkers to packages/GenomeAnalysisTK.xml
  • Run the packaging tool.
  • Verify that the release jar runs our core tools without trivial failures. This can be done by running the runReleaseSanityCheck.pl script in the perl directory.
# these two steps must be done once per installation.
ant resolve
cp lib/bcel-5.2.jar ~/.ant/lib

# this step is required every time a change is made to the GATK.
ant clean
ant package
  • You may need to download a copy of the ant-apache-bcel.jar if you run into the error "Unable to load dependency analyzer":
package:
     [xslt] Transforming into /Users/kshakir/src/Sting/dist/packages

package:

BUILD FAILED
/Users/gsauser/src/Sting/build.xml:636: The following error occurred while executing this line:
/Users/gsauser/src/Sting/dist/packages/GenomeAnalysisTK.xml:12: Unable to load dependency analyzer: org.apache.tools.ant.util.depend.bcel.FullAnalyzer
curl http://repo1.maven.org/maven2/ant/ant-apache-bcel/1.6.5/ant-apache-bcel-1.6.5.jar -o ~/.ant/lib/ant-apache-bcel-1.6.5.jar
  • Test your walker over a small dataset to ensure that the packaging tool has caught all of your walker's dependencies.
  • Release the GATK.
ant release

The 'ant release' target will copy the GATK both to our Broad-internal binary (/humgen/gsa-hpprojects/GATK/bin/current/GenomeAnalysisTK.jar) and our externally accessible ftp server.

Redistributing the GATK

The GATK team would love to hear about any applications within which the GATK is embedded or walkers which you have chosen to distribute. Please send an email to gsahelp to let us know how you are using the GATK. When redistributing the GATK, please abide by the terms of our copyright:

/*
 * Copyright (c) 2009 The Broad Institute
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */

Packaging walkers

The packaging tool in the Sting repository can layout packages for redistribution. Currently, only walkers checked into the GATK's svn repository are well supported by the packaging system. Example packaging files can be found in $STING_HOME/packages.

Defining a package

Create a package xml for your project inside $STING_HOME/packages.

Key elements within the package xml include:

executable 
Each occurrence of this tag will create an executable jar of the given name tag, using the main method from the given main-class tag.
main-class 
This is the main class for the package. When running with java -jar YOUR_JAR.jar, main-class is the class that will be executed.
dependencies 
Other dependencies can be of type class or file. If of type class, a dependency analyzer will look for all dependencies of your classes and include those files as well. File dependencies will end up in the root of your package.
resources 
Supplemental files can be added to the 'resources' section. Resource files will be copied to the 'resource' directory within the package.

Creating a package

To create a package, execute the following command:

cd $STING_HOME
ant package -Dexecutable=<your executable name>

The packaging system will create a layout directory in dist/packages/<your executable>. Examine the contents of this directory. When you are happy with the results, finalize the package by running the following:

tar cvhjf <your executable>.tar.bz2 <your executable>
Personal tools