pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bcftools: Tools for manipulating BCF (binary VCF) sequence files



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Sat Nov 10 10:29:41 2018 -0600
Changeset:	b30e03114b636776d8a15518a9248f0b3550d81c

Modified Files:
	Makefile
Added Files:
	bcftools/DESCR
	bcftools/Makefile
	bcftools/PLIST
	bcftools/distinfo
	bcftools/files/pkg-message.in
	bcftools/patches/patch-Makefile
	bcftools/patches/patch-configure.ac
	bcftools/patches/patch-misc_run-roh.pl

Log Message:
bcftools: Tools for manipulating BCF (binary VCF) sequence files

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b30e03114b636776d8a15518a9248f0b3550d81c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                               |  1 +
 bcftools/DESCR                         |  4 ++
 bcftools/Makefile                      | 62 +++++++++++++++++++++++++
 bcftools/PLIST                         | 37 +++++++++++++++
 bcftools/distinfo                      |  9 ++++
 bcftools/files/pkg-message.in          |  7 +++
 bcftools/patches/patch-Makefile        | 83 ++++++++++++++++++++++++++++++++++
 bcftools/patches/patch-configure.ac    | 15 ++++++
 bcftools/patches/patch-misc_run-roh.pl | 15 ++++++
 9 files changed, 233 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index ef183f1036..1fee6109a5 100644
--- a/Makefile
+++ b/Makefile
@@ -227,6 +227,7 @@ SUBDIR+=	barrier
 SUBDIR+=	basepkg
 SUBDIR+=	bashdb
 SUBDIR+=	bastard
+SUBDIR+=	bcftools
 SUBDIR+=	beads
 SUBDIR+=	beanstalkd
 SUBDIR+=	beast
diff --git a/bcftools/DESCR b/bcftools/DESCR
new file mode 100644
index 0000000000..d3bb50e44e
--- /dev/null
+++ b/bcftools/DESCR
@@ -0,0 +1,4 @@
+BCFtools is a set of utilities that manipulate variant calls in the
+Variant Call Format (VCF) and its binary counterpart BCF. All
+commands work transparently with both VCFs and BCFs, both
+uncompressed and BGZF-compressed.
diff --git a/bcftools/Makefile b/bcftools/Makefile
new file mode 100644
index 0000000000..10c9aeea51
--- /dev/null
+++ b/bcftools/Makefile
@@ -0,0 +1,62 @@
+# $NetBSD$
+#
+###########################################################
+#                  Generated by fbsd2pkg                  #
+#              Sat Nov 10 09:59:07 CST 2018               #
+###########################################################
+
+###########################################################
+# Unconverted and partially converted FreeBSD port syntax:
+
+# TEST_DEPENDS=	bash:shells/bash
+# Unknown tool: USE_TOOLS=	localbase
+#USE_LDCONFIG=	${PREFIX}/libexec/${PORTNAME}
+
+DISTNAME=	bcftools-${PV}
+CATEGORIES=	biology
+MASTER_SITES=	${MASTER_SITE_GITHUB:=samtools/}
+GITHUB_PROJECT=	bcftools
+GITHUB_TAG=	${PV}
+
+MAINTAINER=	bacon%NetBSD.org@localhost
+HOMEPAGE=	http://www.htslib.org/
+COMMENT=	Tools for manipulating next-generation sequencing data
+LICENSE=	mit
+
+REPLACE_PERL=	misc/*.pl misc/plot-vcfstats test/test.pl
+REPLACE_PYTHON=	misc/*.py
+
+SUBST_CLASSES+=		version
+SUBST_STAGE.version=	pre-configure
+SUBST_SED.version+=	-e 's|@PV@|${PV}|g'
+SUBST_FILES.version+=	${WRKSRC}/configure.ac
+
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	autoconf automake autoreconf gmake perl
+GNU_CONFIGURE=	yes
+MAKE_ENV+=	USE_GPL=1
+
+PV=		1.9
+
+pre-configure:
+	cd ${WRKSRC} && autoreconf -if
+
+post-install:
+	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/color-chrs.pl \
+		${DESTDIR}${PREFIX}/bin/color-chrs
+	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/guess-ploidy.py\
+	       ${DESTDIR}${PREFIX}/bin/guess-ploidy
+	${MV} /${DESTDIR}${PREFIX}/bin/samtools_misc/plot-roh.py \
+		${DESTDIR}${PREFIX}/bin/plot-roh
+	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/run-roh.pl \
+		${DESTDIR}${PREFIX}/bin/run-roh
+	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/vcfutils.pl \
+		${DESTDIR}${PREFIX}/bin/vcfutils
+	${MV} ${DESTDIR}${PREFIX}/bin/samtools_misc/plot-vcfstats \
+		${DESTDIR}${PREFIX}/bin/
+	${RMDIR} ${DESTDIR}${PREFIX}/bin/samtools_misc/
+
+.include "../../wip/htslib/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/bcftools/PLIST b/bcftools/PLIST
new file mode 100644
index 0000000000..b5e0ac006c
--- /dev/null
+++ b/bcftools/PLIST
@@ -0,0 +1,37 @@
+@comment $NetBSD$
+bin/bcftools
+bin/color-chrs
+bin/guess-ploidy
+bin/plot-roh
+bin/plot-vcfstats
+bin/run-roh
+bin/vcfutils
+libexec/bcftools/GTisec.so
+libexec/bcftools/GTsubset.so
+libexec/bcftools/ad-bias.so
+libexec/bcftools/af-dist.so
+libexec/bcftools/check-ploidy.so
+libexec/bcftools/check-sparsity.so
+libexec/bcftools/color-chrs.so
+libexec/bcftools/contrast.so
+libexec/bcftools/counts.so
+libexec/bcftools/dosage.so
+libexec/bcftools/fill-AN-AC.so
+libexec/bcftools/fill-from-fasta.so
+libexec/bcftools/fill-tags.so
+libexec/bcftools/fixploidy.so
+libexec/bcftools/fixref.so
+libexec/bcftools/frameshifts.so
+libexec/bcftools/guess-ploidy.so
+libexec/bcftools/impute-info.so
+libexec/bcftools/isecGT.so
+libexec/bcftools/mendelian.so
+libexec/bcftools/missing2ref.so
+libexec/bcftools/prune.so
+libexec/bcftools/setGT.so
+libexec/bcftools/smpl-stats.so
+libexec/bcftools/split.so
+libexec/bcftools/tag2tag.so
+libexec/bcftools/trio-stats.so
+libexec/bcftools/trio-switch-rate.so
+man/man1/bcftools.1
diff --git a/bcftools/distinfo b/bcftools/distinfo
new file mode 100644
index 0000000000..c486cff017
--- /dev/null
+++ b/bcftools/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+SHA1 (bcftools-1.9.tar.gz) = 9537a1746b4e434a85dd6ef21ffd5f6ef72f3c5f
+RMD160 (bcftools-1.9.tar.gz) = cd39632d3b998792e5ba43abd46153d2206ae3ef
+SHA512 (bcftools-1.9.tar.gz) = c7da82c78690789c53f4c07c6ac6436cc3eebc5d5df613cee30e9bb6f552763df4aaa1593e715ea5d1825e76d2a6c87dbe5b484805b57ac37243c7ef9131dab8
+Size (bcftools-1.9.tar.gz) = 2394968 bytes
+SHA1 (patch-Makefile) = 09eaeb4d4a422d1d450085cda0350cd874bd04dd
+SHA1 (patch-configure.ac) = 3813b1350d802728d958dc3d3fbe13525f8db942
+SHA1 (patch-misc_run-roh.pl) = aaf7ed9f048a75684f41ae33ecedc03c81937b11
diff --git a/bcftools/files/pkg-message.in b/bcftools/files/pkg-message.in
new file mode 100644
index 0000000000..ef35a871f4
--- /dev/null
+++ b/bcftools/files/pkg-message.in
@@ -0,0 +1,7 @@
+The miscellaneous tools included with Bcftools have been installed to
+%%PREFIX%%/bin/samtools_misc
+
+Add that directory to your path if you want to use these tools.
+
+Some of these tools depend on Perl5/Python, and it will need to be installed to
+use them.
diff --git a/bcftools/patches/patch-Makefile b/bcftools/patches/patch-Makefile
new file mode 100644
index 0000000000..bce061c787
--- /dev/null
+++ b/bcftools/patches/patch-Makefile
@@ -0,0 +1,83 @@
+$NetBSD$
+
+# Respect env
+
+--- Makefile.orig	2018-07-18 08:34:29 UTC
++++ Makefile
+@@ -22,10 +22,10 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+ 
+-CC       = gcc
+-CPPFLAGS =
+-CFLAGS   = -g -Wall -Wc++-compat -O2
+-LDFLAGS  =
++CC       ?= cc
++CPPFLAGS +=
++CFLAGS   += -Wall
++LDFLAGS  +=
+ LIBS     =
+ 
+ DYNAMIC_FLAGS = -rdynamic
+@@ -42,26 +42,25 @@ OBJS     = main.o vcfindex.o tabix.o \
+            vcfsort.o \
+            ccall.o em.o prob1.o kmin.o # the original samtools calling
+ 
+-prefix      = /usr/local
++prefix      = ${PREFIX}
+ exec_prefix = $(prefix)
+ bindir      = $(exec_prefix)/bin
+ libdir      = $(exec_prefix)/lib
+ libexecdir  = $(exec_prefix)/libexec
+-mandir      = $(prefix)/share/man
++mandir      = $(prefix)/man
+ man1dir     = $(mandir)/man1
+ # Installation location for $(PLUGINS)
+ plugindir   = $(libexecdir)/bcftools
+ pluginpath  = $(plugindir)
+ # Installation location for $(MISC_PROGRAMS) and $(MISC_SCRIPTS)
+-misc_bindir = $(bindir)
++misc_bindir = $(bindir)/samtools_misc
+ 
+ MKDIR_P = mkdir -p
+-INSTALL = install -p
+-INSTALL_DATA    = $(INSTALL) -m 644
+-INSTALL_DIR     = $(MKDIR_P) -m 755
+-INSTALL_MAN     = $(INSTALL_DATA)
+-INSTALL_PROGRAM = $(INSTALL)
+-INSTALL_SCRIPT  = $(INSTALL_PROGRAM)
++INSTALL_DATA    = ${BSD_INSTALL_DATA}
++INSTALL_DIR     = $(MKDIR_P)
++INSTALL_MAN     = ${BSD_INSTALL_MAN}
++INSTALL_PROGRAM = ${BSD_INSTALL_PROGRAM}
++INSTALL_SCRIPT  = ${BSD_INSTALL_SCRIPT}
+ 
+ PROGRAMS = bcftools
+ MISC_SCRIPTS = \
+@@ -77,7 +76,7 @@ all: $(PROGRAMS) $(TEST_PROGRAMS) plugin
+ 
+ ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS)
+ ALL_LDFLAGS  = $(HTSLIB_LDFLAGS) $(LDFLAGS)
+-ALL_LIBS     = -lz -ldl $(LIBS)
++ALL_LIBS     = -lz $(LIBS)
+ 
+ # Usually config.mk and config.h are generated by running configure
+ # or config.status, but if those aren't used create defaults here.
+@@ -131,7 +130,7 @@ print-version:
+ ifdef USE_GPL
+     main.o : EXTRA_CPPFLAGS += -DUSE_GPL
+     OBJS += polysomy.o peakfit.o
+-    GSL_LIBS ?= -lgsl -lcblas
++    GSL_LIBS ?= -lgsl -lgslcblas
+ endif
+ 
+ bcftools: $(OBJS) $(HTSLIB)
+@@ -278,7 +277,7 @@ docs: doc/bcftools.1 doc/bcftools.html
+ # Since there is no make dependency, bcftools.1 can be out-of-date and
+ # make docs can be run to update if asciidoc is available
+ install: $(PROGRAMS) $(PLUGINS)
+-	$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir)
++	$(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(misc_bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(plugindir)
+ 	$(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir)
+ 	$(INSTALL_SCRIPT) $(MISC_SCRIPTS) $(DESTDIR)$(misc_bindir)
+ 	$(INSTALL_MAN) doc/bcftools.1 $(DESTDIR)$(man1dir)
diff --git a/bcftools/patches/patch-configure.ac b/bcftools/patches/patch-configure.ac
new file mode 100644
index 0000000000..ee184943ee
--- /dev/null
+++ b/bcftools/patches/patch-configure.ac
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Portability
+
+--- configure.ac.orig	2018-07-18 08:34:29 UTC
++++ configure.ac
+@@ -23,7 +23,7 @@
+ # DEALINGS IN THE SOFTWARE.
+ 
+ dnl Process this file with autoconf to produce a configure script
+-AC_INIT([BCFtools], m4_esyscmd_s([./version.sh 2>/dev/null]),
++AC_INIT([BCFtools], [@PORTVERSION@],
+         [samtools-help%lists.sourceforge.net@localhost], [], [http://www.htslib.org/])
+ AC_PREREQ([2.63])  dnl This version introduced 4-argument AC_CHECK_HEADER
+ AC_CONFIG_SRCDIR([main.c])
diff --git a/bcftools/patches/patch-misc_run-roh.pl b/bcftools/patches/patch-misc_run-roh.pl
new file mode 100644
index 0000000000..7579ec8ebf
--- /dev/null
+++ b/bcftools/patches/patch-misc_run-roh.pl
@@ -0,0 +1,15 @@
+$NetBSD$
+
+# Portability
+
+--- misc/run-roh.pl.orig	2017-10-18 09:33:24 UTC
++++ misc/run-roh.pl
+@@ -97,7 +97,7 @@ sub cmd
+     else 
+     {      
+         # child
+-        exec('/bin/bash', '-o','pipefail','-c', $cmd) or error("Failed to run the command [/bin/sh -o pipefail -c $cmd]: $!");
++        exec('/bin/sh', '-c', $cmd) or error("Failed to run the command [/bin/sh -c $cmd]: $!");
+     }
+ 
+     if ( exists($args{exit_on_error}) && !$args{exit_on_error} ) { return @out; }


Home | Main Index | Thread Index | Old Index