summaryrefslogtreecommitdiff
path: root/biology
diff options
context:
space:
mode:
authorbacon <bacon@pkgsrc.org>2021-01-22 17:07:50 +0000
committerbacon <bacon@pkgsrc.org>2021-01-22 17:07:50 +0000
commit9b23dec46f27a62b42f1569a8a7b98eefbc32a25 (patch)
tree6c5bb42e2ddb2bcc3e35ae1cb44e7ed75448fd9d /biology
parentbdff239c12eadb8f491a33c6b1d1a7f9d06943d2 (diff)
downloadpkgsrc-9b23dec46f27a62b42f1569a8a7b98eefbc32a25.tar.gz
biology/bedtools: import bedtools-2.29.2
The bedtools utilities are a suite of tools for performing a wide range of genomics analysis tasks. The most widely-used of these tools enable genome arithmetic, i.e., set theory on the genome. For example, with bedtools one can intersect, merge, count, complement, and shuffle genomic intervals from multiple files in common genomic formats such as BAM, BED, GFF/GTF, and VCF. Although each individual utility is designed to do a relatively simple task, e.g., intersect two interval files, more sophisticated analyses can be conducted by stringing together multiple bedtools operations on the command line or in shell scripts.
Diffstat (limited to 'biology')
-rw-r--r--biology/bedtools/DESCR10
-rw-r--r--biology/bedtools/Makefile33
-rw-r--r--biology/bedtools/PLIST39
-rw-r--r--biology/bedtools/distinfo8
-rw-r--r--biology/bedtools/patches/patch-Makefile45
-rw-r--r--biology/bedtools/patches/patch-src_utils_htslib_Makefile24
6 files changed, 159 insertions, 0 deletions
diff --git a/biology/bedtools/DESCR b/biology/bedtools/DESCR
new file mode 100644
index 00000000000..bf60338ab77
--- /dev/null
+++ b/biology/bedtools/DESCR
@@ -0,0 +1,10 @@
+The bedtools utilities are a suite of tools for performing a wide range of
+genomics analysis tasks. The most widely-used of these tools enable genome
+arithmetic, i.e., set theory on the genome. For example, with bedtools one
+can intersect, merge, count, complement, and shuffle genomic intervals from
+multiple files in common genomic formats such as BAM, BED, GFF/GTF, and VCF.
+
+Although each individual utility is designed to do a relatively simple task,
+e.g., intersect two interval files, more sophisticated analyses can be
+conducted by stringing together multiple bedtools operations on the command
+line or in shell scripts.
diff --git a/biology/bedtools/Makefile b/biology/bedtools/Makefile
new file mode 100644
index 00000000000..b8c917dc20d
--- /dev/null
+++ b/biology/bedtools/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2021/01/22 17:07:50 bacon Exp $
+
+DISTNAME= bedtools-2.29.2
+CATEGORIES= biology
+MASTER_SITES= ${MASTER_SITE_GITHUB:=arq5x/}
+GITHUB_PROJECT= bedtools2
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= bacon@NetBSD.org
+HOMEPAGE= https://bedtools.readthedocs.io/en/latest/
+COMMENT= Swiss army knife for genome arithmetic
+LICENSE= mit
+
+USE_LANGUAGES= c c++
+USE_TOOLS+= gmake
+REPLACE_SH+= scripts/vcfsort.sh
+REPLACE_PYTHON= scripts/makeBashScripts.py
+
+SUBST_CLASSES+= pybin
+SUBST_STAGE.pybin= pre-configure
+SUBST_SED.pybin= -e 's|python|${PYTHONBIN}|g'
+SUBST_FILES.pybin= Makefile
+
+# Avoid conflict with C++20 <version> by adding .txt suffix
+post-extract:
+ ${MV} ${WRKSRC}/src/utils/gzstream/version \
+ ${WRKSRC}/src/utils/gzstream/version.txt
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../archivers/bzip2/buildlink3.mk"
+.include "../../archivers/xz/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/biology/bedtools/PLIST b/biology/bedtools/PLIST
new file mode 100644
index 00000000000..c7fd8967b11
--- /dev/null
+++ b/biology/bedtools/PLIST
@@ -0,0 +1,39 @@
+@comment $NetBSD: PLIST,v 1.1 2021/01/22 17:07:50 bacon Exp $
+bin/annotateBed
+bin/bamToBed
+bin/bamToFastq
+bin/bed12ToBed6
+bin/bedToBam
+bin/bedToIgv
+bin/bedpeToBam
+bin/bedtools
+bin/closestBed
+bin/clusterBed
+bin/complementBed
+bin/coverageBed
+bin/expandCols
+bin/fastaFromBed
+bin/flankBed
+bin/genomeCoverageBed
+bin/getOverlap
+bin/groupBy
+bin/intersectBed
+bin/linksBed
+bin/mapBed
+bin/maskFastaFromBed
+bin/mergeBed
+bin/multiBamCov
+bin/multiIntersectBed
+bin/nucBed
+bin/pairToBed
+bin/pairToPair
+bin/randomBed
+bin/shiftBed
+bin/shuffleBed
+bin/slopBed
+bin/sortBed
+bin/subtractBed
+bin/tagBam
+bin/unionBedGraphs
+bin/windowBed
+bin/windowMaker
diff --git a/biology/bedtools/distinfo b/biology/bedtools/distinfo
new file mode 100644
index 00000000000..de0e24bd048
--- /dev/null
+++ b/biology/bedtools/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2021/01/22 17:07:50 bacon Exp $
+
+SHA1 (bedtools-2.29.2.tar.gz) = 51f03e1cac60f99c062d9babb6385800c89c78f6
+RMD160 (bedtools-2.29.2.tar.gz) = 08ea14501ddfc85f2d4a5a756a10512a61ec93f2
+SHA512 (bedtools-2.29.2.tar.gz) = 06b0016674acb08fd85b80fe1a8ff1ebce5c54c0a30ff7f4e52e63fe5b3f3841413f49df3c51088454d79048ca267fde8c23d9ed51f309ee6916d9b49610be41
+Size (bedtools-2.29.2.tar.gz) = 20638840 bytes
+SHA1 (patch-Makefile) = d6a76cb23e623842d6d5c60d67eff928b45b091c
+SHA1 (patch-src_utils_htslib_Makefile) = ba513efa59eed05321c176185fb576f4892ea7a5
diff --git a/biology/bedtools/patches/patch-Makefile b/biology/bedtools/patches/patch-Makefile
new file mode 100644
index 00000000000..635ff4b1c2e
--- /dev/null
+++ b/biology/bedtools/patches/patch-Makefile
@@ -0,0 +1,45 @@
+$NetBSD: patch-Makefile,v 1.1 2021/01/22 17:07:50 bacon Exp $
+
+# Respect pkgsrc env, drop bash dep
+
+--- Makefile.orig 2019-12-17 20:12:15.000000000 +0000
++++ Makefile
+@@ -4,7 +4,7 @@
+ # (c) 2009 Aaron Quinlan
+ # ==========================
+
+-SHELL := /bin/bash -e
++SHELL := /bin/sh -e
+
+ VERSION_FILE=./src/utils/version/version_git.h
+ RELEASED_VERSION_FILE=./src/utils/version/version_release.txt
+@@ -21,7 +21,7 @@ OBJ_DIR = obj
+ BIN_DIR = bin
+ SRC_DIR = src
+
+-CXX = g++
++CXX ?= g++
+
+ ifeq ($(DEBUG),1)
+ BT_CPPFLAGS = -DDEBUG -D_DEBUG -D_FILE_OFFSET_BITS=64 -DWITH_HTS_CB_API $(INCLUDES)
+@@ -41,7 +41,7 @@ endif
+ BT_LDFLAGS =
+ BT_LIBS = -lz -lm -lbz2 -llzma -lpthread
+
+-prefix ?= /usr/local
++PREFIX ?= /usr/local
+
+ SUBDIRS = $(SRC_DIR)/annotateBed \
+ $(SRC_DIR)/bamToBed \
+@@ -191,9 +191,9 @@ $(BIN_DIR)/intersectBed: | $(BIN_DIR)
+ .PHONY: all
+
+ install: all
+- mkdir -p $(DESTDIR)$(prefix)/bin
++ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ for file in bin/* ; do \
+- cp -f $$file $(DESTDIR)$(prefix)/bin; \
++ cp -f $$file $(DESTDIR)$(PREFIX)/bin; \
+ done
+
+ print_banner:
diff --git a/biology/bedtools/patches/patch-src_utils_htslib_Makefile b/biology/bedtools/patches/patch-src_utils_htslib_Makefile
new file mode 100644
index 00000000000..82e9b790b08
--- /dev/null
+++ b/biology/bedtools/patches/patch-src_utils_htslib_Makefile
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_utils_htslib_Makefile,v 1.1 2021/01/22 17:07:50 bacon Exp $
+
+# Respect pkgsrc env
+
+--- src/utils/htslib/Makefile.orig 2021-01-21 22:49:18.823750624 +0000
++++ src/utils/htslib/Makefile
+@@ -22,7 +22,7 @@
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ # DEALINGS IN THE SOFTWARE.
+
+-CC = gcc
++CC ?= gcc
+ AR = ar
+ RANLIB = ranlib
+
+@@ -33,7 +33,7 @@ CPPFLAGS =
+ # TODO: probably update cram code to make it compile cleanly with -Wc++-compat
+ # For testing strict C99 support add -std=c99 -D_XOPEN_SOURCE=600
+ #CFLAGS = -g -Wall -O2 -pedantic -std=c99 -D_XOPEN_SOURCE=600 -D__FUNCTION__=__func__
+-CFLAGS = -g -Wall -O2
++CFLAGS ?= -g -Wall -O2
+ EXTRA_CFLAGS_PIC = -fpic
+ LDFLAGS =
+ LIBS = $(htslib_default_libs)