diff options
author | Andreas Tille <tille@debian.org> | 2022-12-02 13:52:00 +0100 |
---|---|---|
committer | Andreas Tille <tille@debian.org> | 2022-12-02 13:52:00 +0100 |
commit | 58f7603f702004d28b7ba98d2d0e9ae166dbcc39 (patch) | |
tree | 89b70ee4c86e781ccf940048fee684dba1f45424 |
Import bamtools_2.5.2+dfsg-3.debian.tar.xz
[dgit import tarball bamtools 2.5.2+dfsg-3 bamtools_2.5.2+dfsg-3.debian.tar.xz]
-rw-r--r-- | README.test | 9 | ||||
-rw-r--r-- | bamtools.1 | 54 | ||||
-rw-r--r-- | bamtools.install | 1 | ||||
-rw-r--r-- | bamtools.manpages | 1 | ||||
-rw-r--r-- | changelog | 259 | ||||
-rw-r--r-- | clean | 5 | ||||
-rw-r--r-- | cmake/bamtools/bamtools-config.cmake | 40 | ||||
-rw-r--r-- | control | 110 | ||||
-rw-r--r-- | copyright | 37 | ||||
-rwxr-xr-x | createmanpages | 9 | ||||
-rw-r--r-- | docs | 4 | ||||
-rw-r--r-- | libbamtools-dev.install | 1 | ||||
-rw-r--r-- | libbamtools-doc.doc-base | 9 | ||||
-rw-r--r-- | libbamtools-doc.install | 1 | ||||
-rw-r--r-- | libbamtools.docs | 1 | ||||
-rw-r--r-- | patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch | 30 | ||||
-rw-r--r-- | patches/fix_soversion.patch | 17 | ||||
-rw-r--r-- | patches/series | 3 | ||||
-rw-r--r-- | patches/shared_and_static.patch | 117 | ||||
-rwxr-xr-x | rules | 42 | ||||
-rw-r--r-- | salsa-ci.yml | 4 | ||||
-rw-r--r-- | sam_spec_example.bam | bin | 0 -> 375 bytes | |||
-rw-r--r-- | sam_spec_example.sam | 8 | ||||
-rw-r--r-- | source/format | 1 | ||||
-rw-r--r-- | source/include-binaries | 1 | ||||
-rw-r--r-- | tests/control | 3 | ||||
-rw-r--r-- | tests/filter_script | 17 | ||||
-rw-r--r-- | tests/run-unit-test | 50 | ||||
-rw-r--r-- | upstream/metadata | 31 | ||||
-rw-r--r-- | watch | 4 |
30 files changed, 869 insertions, 0 deletions
diff --git a/README.test b/README.test new file mode 100644 index 0000000..74ce729 --- /dev/null +++ b/README.test @@ -0,0 +1,9 @@ + +Notes on how this package can be tested. +──────────────────────────────────────── + +This package can be tested by executing + + sh run-unit-test + +in order to confirm its integrity. diff --git a/bamtools.1 b/bamtools.1 new file mode 100644 index 0000000..593d2b2 --- /dev/null +++ b/bamtools.1 @@ -0,0 +1,54 @@ +.TH BAMTOOLS "1" "April 2014" "bamtools 2.3.0+dfsg" "User Commands" +.SH NAME +bamtools \- toolkit for manipulating BAM (genome alignment) files +.SH SYNOPSIS +.B bamtools +[\-\-help] COMMAND [ARGS] +.SH DESCRIPTION +BamTools facilitates research analysis and data management using BAM +files. It copes with the enormous amount of data produced by current +sequencing technologies that is typically stored in compressed, binary +formats that are not easily handled by the text-based parsers commonly +used in bioinformatics research. +.SH OPTIONS +.TP +convert +Converts between BAM and a number of other formats +.TP +count +Prints number of alignments in BAM file(s) +.TP +coverage +Prints coverage statistics from the input BAM file +.TP +filter +Filters BAM file(s) by user\-specified criteria +.TP +header +Prints BAM header information +.TP +index +Generates index for BAM file +.TP +merge +Merge multiple BAM files into single file +.TP +random +Select random alignments from existing BAM file(s), intended more as a testing tool. +.TP +resolve +Resolves paired\-end reads (marking the IsProperPair flag as needed) +.TP +revert +Removes duplicate marks and restores original base qualities +.TP +sort +Sorts the BAM file according to some criteria +.TP +split +Splits a BAM file on user\-specified property, creating a new BAM output file for each value found +.TP +stats +Prints some basic statistics from input BAM file(s) +.PP +See 'bamtools help COMMAND' for more information on a specific command. diff --git a/bamtools.install b/bamtools.install new file mode 100644 index 0000000..1df36c6 --- /dev/null +++ b/bamtools.install @@ -0,0 +1 @@ +usr/bin/* diff --git a/bamtools.manpages b/bamtools.manpages new file mode 100644 index 0000000..e618c88 --- /dev/null +++ b/bamtools.manpages @@ -0,0 +1 @@ +debian/bamtools.1 diff --git a/changelog b/changelog new file mode 100644 index 0000000..4ff6265 --- /dev/null +++ b/changelog @@ -0,0 +1,259 @@ +bamtools (2.5.2+dfsg-3) unstable; urgency=medium + + * Reduce number of tests also for armel + Closes: #992143 + + -- Andreas Tille <tille@debian.org> Fri, 02 Dec 2022 13:52:00 +0100 + +bamtools (2.5.2+dfsg-2) unstable; urgency=medium + + * Do not try to move Doxyfile.bak which does not exist any more in doxygen + 1.9.4 + Closes: #1015861 + * Build-Depends: pkg-config (since cmake is asking for it) + * Standards-Version: 4.6.1 (routine-update) + + -- Andreas Tille <tille@debian.org> Fri, 02 Sep 2022 19:53:29 +0200 + +bamtools (2.5.2+dfsg-1) experimental; urgency=medium + + [ Michael R. Crusoe ] + * Standards-Version: 4.6.0 (routine-update) + * refresh patches including reworking the shared & static library patch + + [ Andreas Tille ] + * Remove Dominique Belhachemi from Uploaders (Thanks Dominique for all + your work) + * Remove unneeded lintian override + + [ Étienne Mollier ] + * Remove gcc11.patch + + -- Andreas Tille <tille@debian.org> Fri, 18 Mar 2022 13:25:54 +0100 + +bamtools (2.5.1+dfsg-10) unstable; urgency=medium + + * Team upload. + * Add gcc11.patch (Closes: 983981) + * Remove bamtools.lintian-overrides + + -- Étienne Mollier <emollier@debian.org> Sat, 06 Nov 2021 19:31:45 +0100 + +bamtools (2.5.1+dfsg-9) unstable; urgency=medium + + [ Steffen Möller ] + * Update metadata - indent and ref to guix + + [ Andreas Tille ] + * Extend means to prevent timeouts from amd64 also to armhf and s390x + Closes: #987023 + + -- Andreas Tille <tille@debian.org> Thu, 15 Apr 2021 21:28:36 +0200 + +bamtools (2.5.1+dfsg-8) unstable; urgency=medium + + * Exclude test that times out on arm64 + Closes: #953939 + * Standards-Version: 4.5.1 (routine-update) + + -- Andreas Tille <tille@debian.org> Wed, 27 Jan 2021 08:26:37 +0100 + +bamtools (2.5.1+dfsg-7) unstable; urgency=medium + + * Override dh_auto_install-indep + Closes: #961777 + + -- Andreas Tille <tille@debian.org> Fri, 29 May 2020 13:00:25 +0200 + +bamtools (2.5.1+dfsg-6) unstable; urgency=medium + + * Add IsSupplementaryAlignment() patch from bamtools code copy shipped + with tiddit + * Standards-Version: 4.5.0 (routine-update) + * debhelper-compat 13 (routine-update) + * Add salsa-ci file (routine-update) + * Rules-Requires-Root: no (routine-update) + * Set upstream metadata fields: Bug-Submit. + * Use d-shlibs + * Build additional static lib + + -- Andreas Tille <tille@debian.org> Wed, 27 May 2020 12:14:50 +0200 + +bamtools (2.5.1+dfsg-5) unstable; urgency=medium + + * Ignore one test that is known to fail on ppc64el architecture + Closes: #933505 + * Set upstream metadata fields: Bug-Database, Repository, Repository- + Browse. + + -- Andreas Tille <tille@debian.org> Tue, 10 Dec 2019 12:00:36 +0100 + +bamtools (2.5.1+dfsg-4) unstable; urgency=medium + + [ Jelmer Vernooij ] + * Trim trailing whitespace. + + [ Andreas Tille ] + * debhelper-compat 12 + * Standards-Version: 4.4.1 + * Drop useless get-orig-source target + * Respect DEB_BUILD_OPTIONS in override_dh_auto_test target + * Trim trailing whitespace. + * Set upstream metadata fields: Repository. + * Remove obsolete fields Name from debian/upstream/metadata. + + -- Andreas Tille <tille@debian.org> Thu, 10 Oct 2019 12:59:38 +0200 + +bamtools (2.5.1+dfsg-3) unstable; urgency=medium + + * Point Vcs fields to salsa.debian.org + * Use Breaks+Replaces: libbamtools2.4.0 (<< 2.5.1+dfsg-2~) since the + includes were formerly in lib package + Closes: #894886 + + -- Andreas Tille <tille@debian.org> Thu, 05 Apr 2018 11:54:57 +0200 + +bamtools (2.5.1+dfsg-2) unstable; urgency=medium + + * Move /usr/includes to -dev from libbamtools2.4.0 + * debian/control: add Multi-Arch hints and remove unneeded ${devlibs:Depends} + * Build the shared library. + * drop 0002-support-out-of-source-build patch, as this was fixed differently + upstream + * Match upstream's soname change + + -- Michael R. Crusoe <michael.crusoe@gmail.com> Tue, 03 Apr 2018 04:18:02 -0700 + +bamtools (2.5.1+dfsg-1) unstable; urgency=medium + + [ Andreas Tille ] + * New upstream version + * cme fix dpkg-control + * debhelper 11 + + [ Michael R. Crusoe ] + * Make release ready with cme fix dpkg + * fix built in tests + * debian/rules: remove unused variables; drop custom library install; add + hardening + + -- Michael R. Crusoe <michael.crusoe@gmail.com> Mon, 02 Apr 2018 09:47:32 -0700 + +bamtools (2.4.1+dfsg-2) unstable; urgency=medium + + * Team upload. + + [ Nadiya Sitdykova ] + * add autopkgtest test-suite + + [ Afif Elghraoui ] + * remove unused lintian overrides + + [ Steffen Moeller ] + * debian/upstream/metadata: Added refs to bio.tools and OMICtools + * debian/copyright: Corrected case of upstream name + * debian/control: Updated policy compliance to 4.0.1 + + -- Nadiya Sitdykova <rovenskasa@gmail.com> Mon, 07 Aug 2017 17:01:19 -0400 + +bamtools (2.4.1+dfsg-1) unstable; urgency=medium + + * New upstream version + * debhelper 10 + * cme fix dpkg-control + * d/watch: version=4 + * Priority: optional + * soversion stays at 2.4.0 (FIXME: in future versions this should + be rather 2.5 without micro number) + + -- Andreas Tille <tille@debian.org> Fri, 13 Jan 2017 10:47:00 +0100 + +bamtools (2.4.0+dfsg-6) unstable; urgency=medium + + * Whoops, forgot the '+dfsg' in my fix for the movement of the development + docs into their own -doc package. Thanks go to Andreas Beckmann + <anbe@debian.org> for his patience and help. (Closes: 817188) + + -- Michael R. Crusoe <crusoe@ucdavis.edu> Thu, 10 Mar 2016 01:38:21 -0800 + +bamtools (2.4.0+dfsg-5) unstable; urgency=medium + + * Fix the movement of the development docs into their own -doc package + (Closes: 817188) + * Fix another typo in upstream + + -- Michael R. Crusoe <crusoe@ucdavis.edu> Wed, 09 Mar 2016 00:58:33 -0800 + +bamtools (2.4.0+dfsg-4) unstable; urgency=medium + + * Lower priority to 'extra' due to dependency on libjsoncpp1 + * Split out -doc package for library documentation & enable standalone -arch + and -indep building + * Fix spelling error from upstream + * Update Standards-Version + * Update my email address + * Fix Vcs-Git URL + * Quiet some Doxygen warnings + * Add gcc-6 compat + * Include ${devlibs} for -dev package + * Forwarded many patches upstream + * Remove the html docs directory during d/rules clean + + -- Michael R. Crusoe <crusoe@ucdavis.edu> Sat, 05 Mar 2016 09:07:48 -0800 + +bamtools (2.4.0+dfsg-3) unstable; urgency=medium + + * allows one to read bam files on big endian systems (Closes: #807979) + * added sam_spec_example.sam and sam_spec_example.bam files + * activated cmake testing framework abd added simple tests + + -- Dominique Belhachemi <domibel@debian.org> Sun, 20 Dec 2015 15:41:42 -0500 + +bamtools (2.4.0+dfsg-2) unstable; urgency=medium + + [ Kevin Murray ] + * Fix re-upload confusion + * Fix build of doxygen docs, add docs-base + * Use uscan file renaming to name upstream tarball bamtools-Vxxx.tar.gz + * Refresh patch queue + + [ Andreas Tille] + * Fix linitan overides for bamtools + + -- Kevin Murray <spam@kdmurray.id.au> Thu, 24 Sep 2015 17:27:16 +1000 + +bamtools (2.4.0+dfsg-1) unstable; urgency=medium + + * New upstream version + * Fix d/watch + get-orig-source target + * Adapt library package name to version number + + -- Andreas Tille <tille@debian.org> Sun, 05 Jul 2015 15:41:35 +0200 + +bamtools (2.3.0+dfsg-3) unstable; urgency=medium + + [ Michael R. Crusoe ] + * Make Doxygen documentation generation reproducible by eliminating + timestamps. + + [ Andreas Tille ] + * Install cmake file + * Fix some issues in formatting of long descriptions (thanks for the patch + to Daniele Forsi <dforsi@gmail.com>) + Closes: #780437 + * cme fix dpkg-control + + -- Andreas Tille <tille@debian.org> Mon, 18 May 2015 11:53:14 +0200 + +bamtools (2.3.0+dfsg-2) unstable; urgency=medium + + * Drop d-shlibs patch and add versioned Build-Depends for d-shlibs + Closes: #753210 + + -- Andreas Tille <tille@debian.org> Mon, 30 Jun 2014 09:50:50 +0200 + +bamtools (2.3.0+dfsg-1) unstable; urgency=low + + * Initial release (Closes: #692498) + + -- Andreas Tille <tille@debian.org> Wed, 02 Apr 2014 13:11:47 +0200 @@ -0,0 +1,5 @@ +bin/* +lib/* +include/* +src/toolkit/bamtools_version.h +html/ diff --git a/cmake/bamtools/bamtools-config.cmake b/cmake/bamtools/bamtools-config.cmake new file mode 100644 index 0000000..eb0173f --- /dev/null +++ b/cmake/bamtools/bamtools-config.cmake @@ -0,0 +1,40 @@ +# - Config file for the BamTools package +################################################# +# Found at +# https://bitbucket.org/lunacab/ccdeep/raw/229ad7adb3700eec272a6cce36966b458bdaaa7a/bamtools-config.cmake +# Installed to /usr/share/cmake/bamtools +# according to the advise given in #761516 which links to the doc +# http://www.cmake.org/cmake/help/v2.8.12/cmake.html#command%3afind_package +# Andreas Tille <tille@debian.org> +################################################# +# It defines the following variables +# bamtools_FOUND - System has bamtols +# bamtools_INCLUDE_DIRS - include directories for BamTools +# bamtools_LIBRARIES - libraries to link against +# bamtools_EXECUTABLE - the bar executable + + +include(FindPackageHandleStandardArgs) +find_path(bamtools_INCLUDE_DIR api/BamReader.h + HINTS ENV BAMTOOLS_INC + PATH_SUFFIXES bamtools + ) + +find_library(bamtools_LIBRARY NAMES bamtools + HINTS ${CMAKE_SYSTEM_LIB_PATH} + PATH_SUFFIXES bamtools + ) + +get_filename_component(bamtools_LIB_DIR ${bamtools_LIBRARY} + PATH) + +set(bamtools_LIBRARIES ${bamtools_LIB_DIR}) +set(bamtools_INCLUDE_DIRS ${bamtools_INCLUDE_DIR}) +get_filename_component(bamtools_REAL_LIBRARY ${bamtools_LIBRARY} REALPATH) +get_filename_component(bamtools_LIB_FILE ${bamtools_REAL_LIBRARY} NAME) + +find_package_handle_standard_args(bamtools DEFAULT_MSG + bamtools_LIBRARY bamtools_INCLUDE_DIR) + +mark_as_advanced(bamtools_LIBRARY bamtools_INCLUDE_DIR ) + @@ -0,0 +1,110 @@ +Source: bamtools +Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org> +Uploaders: Michael R. Crusoe <crusoe@debian.org>, + Andreas Tille <tille@debian.org>, + Kevin Murray <spam@kdmurray.id.au>, +Section: science +Priority: optional +Build-Depends: debhelper-compat (= 13), + d-shlibs, + cmake, + zlib1g-dev, + libjsoncpp-dev, + help2man, + doxygen, + pkg-config +Standards-Version: 4.6.1 +Vcs-Browser: https://salsa.debian.org/med-team/bamtools +Vcs-Git: https://salsa.debian.org/med-team/bamtools.git +Homepage: https://github.com/pezmaster31/bamtools/wiki +Rules-Requires-Root: no + +Package: bamtools +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: toolkit for manipulating BAM (genome alignment) files + BamTools facilitates research analysis and data management using BAM + files. It copes with the enormous amount of data produced by current + sequencing technologies that is typically stored in compressed, binary + formats that are not easily handled by the text-based parsers commonly + used in bioinformatics research. + . + BamTools provides both a C++ API for BAM file support as well as a + command-line toolkit. + . + This is the bamtools command-line toolkit. + . + Available bamtools commands: + convert Converts between BAM and a number of other formats + count Prints number of alignments in BAM file(s) + coverage Prints coverage statistics from the input BAM file + filter Filters BAM file(s) by user-specified criteria + header Prints BAM header information + index Generates index for BAM file + merge Merge multiple BAM files into single file + random Select random alignments from existing BAM file(s), intended more + as a testing tool. + resolve Resolves paired-end reads (marking the IsProperPair flag as needed) + revert Removes duplicate marks and restores original base qualities + sort Sorts the BAM file according to some criteria + split Splits a BAM file on user-specified property, creating a new BAM + output file for each value found + stats Prints some basic statistics from input BAM file(s) + +Package: libbamtools-dev +Architecture: any +Multi-Arch: same +Section: libdevel +Depends: libbamtools2.5.2 (= ${binary:Version}), + ${misc:Depends}, + ${devlibs:Depends} +Suggests: libbamtools-doc (= ${binary:Version}) +Breaks: libbamtools2.5.1 +Replaces: libbamtools2.5.1 +Description: C++ API for manipulating BAM (genome alignment) files + BamTools facilitates research analysis and data management using BAM + files. It copes with the enormous amount of data produced by current + sequencing technologies that is typically stored in compressed, binary + formats that are not easily handled by the text-based parsers commonly + used in bioinformatics research. + . + BamTools provides both a C++ API for BAM file support as well as a + command-line toolkit. + . + This is the developers API package. + +Package: libbamtools2.5.2 +Architecture: any +Multi-Arch: same +Section: libs +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: dynamic library for manipulating BAM (genome alignment) files + BamTools facilitates research analysis and data management using BAM + files. It copes with the enormous amount of data produced by current + sequencing technologies that is typically stored in compressed, binary + formats that are not easily handled by the text-based parsers commonly + used in bioinformatics research. + . + BamTools provides both a C++ API for BAM file support as well as a + command-line toolkit. + . + This is the runtime library. + +Package: libbamtools-doc +Architecture: all +Multi-Arch: foreign +Section: doc +Depends: ${misc:Depends} +Description: docs for dynamic library for manipulating BAM (genome alignment) files + BamTools facilitates research analysis and data management using BAM + files. It copes with the enormous amount of data produced by current + sequencing technologies that is typically stored in compressed, binary + formats that are not easily handled by the text-based parsers commonly + used in bioinformatics research. + . + BamTools provides both a C++ API for BAM file support as well as a + command-line toolkit. + . + This is the documentation for the library. diff --git a/copyright b/copyright new file mode 100644 index 0000000..27c306b --- /dev/null +++ b/copyright @@ -0,0 +1,37 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: BamTools +Source: https://github.com/pezmaster31/bamtools +Files-Excluded: src/third_party + +Files: * +Copyright: 2009-2012 Derek Barnett <derekwbarnett@gmail.com> + 2009-2010 Erik Garrison + 2009-2010 Gabor Marth + 2009-2010 Michael Stromberg +License: Expat + +Files: debian/* +Copyright: 2012 Michael R. Crusoe <michael.crusoe@gmail.com> + 2014 Andreas Tille <tille@debian.org> + 2015 Kevin Murray <spam@kdmurray.id.au> + 2012,2015 Dominique Belhachemi <domibel@debian.org> +License: Expat + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/createmanpages b/createmanpages new file mode 100755 index 0000000..8991d38 --- /dev/null +++ b/createmanpages @@ -0,0 +1,9 @@ +#!/bin/sh +MANDIR=debian +mkdir -p $MANDIR + +VERSION=`dpkg-parsechangelog | awk '/^Version:/ {print $2}' | sed -e 's/^[0-9]*://' -e 's/-.*//'` + +help2man --no-info --no-discard-stderr --help-option=" " \ + --name='<optional description of the program>' \ + --version-string="$VERSION" bamtools > $MANDIR/bamtools.1 @@ -0,0 +1,4 @@ +debian/README.test +debian/tests/run-unit-test +debian/tests/filter_script +debian/sam_spec_example.bam diff --git a/libbamtools-dev.install b/libbamtools-dev.install new file mode 100644 index 0000000..7687141 --- /dev/null +++ b/libbamtools-dev.install @@ -0,0 +1 @@ +debian/cmake usr/share diff --git a/libbamtools-doc.doc-base b/libbamtools-doc.doc-base new file mode 100644 index 0000000..8c76853 --- /dev/null +++ b/libbamtools-doc.doc-base @@ -0,0 +1,9 @@ +Document: libbamtools-dev +Title: Bamtools C++ API Documentation +Author: Derek Barnett <derekwbarnett@gmail.com> +Abstract: The Doxygen-generated API documentation for the bamtools C++ library +Section: Debian + +Format: HTML +Index: /usr/share/doc/libbamtools-dev/html/index.html +Files: /usr/share/doc/libbamtools-dev/html/*.html diff --git a/libbamtools-doc.install b/libbamtools-doc.install new file mode 100644 index 0000000..c49fe91 --- /dev/null +++ b/libbamtools-doc.install @@ -0,0 +1 @@ +html usr/share/doc/libbamtools-dev diff --git a/libbamtools.docs b/libbamtools.docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/libbamtools.docs @@ -0,0 +1 @@ +README diff --git a/patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch b/patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch new file mode 100644 index 0000000..eeb4031 --- /dev/null +++ b/patches/0001-ignore-thirdparty-and-fix-jsoncpp.patch @@ -0,0 +1,30 @@ +From: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org> +Date: Wed, 7 Nov 2012 18:44:06 -0700 +Subject: ignore-thirdparty-and-fix-jsoncpp +Forwarded: not-needed + +--- + src/CMakeLists.txt | 2 +- + src/toolkit/CMakeLists.txt | 1 - + src/toolkit/bamtools_filter.cpp | 2 +- + 3 files changed, 2 insertions(+), 3 deletions(-) + +--- bamtools.orig/src/CMakeLists.txt ++++ bamtools/src/CMakeLists.txt +@@ -1,4 +1,4 @@ +-add_subdirectory(third_party) ++#add_subdirectory(third_party) + + if(MSVC) + # We need full support for C++ exceptions +--- bamtools.orig/src/toolkit/bamtools_filter.cpp ++++ bamtools/src/toolkit/bamtools_filter.cpp +@@ -16,7 +16,7 @@ + #include <utils/bamtools_utilities.h> + using namespace BamTools; + +-#include <json/json.h> ++#include <jsoncpp/json/json.h> + using namespace Json; + + #include <cstdio> diff --git a/patches/fix_soversion.patch b/patches/fix_soversion.patch new file mode 100644 index 0000000..9aa8074 --- /dev/null +++ b/patches/fix_soversion.patch @@ -0,0 +1,17 @@ +Description: SONAME is only MAJOR.MINOR + Ist turned out that this patch is not really a good idea and its + better to stick with upstream soname +Author: Andreas Tille <tille@debian.org> +Last-Update: Fri, 15 Oct 2021 15:08:32 +0200 + +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -120,7 +120,7 @@ add_library( + # as Bamtools does not yet guarantee a stable ABI + set_target_properties( + BamTools PROPERTIES +- SOVERSION ${BamTools_VERSION} ++ SOVERSION "${BamTools_VERSION_MAJOR}.${BamTools_VERSION_MINOR}" + OUTPUT_NAME bamtools + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED ON diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..b318add --- /dev/null +++ b/patches/series @@ -0,0 +1,3 @@ +0001-ignore-thirdparty-and-fix-jsoncpp.patch +shared_and_static.patch +#fix_soversion.patch diff --git a/patches/shared_and_static.patch b/patches/shared_and_static.patch new file mode 100644 index 0000000..678d062 --- /dev/null +++ b/patches/shared_and_static.patch @@ -0,0 +1,117 @@ +Description: Build additional static lib +Author: Andreas Tille <tille@debian.org> +Last-Update: Wed, 27 May 2020 09:59:29 +0200 + +--- bamtools.orig/src/CMakeLists.txt ++++ bamtools/src/CMakeLists.txt +@@ -33,7 +33,7 @@ + + # create main BamTools API library + add_library( +- BamTools ++ BamTools SHARED + + api/BamAlignment.cpp + api/BamMultiReader.cpp +@@ -73,6 +73,48 @@ + api/internal/sam/SamHeaderValidator_p.cpp + api/internal/utils/BamException_p.cpp + ) ++add_library( ++ BamTools_static STATIC ++ ++ api/BamAlignment.cpp ++ api/BamMultiReader.cpp ++ api/BamReader.cpp ++ api/BamWriter.cpp ++ api/SamHeader.cpp ++ api/SamProgram.cpp ++ api/SamProgramChain.cpp ++ api/SamReadGroup.cpp ++ api/SamReadGroupDictionary.cpp ++ api/SamSequence.cpp ++ api/SamSequenceDictionary.cpp ++ api/internal/bam/BamHeader_p.cpp ++ api/internal/bam/BamMultiReader_p.cpp ++ api/internal/bam/BamRandomAccessController_p.cpp ++ api/internal/bam/BamReader_p.cpp ++ api/internal/bam/BamWriter_p.cpp ++ api/internal/index/BamIndexFactory_p.cpp ++ api/internal/index/BamStandardIndex_p.cpp ++ api/internal/index/BamToolsIndex_p.cpp ++ api/internal/io/BamDeviceFactory_p.cpp ++ api/internal/io/BamFile_p.cpp ++ api/internal/io/BamFtp_p.cpp ++ api/internal/io/BamHttp_p.cpp ++ api/internal/io/BamPipe_p.cpp ++ api/internal/io/BgzfStream_p.cpp ++ api/internal/io/ByteArray_p.cpp ++ api/internal/io/HostAddress_p.cpp ++ api/internal/io/HostInfo_p.cpp ++ api/internal/io/HttpHeader_p.cpp ++ api/internal/io/ILocalIODevice_p.cpp ++ api/internal/io/RollingBuffer_p.cpp ++ api/internal/io/TcpSocketEngine_p.cpp ++ api/internal/io/TcpSocket_p.cpp ++ api/internal/sam/SamFormatParser_p.cpp ++ api/internal/sam/SamFormatPrinter_p.cpp ++ api/internal/sam/SamHeaderValidator_p.cpp ++ api/internal/utils/BamException_p.cpp ++) ++ + + # The SONAME is bumped on every version increment + # as Bamtools does not yet guarantee a stable ABI +@@ -83,6 +125,12 @@ + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS OFF) ++set_target_properties( ++ BamTools_static PROPERTIES ++ OUTPUT_NAME bamtools ++ CXX_STANDARD 11 ++ CXX_STANDARD_REQUIRED ON ++ CXX_EXTENSIONS OFF) + target_include_directories( + BamTools PRIVATE + ${ZLIB_INCLUDE_DIRS} +@@ -91,6 +139,15 @@ + target_link_libraries( + BamTools PRIVATE + ${ZLIB_LIBRARIES}) ++target_include_directories( ++ BamTools_static PRIVATE ++ ${ZLIB_INCLUDE_DIRS} ++ ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_BINARY_DIR}) ++target_link_libraries( ++ BamTools_static PRIVATE ++ ${ZLIB_LIBRARIES}) ++ + + if(WIN32) + target_link_libraries( +@@ -103,6 +160,9 @@ + target_sources( + BamTools PRIVATE + api/internal/io/TcpSocketEngine_unix_p.cpp) ++ target_sources( ++ BamTools_static PRIVATE ++ api/internal/io/TcpSocketEngine_unix_p.cpp) + endif() + + if(EnableNodeJS) +@@ -195,6 +255,13 @@ + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install( ++ TARGETS BamTools_static ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ++ ++install( + TARGETS bamtools_cmd + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -0,0 +1,42 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow + +%: + dh $@ + +override_dh_auto_test-indep: + +override_dh_auto_test-arch: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + cd obj-* && ln -s src/toolkit/ bin + dh_auto_test --arch +endif + +override_dh_auto_build-indep: + doxygen -u docs/Doxyfile + doxygen docs/Doxyfile + +override_dh_auto_install-indep: + +override_dh_install-arch: + dh_install --arch + d-shlibmove --commit \ + --multiarch \ + --devunversioned \ + --exclude-la \ + --movedev debian/tmp/usr/include/* usr/include \ + --movedev "debian/tmp/usr/lib/*/pkgconfig/*.pc" usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \ + debian/tmp/usr/lib/*/*.so + +override_dh_install-indep: + dh_install --indep + rm -f debian/libbamtools-doc/usr/share/doc/libbamtools-dev/html/jquery.js + ln -s /usr/share/javascript/jquery/jquery.js debian/libbamtools-doc/usr/share/doc/libbamtools-dev/html/jquery.js + +describe-current-version: + git describe --tags upstream | sed 's,^release-,,;s,-,+,;s,-,~,;' diff --git a/salsa-ci.yml b/salsa-ci.yml new file mode 100644 index 0000000..33c3a64 --- /dev/null +++ b/salsa-ci.yml @@ -0,0 +1,4 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml diff --git a/sam_spec_example.bam b/sam_spec_example.bam Binary files differnew file mode 100644 index 0000000..7e460a1 --- /dev/null +++ b/sam_spec_example.bam diff --git a/sam_spec_example.sam b/sam_spec_example.sam new file mode 100644 index 0000000..01490f5 --- /dev/null +++ b/sam_spec_example.sam @@ -0,0 +1,8 @@ +@HD VN:1.5 SO:coordinate +@SQ SN:ref LN:45 +r001 99 ref 7 30 8M2I4M1D3M = 37 39 TTAGATAAAGGATACTG * +r002 0 ref 9 30 3S6M1P1I4M * 0 0 AAAAGATAAGGATA * +r003 0 ref 9 30 5S6M * 0 0 GCCTAAGCTAA * SA:Z:ref,29,-,6H5M,17,0; +r004 0 ref 16 30 6M14N5M * 0 0 ATAGCTTCAGC * +r003 2064 ref 29 17 6H5M * 0 0 TAGGC * SA:Z:ref,9,+,5S6M,30,1; +r001 147 ref 37 30 9M = 7 -39 CAGCGGCAT * NM:i:1 diff --git a/source/format b/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/source/include-binaries b/source/include-binaries new file mode 100644 index 0000000..130b83c --- /dev/null +++ b/source/include-binaries @@ -0,0 +1 @@ +debian/sam_spec_example.bam diff --git a/tests/control b/tests/control new file mode 100644 index 0000000..d2aa55a --- /dev/null +++ b/tests/control @@ -0,0 +1,3 @@ +Tests: run-unit-test +Depends: @ +Restrictions: allow-stderr diff --git a/tests/filter_script b/tests/filter_script new file mode 100644 index 0000000..e30f78c --- /dev/null +++ b/tests/filter_script @@ -0,0 +1,17 @@ +{ + "filters" : + [ + { "id" : "inAnyErrorReadGroup", + "tag" : "RG:ERR*" + }, + { "id" : "highMapQuality", + "mapQuality" : ">=75" + }, + { "id" : "bothMatesMapped", + "isMapped" : "true", + "isMateMapped" : "true" + } + ], + "rule" : "!inAnyErrorReadGroup & (highMapQuality | bothMatesMapped)" +} + diff --git a/tests/run-unit-test b/tests/run-unit-test new file mode 100644 index 0000000..57a9fb3 --- /dev/null +++ b/tests/run-unit-test @@ -0,0 +1,50 @@ +#!/bin/sh -e + +pkg=bamtools + +if [ "$AUTOPKGTEST_TMP" = "" ] ; then + AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) + trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM +fi + +cd $AUTOPKGTEST_TMP + +cp -a /usr/share/doc/${pkg}/sam_spec_example.bam . +cp -a /usr/share/doc/${pkg}/filter_script . +gunzip -r * + +bamtools convert -format fastq -in sam_spec_example.bam -out test.fastq + +bamtools convert -format json -in sam_spec_example.bam -out test.json + +bamtools count -in sam_spec_example.bam + +bamtools coverage -in sam_spec_example.bam -out out + +# This test fails on ppc64el for whatever reason and is for the moment (see bug #933505) +# The test is also problematic for armel (see bug #992143) +ARCH=$(dpkg --print-architecture) +if [ "$ARCH" != "ppc64el" -a "$ARCH" != "arm64" -a "$ARCH" != "armel"-a "$ARCH" != "armhf" -a "$ARCH" != "s390x" ] ; then + bamtools filter -script filter_script -in sam_spec_example.bam -out out.bam +else + if [ "$ARCH" = "ppc64el" ] ; then + echo "The following test is known to fail on ppc64el architecture (see bug #933505)" + else + echo "The following test is known to time out on $ARCH architecture (see bug #953939)" + fi + echo "bamtools filter -script filter_script -in sam_spec_example.bam -out out.bam" +fi + +bamtools header -in sam_spec_example.bam + +bamtools index -in sam_spec_example.bam + +bamtools random -n 100 -in sam_spec_example.bam -out out.bam + +bamtools revert -in sam_spec_example.bam -out out.bam + +bamtools sort -in sam_spec_example.bam -out out.bam + +bamtools split -mapped -in sam_spec_example.bam + +bamtools stats -in sam_spec_example.bam diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 0000000..d9e0894 --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,31 @@ +Bug-Submit: https://github.com/pezmaster31/bamtools/issues/new +Reference: + - Author: > + Derek W. Barnett and Erik K. Garrison and Aaron R. Quinlan and + Michael P. Stromberg and Gabor T. Marth + Title: > + BamTools: a C++ API and toolkit for analyzing and managing BAM files + Journal: Bioinformatics + Year: 2011 + Volume: 27 + Number: 12 + Pages: 1691-2 + DOI: 10.1093/bioinformatics/btr174 + PMID: 21493652 + URL: http://bioinformatics.oxfordjournals.org/content/27/12/1691 + eprint: > + http://bioinformatics.oxfordjournals.org/content/27/12/1691.full.pdf+html +Registry: + - Name: OMICtools + Entry: OMICS_11315 + - Name: SciCrunch + Entry: SCR_015987 + - Name: bio.tools + Entry: BamTools + - Name: conda:bioconda + Entry: bamtools + - Name: guix + Entry: bamtools +Repository: https://github.com/pezmaster31/bamtools.git +Bug-Database: https://github.com/pezmaster31/bamtools/issues +Repository-Browse: https://github.com/pezmaster31/bamtools @@ -0,0 +1,4 @@ +version=4 + +opts="repacksuffix=+dfsg,dversionmangle=s/\+dfsg.*//,filenamemangle=s/(?:.*?)?v?(\d[\d.]*)\.tar\.gz/bamtools-$1.tar.gz/" \ +https://github.com/pezmaster31/bamtools/tags .*/v?(\d[\d\.]+)\.tar\.gz |