summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLionel Miller2018-07-18 15:09:11 +0300
committerLionel Miller2018-07-18 15:15:56 +0300
commita6381030d5122ee67f70b04d9286d36ff9d23c3e (patch)
treea244382d7f15b8942510268ced85feba11c5ec02
downloadaur-a6381030d5122ee67f70b04d9286d36ff9d23c3e.tar.gz
Initial version
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD46
-rw-r--r--gatk.sh39
3 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..80176876df9e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = gatk-bin
+ pkgdesc = Variant discovery in high-throughput bioinformatics sequencing data
+ pkgver = 4.0.6.0
+ pkgrel = 1
+ url = https://software.broadinstitute.org/gatk-bin
+ arch = any
+ license = BSD
+ depends = java-environment=8
+ depends = python
+ optdepends = r: plot generation for some tools
+ conflicts = gatk
+ source = gatk-bin-4.0.6.0.zip::https://github.com/broadinstitute/gatk/releases/download/4.0.6.0/gatk-4.0.6.0.zip
+ source = gatk.sh
+ source = gatk-bin-license.txt::https://raw.githubusercontent.com/broadinstitute/gatk/d6a7fcd895677424b491df8c4ee6227e34b52251/LICENSE.TXT
+ sha512sums = 6d2247ed5f06e61b561347c8d09cc789b38ad0ea7ab254036b0d9638a9c839ba128427cfed146c525f981fae407eb0448b2e10d0a68e679c297872cb19d25a0f
+ sha512sums = a9984153bc489bf5814adc8f8bffd92782e7dd031f2b9a0798d2dc005438445f5eefed6ce3b64b776197c49fb8579e4c968e7cdc4398c5df0145e5105cc20271
+ sha512sums = 9753eef4b1f3aa96b790eaeacbe92ecb9d8fee6de9b918244a519a53b5285d57d2128e62f6a86c5d931d217a72f08e806ff81e95ad8d271c1df737384c81e30e
+
+pkgname = gatk-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b6077bf4d9b7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Lionel Miller <delonorm@gmail.com>
+
+pkgname=gatk-bin
+pkgver=4.0.6.0
+pkgrel=1
+pkgdesc="Variant discovery in high-throughput bioinformatics sequencing data"
+arch=('any')
+url=https://software.broadinstitute.org/"${pkgname}"
+license=('BSD')
+depends=('java-environment=8' 'python')
+optdepends=('r: plot generation for some tools')
+conflicts=('gatk')
+source=(
+ "${pkgname}-${pkgver}.zip::https://github.com/broadinstitute/gatk/releases/download/${pkgver}/gatk-${pkgver}.zip"
+ gatk.sh
+ "${pkgname}-license.txt::https://raw.githubusercontent.com/broadinstitute/gatk/d6a7fcd895677424b491df8c4ee6227e34b52251/LICENSE.TXT"
+)
+sha512sums=(
+ '6d2247ed5f06e61b561347c8d09cc789b38ad0ea7ab254036b0d9638a9c839ba128427cfed146c525f981fae407eb0448b2e10d0a68e679c297872cb19d25a0f'
+ 'a9984153bc489bf5814adc8f8bffd92782e7dd031f2b9a0798d2dc005438445f5eefed6ce3b64b776197c49fb8579e4c968e7cdc4398c5df0145e5105cc20271'
+ '9753eef4b1f3aa96b790eaeacbe92ecb9d8fee6de9b918244a519a53b5285d57d2128e62f6a86c5d931d217a72f08e806ff81e95ad8d271c1df737384c81e30e'
+)
+
+package() {
+ # I am using the launcher script from the source-based gatk package
+ # instead of the official Python launcher because Python launcher is
+ # far more complex than this script, and I have not investigated in
+ # detail what it does.
+ install -Dm755 gatk.sh "${pkgdir}"/usr/bin/gatk
+
+ # Downloading the license separately because it is not included
+ # in the distribution, and namcap complains if it is not installed.
+ install -Dm644 "${pkgname}-license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
+
+ # Resing much of the installation procedure from the source-based package.
+ cd "${srcdir}/gatk-${pkgver}"
+ install -Dm644 README.md "${pkgdir}"/usr/share/doc/"${pkgname}"/README.md
+ install -Dm644 "gatk-package-${pkgver}-local.jar" "${pkgdir}/usr/share/java/${pkgname}/GenomeAnalysisTK.jar"
+ install -Dm644 "gatk-completion.sh" "${pkgdir}/usr/share/bash-completion/completions/gatk"
+
+ # Things that are missing:
+ # 1. spark executable (maybe it should go in a separate package)
+ # 2. gatkdoc
+ # 3. scripts
+ # 4. Python launcher (not sure whether it is superior to the current one)
+}
diff --git a/gatk.sh b/gatk.sh
new file mode 100644
index 000000000000..d105ecad017e
--- /dev/null
+++ b/gatk.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+set -eou pipefail
+export LC_ALL=en_US.UTF-8
+
+default_jvm_mem_opts="-Xms512m -Xmx1g"
+jvm_mem_opts=""
+jvm_prop_opts=""
+pass_args=""
+
+for arg in "$@"; do
+ case $arg in
+ '-D'*)
+ jvm_prop_opts="$jvm_prop_opts $arg"
+ ;;
+ '-XX'*)
+ jvm_prop_opts="$jvm_prop_opts $arg"
+ ;;
+ '-Xm'*)
+ jvm_mem_opts="$jvm_mem_opts $arg"
+ ;;
+ *)
+ pass_args="$pass_args $arg"
+ ;;
+ esac
+done
+
+if [ "$jvm_mem_opts" == "" ]; then
+ jvm_mem_opts="$default_jvm_mem_opts"
+fi
+
+pass_arr=($pass_args)
+if [[ ${pass_arr[0]:=} == org* ]]
+then
+ eval java $jvm_mem_opts $jvm_prop_opts -cp '/usr/share/java/gatk-bin/GenomeAnalysisTK.jar' $pass_args
+else
+ eval java $jvm_mem_opts $jvm_prop_opts -jar '/usr/share/java/gatk-bin/GenomeAnalysisTK.jar' $pass_args
+fi
+exit