Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2018 08:40:53 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486502 - in head/biology: . gatk gatk/files
Message-ID:  <201812030840.wB38erl5025390@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Mon Dec  3 08:40:53 2018
New Revision: 486502
URL: https://svnweb.freebsd.org/changeset/ports/486502

Log:
  New port: biology/gatk: Variant discovery in high-throughput sequencing data

Added:
  head/biology/gatk/
  head/biology/gatk/Makefile   (contents, props changed)
  head/biology/gatk/distinfo   (contents, props changed)
  head/biology/gatk/files/
  head/biology/gatk/files/gatk.sh.in   (contents, props changed)
  head/biology/gatk/files/patch-build.gradle   (contents, props changed)
  head/biology/gatk/pkg-descr   (contents, props changed)
Modified:
  head/biology/Makefile

Modified: head/biology/Makefile
==============================================================================
--- head/biology/Makefile	Mon Dec  3 08:06:01 2018	(r486501)
+++ head/biology/Makefile	Mon Dec  3 08:40:53 2018	(r486502)
@@ -37,6 +37,7 @@
     SUBDIR += fluctuate
     SUBDIR += freebayes
     SUBDIR += garlic
+    SUBDIR += gatk
     SUBDIR += gff2ps
     SUBDIR += gmap
     SUBDIR += gperiodic

Added: head/biology/gatk/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/gatk/Makefile	Mon Dec  3 08:40:53 2018	(r486502)
@@ -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>

Added: head/biology/gatk/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/gatk/distinfo	Mon Dec  3 08:40:53 2018	(r486502)
@@ -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

Added: head/biology/gatk/files/gatk.sh.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/gatk/files/gatk.sh.in	Mon Dec  3 08:40:53 2018	(r486502)
@@ -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 "$@"

Added: head/biology/gatk/files/patch-build.gradle
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/gatk/files/patch-build.gradle	Mon Dec  3 08:40:53 2018	(r486502)
@@ -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'

Added: head/biology/gatk/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/gatk/pkg-descr	Mon Dec  3 08:40:53 2018	(r486502)
@@ -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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812030840.wB38erl5025390>