aboutsummaryrefslogtreecommitdiff
path: root/biology/gatk
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-12-03 08:40:53 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-12-03 08:40:53 +0000
commit0298e2c8ef891dab27c4683d7f4dbae8cf8fb548 (patch)
treebb32b7c79616566076ffe77d38f1961e7ed4d80f /biology/gatk
parent7ad406918f9220b89aa3f8b754c6f331b0bf615b (diff)
downloadports-0298e2c8ef891dab27c4683d7f4dbae8cf8fb548.tar.gz
ports-0298e2c8ef891dab27c4683d7f4dbae8cf8fb548.zip
Notes
Diffstat (limited to 'biology/gatk')
-rw-r--r--biology/gatk/Makefile45
-rw-r--r--biology/gatk/distinfo5
-rw-r--r--biology/gatk/files/gatk.sh.in25
-rw-r--r--biology/gatk/files/patch-build.gradle29
-rw-r--r--biology/gatk/pkg-descr13
5 files changed, 117 insertions, 0 deletions
diff --git a/biology/gatk/Makefile b/biology/gatk/Makefile
new file mode 100644
index 000000000000..f102d42a890d
--- /dev/null
+++ b/biology/gatk/Makefile
@@ -0,0 +1,45 @@
+# $FreeBSD$
+
+PORTNAME= gatk
+DISTVERSION= 4.0.11.0
+CATEGORIES= biology java
+MASTER_SITES= LOCAL/yuri/:deps
+DISTFILES= ${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}:deps
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Variant discovery in high-throughput sequencing data
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
+
+BUILD_DEPENDS= gradle4:devel/gradle4
+
+USES= gettext-runtime
+USE_GITHUB= yes
+GH_ACCOUNT= broadinstitute
+USE_JAVA= yes
+
+SUB_FILES= ${PORTNAME}.sh
+SUB_LIST= PORTVERSION=${PORTVERSION} JAVA=${JAVA}
+
+NO_ARCH= yes
+
+DEPS_CACHE_DIR= /tmp # should be ${WRKDIR}, but workaround for the gradle bug that dependency cache is not relocable: https://github.com/gradle/gradle/issues/1338
+
+PLIST_FILES= bin/${PORTNAME} \
+ ${JAVAJARDIR}/GenomeAnalysisTK-${PORTVERSION}.jar
+
+post-patch: # to rebuild the deps archive: 1. remove post-patch: 2. remove --offline 3. build 4. package ${DEPS_CACHE_DIR}/gradle-${PORTNAME} into the deps archive
+ @cd ${DEPS_CACHE_DIR} && ${TAR} xzf ${DISTDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}
+
+do-build:
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} gradle4 \
+ --gradle-user-home ${DEPS_CACHE_DIR}/gradle-${PORTNAME} --project-cache-dir ${DEPS_CACHE_DIR}/gradle-${PORTNAME} \
+ --offline --build-cache localJar
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/build/libs/gatk-package-1.0-SNAPSHOT-local.jar ${STAGEDIR}${JAVAJARDIR}/GenomeAnalysisTK-${PORTVERSION}.jar
+
+.include <bsd.port.mk>
diff --git a/biology/gatk/distinfo b/biology/gatk/distinfo
new file mode 100644
index 000000000000..819a8628dd76
--- /dev/null
+++ b/biology/gatk/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1543823410
+SHA256 (gatk-4.0.11.0-deps.tar.gz) = 457ed3bf756a673daa2d123fef1d8525e57f20708f134c9b897946ea49561a36
+SIZE (gatk-4.0.11.0-deps.tar.gz) = 225800131
+SHA256 (broadinstitute-gatk-4.0.11.0_GH0.tar.gz) = ba4cc922bae2cdec728984518644bb0a12be2b6916297e2eb3b862cb42841039
+SIZE (broadinstitute-gatk-4.0.11.0_GH0.tar.gz) = 74603782
diff --git a/biology/gatk/files/gatk.sh.in b/biology/gatk/files/gatk.sh.in
new file mode 100644
index 000000000000..913bb0dcce65
--- /dev/null
+++ b/biology/gatk/files/gatk.sh.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+export LC_ALL=en_US.UTF-8
+
+MEM_OPTS_SET_BY_USER="no"
+for o in $@; do
+ case $o in
+ -X* )
+ MEM_OPTS_SET_BY_USER="yes"
+ ;;
+ esac
+done
+
+if [ $MEM_OPTS_SET_BY_USER = "no" ]; then
+ # memory options
+ physmem_b=$(sysctl -n hw.physmem)
+ physmem_mb=$((physmem_b/1024/1024))
+ physmem_mb=$((physmem_mb*3/4)) # allow 3/4 of the memory
+ # -Xms<size> set initial Java heap size
+ # -Xmx<size> set maximum Java heap size
+ MEM_OPTS="-Xms512m -Xmx${physmem_mb}m"
+fi
+
+# execute the command
+%%JAVA%% $MEM_OPTS -jar %%JAVAJARDIR%%/GenomeAnalysisTK-%%PORTVERSION%%.jar "$@"
diff --git a/biology/gatk/files/patch-build.gradle b/biology/gatk/files/patch-build.gradle
new file mode 100644
index 000000000000..b2ae7d75648a
--- /dev/null
+++ b/biology/gatk/files/patch-build.gradle
@@ -0,0 +1,29 @@
+--- build.gradle.orig 2018-10-23 15:15:16 UTC
++++ build.gradle
+@@ -115,7 +115,7 @@ def resolveLargeResourceStubFiles(largeR
+ }
+
+ // check for stub files, try to pull once if there are any, then check again
+- if (checkForLFSStubFiles(largeResourcesFolder)) {
++ if (false && checkForLFSStubFiles(largeResourcesFolder)) {
+ final gitLFSPullLargeResources = "git lfs pull --include $largeResourcesFolder"
+ execGitLFSCommand(gitLFSPullLargeResources)
+ if (checkForLFSStubFiles(largeResourcesFolder)) {
+@@ -135,7 +135,7 @@ def ensureBuildPrerequisites(requiredJav
+ "The ClassLoader obtained from the Java ToolProvider is null. "
+ + "A Java $requiredJavaVersion JDK must be installed. $buildPrerequisitesMessage")
+ }
+- if (!file(".git").isDirectory()) {
++ if (false && !file(".git").isDirectory()) {
+ throw new GradleException("The GATK Github repository must be cloned using \"git clone\" to run the build. "
+ + "$buildPrerequisitesMessage")
+ }
+@@ -366,7 +366,7 @@ def createGatkSymlinks(destinationDir, a
+ }
+
+ final isRelease = Boolean.getBoolean("release")
+-version = (isRelease ? gitVersion() : gitVersion() + "-SNAPSHOT").replaceAll(".dirty", "")
++version = (isRelease ? "1.0" : "1.0" + "-SNAPSHOT").replaceAll(".dirty", "")
+
+ logger.info("build for version:" + version)
+ group = 'org.broadinstitute'
diff --git a/biology/gatk/pkg-descr b/biology/gatk/pkg-descr
new file mode 100644
index 000000000000..f60a1a69935f
--- /dev/null
+++ b/biology/gatk/pkg-descr
@@ -0,0 +1,13 @@
+GATK, pronounced "Gee Ay Tee Kay" (not "Gat-Kay"), stands for
+GenomeAnalysisToolkit. It is a collection of command-line tools for analyzing
+high-throughput sequencing data with a primary focus on variant discovery. The
+tools can be used individually or chained together into complete workflows.
+end-to-end workflows are provided, called GATK Best Practices, tailored for
+specific use cases.
+
+Developed in the Data Sciences Platform at the Broad Institute, the toolkit
+offers a wide variety of tools with a primary focus on variant discovery and
+genotyping. Its powerful processing engine and high-performance computing
+features make it capable of taking on projects of any size.
+
+WWW: https://software.broadinstitute.org/gatk/