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.
This commit is contained in:
bacon 2021-01-22 17:07:50 +00:00
parent 936648995e
commit ec20fe0180
6 changed files with 159 additions and 0 deletions

10
biology/bedtools/DESCR Normal file
View file

@ -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.

33
biology/bedtools/Makefile Normal file
View file

@ -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"

39
biology/bedtools/PLIST Normal file
View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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)