Skip to content
Commits on Source (13)
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.pico
*.obj
*.orig
*.rej
*.so
*.a
*.dylib
*.pyc
*~
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
CMakeLists.txt.user
bin/
build/
docs/Doxyfile
lib/
tests/bin/test_pbbam
tests/data/test_group_query/group.fofn
tests/src/TestData.h
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
.vscode
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
# Generated directories
bin
build
lib
# Meson WrapDB stuff
subprojects/packagecache/
subprojects/googletest*
# generated Doxyfile
*Doxyfile
......@@ -10,6 +10,39 @@ guarantees will be maintained within each major version series.
## Active
## [0.23.0] - 2019-03-11
### Added
- PbiIndexCache and FastaCache for reusing file data
- BaiIndexedBamReader and GenomicIntervalQuery can be constructed without
initial interval.
## [0.22.0] - 2019-02-11
### Fixed
- Handles zero-length reads for stitching ZMW reads.
- Clipping to query on reverse-strand aligned reads.
- Removed UB in dataset API.
### Added
- "exciseFlankingInserts" option for clipping reads w.r.t reference.
## [0.21.0] - 2018-12-21
### Added
- New local context flags: ADAPTER_BEFORE_BAD and ADAPTER_AFTER_BAD.
### Changed
- Current PacBioBAM spec now 3.0.7.
### Removed
- CMake has been removed completely.
## [0.20.0] - 2018-10-03
### Added
- Support for (optionally) barcode-labeled read group IDs.
## [0.19.0] - 2018-09-11
### Added
......
########################################################################
# CMake build script for PacBioBAM library.
########################################################################
cmake_policy(SET CMP0048 NEW) # lets us set version in project()
project(PacBioBAM VERSION 0.19.0 LANGUAGES CXX C)
cmake_minimum_required(VERSION 3.0)
# project name & version
set(PacBioBAM_NAME pbbam)
set(PacBioBAM_VERSION
"${PacBioBAM_VERSION_MAJOR}.${PacBioBAM_VERSION_MINOR}.${PacBioBAM_VERSION_PATCH}"
)
# list build-time options
option(PacBioBAM_build_docs "Build PacBioBAM's API documentation." ON)
option(PacBioBAM_build_tests "Build PacBioBAM's unit tests." ON)
option(PacBioBAM_build_shared "Build PacBioBAM as shared library as well." OFF)
option(PacBioBAM_build_tools "Build PacBioBAM command line utilities (e.g. pbindex)" ON)
option(PacBioBAM_use_modbuild "Build PacBioBAM using Modular Build System." OFF)
option(PacBioBAM_use_ccache "Build PacBioBAM using ccache, if available." ON)
option(PacBioBAM_auto_validate "Build PacBioBAM with auto-validation enabled." OFF)
if(PacBioBAM_build_tests)
enable_testing()
endif()
set(PacBioBAM_permissive_cigar OFF)
STRING(TOLOWER "${PBBAM_PERMISSIVE_CIGAR}" PBBAM_PERMISSIVE_CIGAR_LOWER)
if (DEFINED PBBAM_PERMISSIVE_CIGAR)
set(PacBioBAM_permissive_cigar ON)
add_definitions(-DPBBAM_PERMISSIVE_CIGAR)
endif()
# project paths
set(PacBioBAM_RootDir ${CMAKE_CURRENT_LIST_DIR})
set(PacBioBAM_DocsDir ${PacBioBAM_RootDir}/docs)
set(PacBioBAM_IncludeDir ${PacBioBAM_RootDir}/include)
set(PacBioBAM_SourceDir ${PacBioBAM_RootDir}/src)
set(PacBioBAM_TestsDir ${PacBioBAM_RootDir}/tests)
set(PacBioBAM_ThirdPartyDir ${PacBioBAM_RootDir}/third-party)
set(PacBioBAM_ToolsDir ${PacBioBAM_RootDir}/tools)
if(NOT PacBioBAM_OutputDir)
set(PacBioBAM_OutputDir ${CMAKE_CURRENT_BINARY_DIR})
endif()
set(PacBioBAM_BinDir ${PacBioBAM_OutputDir}/bin)
set(PacBioBAM_LibDir ${PacBioBAM_OutputDir}/lib)
set(GeneratedDir ${CMAKE_BINARY_DIR}/generated)
set(GeneratedTestDataDir ${GeneratedDir}/data)
file(MAKE_DIRECTORY ${PacBioBAM_BinDir})
file(MAKE_DIRECTORY ${PacBioBAM_LibDir})
file(MAKE_DIRECTORY ${GeneratedDir})
file(MAKE_DIRECTORY ${GeneratedTestDataDir})
# project configuration (keep this order)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake ${CMAKE_MODULE_PATH})
include(pbbam-ccache)
include(pbbam-compilerflags)
include(pbbam-libtype)
include(pbbam-dependencies)
# project components (keep this order)
add_subdirectory(src)
add_subdirectory(tools)
add_subdirectory(docs)
add_subdirectory(tests)
......@@ -22,104 +22,33 @@ module load boost
module load cram
BOOST_ROOT="${BOOST_ROOT%/include}"
# unset these variables to have meson discover all
# boost-dependent variables from BOOST_ROOT alone
unset BOOST_INCLUDEDIR
unset BOOST_LIBRARYDIR
export CC="ccache gcc"
export CXX="ccache g++"
export CCACHE_BASEDIR="${PWD}"
if [[ $USER == bamboo ]]; then
export CCACHE_DIR=/mnt/secondary/Share/tmp/bamboo.${bamboo_shortPlanKey}.ccachedir
export CCACHE_TEMPDIR=/scratch/bamboo.ccache_tempdir
fi
export BUILD_NUMBER="0"
case "${bamboo_planRepository_branchName}" in
develop|master)
_install_image_default="${INSTALL_IMAGE:-false}"
_create_artifact_default="${CREATE_ARTIFACT:-false}"
export PREFIX_ARG="/mnt/software/p/pbbam/${bamboo_planRepository_branchName}"
export BUILD_NUMBER="${bamboo_globalBuildNumber:-0}"
;;
*)
export BUILD_NUMBER="0"
;;
esac
# in order to make shared libraries consumable
# by conda and other package managers
export LDFLAGS="-static-libstdc++ -static-libgcc"
# i : unity build
for i in "on" "off"; do
for j in "system-gcc" "gcc/8.1.0" "gcc"; do
# 1. load either current MOBS GCC or RHEL-default GCC
if [[ ${j} == system-gcc ]]; then
module load gtest/gcc48
else
module load ${j} gtest
fi
module load ccache
export _install_image="${_install_image_default:-false}"
export _create_artifact="${_create_artifact_default:-false}"
export CURRENT_BUILD_DIR="build_unity=${i^^}_gcc=${j/\//_}"
export ENABLED_TESTS="true"
export ENABLED_UNITY_BUILD="${i}"
bash scripts/ci/build.sh
bash scripts/ci/test.sh
module unload ccache gtest
[[ ${j} != system-gcc ]] && module unload gcc
done
done
# create symlink so Bamboo can find the xunit output
ln -s "${CURRENT_BUILD_DIR}" build
if [[ -z ${PREFIX_ARG+x} ]]; then
echo "Not installing anything (branch: ${bamboo_planRepository_branchName}), exiting."
exit 0
fi
bash scripts/ci/install.sh
if [[ ${BUILD_NUMBER} == 0 ]]; then
echo "Build number is 0, hence not creating artifact"
exit 0
fi
echo "## Creating artifact"
# install into staging dir with --prefix /usr/local
# in order to sidestep all the artifact policy
rm -rf staging
meson configure -Dprefix=/usr/local -Dtests=false "${CURRENT_BUILD_DIR}"
DESTDIR="${PWD}/staging" ninja -C "${CURRENT_BUILD_DIR}" -v install
if [[ ${BUILD_NUMBER} = 0 ]]; then
exit 0
elif [[ $bamboo_planRepository_branchName == master ]]; then
VERSION="$(${CURRENT_BUILD_DIR}/tools/bam2sam --version)".${BUILD_NUMBER}
NEXUS_REPO=maven-releases
elif [[ $bamboo_planRepository_branchName == develop ]]; then
VERSION="$(${CURRENT_BUILD_DIR}/tools/bam2sam --version)".SNAPSHOT${BUILD_NUMBER}
NEXUS_REPO=maven-snapshots
rm -rf /mnt/secondary/builds/unsupported/pbbam.previous
if [[ -e /mnt/secondary/builds/unsupported/pbbam ]]; then
mv /mnt/secondary/builds/unsupported/pbbam \
/mnt/secondary/builds/unsupported/pbbam.previous
fi
DESTDIR="/mnt/secondary/builds/unsupported/pbbam/" ninja -C "${CURRENT_BUILD_DIR}" -v install
else
exit 0
fi
NEXUS_VERSION="$(${CURRENT_BUILD_DIR}/tools/bam2sam --version)".${BUILD_NUMBER}
BOOST_ROOT="${BOOST_ROOT%/include}"
# unset these variables to have meson discover all
# boost-dependent variables from BOOST_ROOT alone
unset BOOST_INCLUDEDIR
unset BOOST_LIBRARYDIR
( cd staging && tar zcf ../pbbam-${VERSION}-x86_64.tgz . )
md5sum pbbam-${VERSION}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${VERSION}-x86_64.tgz.md5
sha1sum pbbam-${VERSION}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${VERSION}-x86_64.tgz.sha1
# in order to make shared libraries consumable
# by conda and other package managers
export LDFLAGS="-static-libstdc++ -static-libgcc"
NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/${NEXUS_REPO}/pacbio/sat/pbbam/pbbam/${NEXUS_VERSION}
curl -vn --upload-file pbbam-${VERSION}-x86_64.tgz ${NEXUS_URL}/gcc-6.4.0/pbbam-${VERSION}-x86_64.tgz
curl -vn --upload-file pbbam-${VERSION}-x86_64.tgz.md5 ${NEXUS_URL}/gcc-6.4.0/pbbam-${VERSION}-x86_64.tgz.md5
curl -vn --upload-file pbbam-${VERSION}-x86_64.tgz.sha1 ${NEXUS_URL}/gcc-6.4.0/pbbam-${VERSION}-x86_64.tgz.sha1
source scripts/ci/setup.sh
source scripts/ci/build.sh
source scripts/ci/test.sh
source scripts/ci/install.sh
source scripts/ci/artifact.sh
#!/bin/bash -vex
type module >& /dev/null || . /mnt/software/Modules/current/init/bash
module load cmake
module load ccache
export CCACHE_DIR="/mnt/secondary/Share/tmp/bamboo.${bamboo_shortPlanKey}.ccache"
HTSLIB_VERSION=$(/bin/ls -d src/htslib-*|sed -e 's/.*htslib-//'|sort -V|tail -1)
PBBAM_VERSION=$(grep 'PacBioBAM VERSION ' src/pbbam/CMakeLists.txt|sed -e 's/.*VERSION //'|awk '{print $1}')
# project(PacBioBAM VERSION 0.14.0 LANGUAGES CXX C)
BUILD_NUMBER=0
if [ -n "$bamboo_planRepository_branchName" ]; then
BUILD_NUMBER=${bamboo_globalBuildNumber:-0}
fi
rm -f *.tgz || true
rm -rf pbbam* || true
rm -rf prefix && mkdir -p prefix
PREFIX=$(readlink -f prefix)
cd src/htslib-${HTSLIB_VERSION}
export CCACHE_BASEDIR=$PWD
make distclean
CC=gcc CFLAGS='-fPIC -O' bash ./configure --prefix=$PWD/../../prefix --disable-bz2 --disable-lzma --disable-libcurl
VERBOSE=1 make install
rm -rf $PWD/../../prefix/lib/pkgconfig
cd -
cd src/pbbam
export CCACHE_BASEDIR=$PWD
rm -rf build && mkdir -p build
cd build
curl -sL -O http://nexus/repository/maven-thirdparty/libquadmath/4.8.5-11/libquadmath-devel-4.8.5-11.el7.x86_64.rpm
rpm2cpio libquadmath-devel-4.8.5-11.el7.x86_64.rpm | cpio -vid
CXXFLAGS="-fPIC -I$PWD/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include" \
CFLAGS="-fPIC" \
cmake \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_C_COMPILER="gcc" \
-DPacBioBAM_build_shared=ON \
-DPacBioBAM_build_docs=OFF \
-DPacBioBAM_build_tests=OFF \
-DHTSLIB_INCLUDE_DIRS=$PREFIX/include \
-DHTSLIB_LIBRARIES=$PREFIX/lib/libhts.a \
-DBoost_INCLUDE_DIRS=/mnt/software/b/boost/1.60/include \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_BUILD_RPATH=FALSE ..
VERBOSE=1 make -j
tar c bin lib | tar xv -C ../../../prefix/
cd ..
tar c include/pbbam | tar xv -C ../../prefix/
cd ../..
if [ ! -n "$bamboo_planRepository_branchName" ]; then
SNAPSHOT="_branch_"
fi
if [ "$bamboo_planRepository_branchName" = "develop" ]; then
SNAPSHOT="SNAPSHOT"
elif [ "$bamboo_planRepository_branchName" = "master" ]; then
SNAPSHOT=""
else
SNAPSHOT="_branch_"
fi
rsync -ax --delete prefix/ pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}/
tar zcf pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}
sha1sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
md5sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
if [ "$bamboo_planRepository_branchName" = "develop" ]; then
NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/maven-snapshots/pacbio/itg/pbbam/${PBBAM_VERSION}.${BUILD_NUMBER}
elif [ "$bamboo_planRepository_branchName" = "master" ]; then
NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/maven-releases/pacbio/itg/pbbam/${PBBAM_VERSION}.${BUILD_NUMBER}
else
echo "[INFO] pbbam-${PBBAM_VERSION}.SNAPSHOT${BUILD_NUMBER}-x86_64.tgz if the branch was develop"
exit
fi
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz
#!/bin/bash -vex
type module >& /dev/null || . /mnt/software/Modules/current/init/bash
module use /mnt/software/modulefiles
module use /pbi/dept/primary/modulefiles
module load cmake
module load ccache
export CCACHE_DIR="/mnt/secondary/Share/tmp/bamboo.${bamboo_shortPlanKey}.ccache"
# module load composer_xe/2017.4.196
HTSLIB_VERSION=$(/bin/ls -d src/htslib-*|sed -e 's/.*htslib-//'|sort -V|tail -1)
PBBAM_VERSION=$(grep 'PacBioBAM VERSION ' src/pbbam/CMakeLists.txt|sed -e 's/.*VERSION //'|awk '{print $1}')
# project(PacBioBAM VERSION 0.14.0 LANGUAGES CXX C)
BUILD_NUMBER=0
if [ -n "$bamboo_planRepository_branchName" ]; then
BUILD_NUMBER=${bamboo_globalBuildNumber:-0}
fi
rm -f *.tgz || true
rm -rf pbbam* || true
# rm -rf prefix && mkdir -p prefix
# cd src/htslib-${HTSLIB_VERSION}
# export CCACHE_BASEDIR=$PWD
# CC=icc CXX=icpc \
# CFLAGS='-fPIC -Os' bash ./configure --prefix=$PWD/../../prefix
# VERBOSE=1 make CC='ccache icc' install
# rm -rf $PWD/../../prefix/lib/pkgconfig
#
# cd -
# cd src/pbbam
# export CCACHE_BASEDIR=$PWD
# rm -rf build && mkdir -p build
# cd build
# cmake \
# -DCMAKE_CXX_COMPILER="ccache" \
# -DCMAKE_CXX_COMPILER_ARG1="icpc -fPIC" \
# -DCMAKE_C_COMPILER="ccache" \
# -DCMAKE_C_COMPILER_ARG1="icc -fPIC" \
# -DPacBioBAM_build_shared=OFF \
# -DPacBioBAM_build_docs=OFF \
# -DPacBioBAM_build_tests=OFF \
# -DHTSLIB_INCLUDE_DIRS=$PWD/../../../prefix/include \
# -DHTSLIB_LIBRARIES=$PWD/../../../prefix/lib/libhts.a \
# -DBoost_INCLUDE_DIRS=/mnt/software/b/boost/1.60/include \
# -DCMAKE_BUILD_TYPE=RelWithDebInfo \
# -DCMAKE_SKIP_BUILD_RPATH=FALSE ..
# VERBOSE=1 make -j
# tar c bin lib | tar xv -C ../../../prefix/
# cd ..
# tar c include/pbbam | tar xv -C ../../prefix/
# cd ../..
#
# if [ ! -n "$bamboo_planRepository_branchName" ]; then
# SNAPSHOT="_branch_"
# fi
# if [ "$bamboo_planRepository_branchName" = "develop" ]; then
# SNAPSHOT="SNAPSHOT"
# elif [ "$bamboo_planRepository_branchName" = "master" ]; then
# SNAPSHOT=""
# else
# SNAPSHOT="_branch_"
# fi
#
# rsync -ax --delete prefix/ pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}/
#
# tar zcf pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}
# sha1sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
# md5sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
# if [ "$bamboo_planRepository_branchName" = "develop" -o "$bamboo_planRepository_branchName" = "master" ]; then
# NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/maven-snapshots/pacbio/seq/pa/pbbam/${PBBAM_VERSION}.${BUILD_NUMBER}
# curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
# curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
# curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz
# else
# echo "[INFO] pbbam-${PBBAM_VERSION}.SNAPSHOT${BUILD_NUMBER}-x86_64.tgz if the branch is develop"
# fi
# GCC BUILD
# module unload composer_xe/2017.4.196
# module load gcc/4.9.2
rm -rf prefix && mkdir -p prefix
cd src/htslib-${HTSLIB_VERSION}
export CCACHE_BASEDIR=$PWD
make distclean
CC=gcc CFLAGS='-fPIC -O' bash ./configure --prefix=$PWD/../../prefix --disable-bz2 --disable-lzma --disable-libcurl
VERBOSE=1 make install
rm -rf $PWD/../../prefix/lib/pkgconfig
cd -
cd src/pbbam
export CCACHE_BASEDIR=$PWD
rm -rf build && mkdir -p build
cd build
curl -sL -O http://nexus/repository/maven-thirdparty/libquadmath/4.8.5-11/libquadmath-devel-4.8.5-11.el7.x86_64.rpm
rpm2cpio libquadmath-devel-4.8.5-11.el7.x86_64.rpm | cpio -vid
CXXFLAGS="-fPIC -I$PWD/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include" \
CFLAGS="-fPIC" \
cmake \
-DCMAKE_CXX_COMPILER="g++" \
-DCMAKE_C_COMPILER="gcc" \
-DPacBioBAM_build_shared=OFF \
-DPacBioBAM_build_docs=OFF \
-DPacBioBAM_build_tests=OFF \
-DHTSLIB_INCLUDE_DIRS=$PWD/../../../prefix/include \
-DHTSLIB_LIBRARIES=$PWD/../../../prefix/lib/libhts.a \
-DBoost_INCLUDE_DIRS=/mnt/software/b/boost/1.60/include \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_BUILD_RPATH=FALSE ..
VERBOSE=1 make -j
tar c bin lib | tar xv -C ../../../prefix/
cd ..
tar c include/pbbam | tar xv -C ../../prefix/
cd ../..
if [ ! -n "$bamboo_planRepository_branchName" ]; then
SNAPSHOT="_branch_"
fi
if [ "$bamboo_planRepository_branchName" = "develop" ]; then
SNAPSHOT="SNAPSHOT"
elif [ "$bamboo_planRepository_branchName" = "master" ]; then
SNAPSHOT=""
else
SNAPSHOT="_branch_"
fi
rsync -ax --delete prefix/ pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}/
tar zcf pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}
sha1sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
md5sum pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz | awk -e '{print $1}' >| pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
if [ "$bamboo_planRepository_branchName" = "develop" ]; then
NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/maven-snapshots/pacbio/seq/pa/pbbam/${PBBAM_VERSION}.${BUILD_NUMBER}
elif [ "$bamboo_planRepository_branchName" = "master" ]; then
NEXUS_URL=http://ossnexus.pacificbiosciences.com/repository/maven-releases/pacbio/seq/pa/pbbam/${PBBAM_VERSION}.${BUILD_NUMBER}
else
echo "[INFO] pbbam-${PBBAM_VERSION}.SNAPSHOT${BUILD_NUMBER}-x86_64.tgz if the branch was develop"
echo "[INFO] pbbam-${PBBAM_VERSION}.${BUILD_NUMBER}-x86_64.tgz if the branch was master"
exit
fi
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.md5
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1 $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz.sha1
curl -L -fvn --upload-file pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz $NEXUS_URL/pbbam-${PBBAM_VERSION}.${SNAPSHOT}${BUILD_NUMBER}-x86_64.tgz
#!/usr/bin/env bash
set -xve
source /mnt/software/Modules/current/init/bash
module load gcc meson ccache ninja zlib htslib samtools cram boost gtest gcov
echo "#####################"
echo "# BUILD & RUN TESTS #"
echo "#####################"
rm -rf build
mkdir build
cd build
meson \
--werror \
--backend ninja \
--buildtype debug \
--default-library shared \
--libdir lib \
--wrap-mode nofallback \
--prefix "${PREFIX_ARG:-/usr/local}" \
-Db_coverage=true \
..
ninja test
echo "################"
echo "# COVERAGE #"
echo "################"
find . -type f -iname '*.o' | xargs gcov -acbrfu {} \; >/dev/null && \
mkdir coverage && pushd coverage && mv ../*.gcov . && \
sed -i -e 's@Source:@Source:../@' *.gcov && \
sed -i -e 's@Graph:@Graph:../@' *.gcov && \
sed -i -e 's@Data:@Data:../@' *.gcov && \
rm pugixml*
# Find HTSlib
find_package(PkgConfig REQUIRED)
pkg_check_modules(HTSlib REQUIRED htslib)
# because CMake is trying to be extra clever,
# it will not properly load libraries with
# absolute paths in *_LIBRARIES
set(HTSlib_LIBRARIES "${HTSlib_LDFLAGS}")
message(STATUS " HTSlib include dirs: ${HTSlib_INCLUDE_DIRS}")
message(STATUS " HTSlib libraries: ${HTSlib_LIBRARIES}")
include(CMakeParseArguments)
function(create_pbbam_tool)
# parse args
set(oneValueArgs TARGET)
set(multiValueArgs SOURCES)
cmake_parse_arguments(create_pbbam_tool "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# create executable
include_directories(
${ToolsCommonDir} # shared tool code
${GeneratedDir} # generated version headers
${PacBioBAM_INCLUDE_DIRS} # pbbam/htslib includes
)
add_executable(${create_pbbam_tool_TARGET} ${create_pbbam_tool_SOURCES})
set_target_properties(
${create_pbbam_tool_TARGET} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PacBioBAM_BinDir}
)
target_link_libraries(${create_pbbam_tool_TARGET} pbbam)
endfunction(create_pbbam_tool)
if(PacBioBAM_use_ccache)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
endif()
include(CheckCXXCompilerFlag)
# C++11 check & enabling
if (CMAKE_VERSION VERSION_LESS "3.1")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # clang
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # gcc
endif()
else() # 3.1+
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
# shared CXX flags for src & tests
if (MSVC)
set(PacBioBAM_CXX_FLAGS "/Wall")
else()
set(PacBioBAM_CXX_FLAGS "-Wall")
endif()
# NOTE: -Wno-unused-local-typedefs used to quash clang warnings w/ Boost
check_cxx_compiler_flag("-Wno-unused-local-typedefs" HAS_NO_UNUSED_LOCAL_TYPEDEFS)
if(HAS_NO_UNUSED_LOCAL_TYPEDEFS)
set(PacBioBAM_CXX_FLAGS "${PacBioBAM_CXX_FLAGS} -Wno-unused-local-typedefs")
endif()
check_cxx_compiler_flag("-Wno-sign-compare" HAS_NO_SIGN_COMPARE)
if(HAS_NO_SIGN_COMPARE)
set(PacBioBAM_CXX_FLAGS "${PacBioBAM_CXX_FLAGS} -Wno-sign-compare")
endif()
# Turn on windows-style filepath resolution.
# We need to add this #define early (not just in the C# SWIG wrapper)
if(WIN32)
add_definitions(-DPBBAM_WIN_FILEPATHS)
endif()
# For now, keep @rpath out of install names on OS X, as it causes SWIG
# tests to fail.
if(APPLE)
set(CMAKE_MACOSX_RPATH OFF)
endif()
# pthreads
find_package(Threads REQUIRED)
# boost
if(NOT Boost_INCLUDE_DIRS)
find_package(Boost REQUIRED)
endif()
# Winsock for htslib on Windows
if(WIN32)
set(SOCKET_LIBRARIES "ws2_32")
endif()
# zlib
if (NOT ZLIB_INCLUDE_DIRS OR NOT ZLIB_LIBRARIES)
find_package(PkgConfig REQUIRED)
pkg_check_modules(ZLIB zlib)
set(ZLIB_LIBRARIES ${ZLIB_LDFLAGS})
else()
set(ZLIB_LDFLAGS ${ZLIB_LIBRARIES})
endif()
# htslib
if(NOT HTSLIB_INCLUDE_DIRS OR NOT HTSLIB_LIBRARIES)
find_package(HTSlib)
set(hts_INCLUDE_DIRS ${HTSlib_INCLUDE_DIRS})
set(hts_LIBRARIES ${HTSlib_LIBRARIES})
else()
set(hts_INCLUDE_DIRS ${HTSLIB_INCLUDE_DIRS})
set(hts_LIBRARIES ${HTSLIB_LIBRARIES})
endif()
# determine if we need a shared lib
if(PacBioBAM_build_shared)
set(BUILD_SHARED_LIBS ON)
set(htslib_build_shared ON CACHE BOOL "force htslibConfig to export proper library name")
set(PB_LIB_MODE SHARED)
set(PB_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(BUILD_SHARED_LIBS OFF)
set(PB_LIB_MODE STATIC)
set(PB_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
endif()
if(WIN32)
# Limit the number of DLLs we will have to bundle
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
pbbam (0.23.0+dfsg-1) UNRELEASED; urgency=medium
* Afif removed himself from Uploaders
* Add myself to Uploaders
* New upstream version
* debhelper-compat 12
* Standards-Version: 4.4.0
* Set upstream metadata fields: Contact, Name.
* Rename library to libpbbam0.23.0 due to upstream choice of ABI version
* Remove code copy of python-cram from upstream source
* Build-Depends: python3-cram
* d/control: Use <!nocheck> instead of comment
-- Andreas Tille <tille@debian.org> Sun, 04 Aug 2019 09:15:35 +0200
pbbam (0.19.0+dfsg-4) unstable; urgency=medium
* Team upload.
......
Source: pbbam
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Andreas Tille <tille@debian.org>
Section: science
Priority: optional
Build-Depends: debhelper (>= 12~),
Build-Depends: debhelper-compat (= 12),
dh-exec,
d-shlibs,
meson,
pkg-config,
python,
# swig3.0,
libboost-dev (>= 1.54),
libboost-dev,
zlib1g-dev,
libssl-dev,
libhts-dev,
# Test-Depends:
libgtest-dev,
python-cram,
samtools
Standards-Version: 4.3.0
libgtest-dev <!nocheck>,
python3-cram <!nocheck>,
samtools <!nocheck>
Standards-Version: 4.4.0
Vcs-Browser: https://salsa.debian.org/med-team/pbbam
Vcs-Git: https://salsa.debian.org/med-team/pbbam.git
Homepage: http://pbbam.readthedocs.org/en/latest/index.html
......@@ -26,7 +25,7 @@ Package: pbbamtools
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
libpbbam0.19.0 (= ${binary:Version})
libpbbam0.23.0 (= ${binary:Version})
Recommends: samtools
Description: processing Pacific Biosciences binary alignment/map files
The BAM format is a binary, compressed, record-oriented container format
......@@ -41,7 +40,7 @@ Description: processing Pacific Biosciences binary alignment/map files
This package provides command-line utilities for working with PacBio BAM
files.
Package: libpbbam0.19.0
Package: libpbbam0.23.0
Architecture: any
Multi-Arch: same
Section: libs
......@@ -64,7 +63,7 @@ Description: Pacific Biosciences binary alignment/map (BAM) library
Package: libpbbam-dev
Architecture: any
Section: libdevel
Depends: libpbbam0.19.0 (= ${binary:Version}),
Depends: libpbbam0.23.0 (= ${binary:Version}),
libhts-dev,
libssl-dev,
${misc:Depends}
......
......@@ -4,6 +4,7 @@ Upstream-Contact: Pacific Biosciences <devnet@pacificbiosciences.com>
Source: https://github.com/PacificBiosciences/pbbam
Files-Excluded: third-party
*/clang-format*
*/tests/scripts/cram*
Files: *
Copyright: 2014-2016 Pacific Biosciences of California, Inc. <devnet@pacificbiosciences.com>
......
Author: Andreas Tille <tille@debian.org>
Last-Update: Sun, 04 Aug 2019 09:15:35 +0200
Description: Use Python3 in build time test suite
--- a/meson.build
+++ b/meson.build
@@ -80,7 +80,7 @@ subdir('src')
if not meson.is_subproject()
if get_option('build-tools') or get_option('tests')
- pbbam_python = find_program('python')
+ pbbam_python = find_program('python3')
if get_option('tests')
pbbam_clang_formatter = find_program('tools/check-formatting')
--- a/tests/scripts/generate_data.py
+++ b/tests/scripts/generate_data.py
@@ -1,7 +1,4 @@
-#!/usr/bin/env python
-
-from __future__ import print_function
-from __future__ import unicode_literals
+#!/usr/bin/python3
import os, shutil, sys
from io import StringIO
@@ -177,9 +174,9 @@ class TestDataGenerator:
# else silent success
if self.outputFiles or self.outputSymlinks:
print('Generating test data in %s ' % self.generatedDataDir)
- for file, func in self.outputFiles.items():
+ for file, func in list(self.outputFiles.items()):
func(file)
- for link, func in self.outputSymlinks.items():
+ for link, func in list(self.outputSymlinks.items()):
func(link)
# script entry point
fix_gtest_depcheck.patch
# debug_tests.patch
use_debian_packaged_python3-cram.patch
python3.patch
Author: Andreas Tille <tille@debian.org>
Last-Update: Sun, 04 Aug 2019 09:15:35 +0200
Description: Use python3-cram instead of cram code copy
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,6 +1,6 @@
subdir('src')
-pbbam_cram_script = find_program('cram', required : false)
+pbbam_cram_script = find_program('cram3', required : false)
if not pbbam_cram_script.found()
warning('Using bundled cram script')
pbbam_cram_script = find_program('scripts/cram.py', required : true)