Skip to content
Commits on Source (11)
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.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
# 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.*
/build*
.vscode
# MinGW generated files
*.Debug
*.Release
# Python byte code
# cram
*.pyc
# Binaries
# --------
*.dll
*.exe
# Generated directories
bin
build
lib
# Meson WrapDB stuff
subprojects/packagecache/
subprojects/googletest*
# generated Doxyfile
*Doxyfile
/subprojects/*
!/subprojects/*.wrap
......@@ -3,13 +3,85 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
**NOTE:** The current series (0.y.z) is under initial development. Anything may
change at any time. The public API should not be considered stable yet. Once we
lock down a version 1.0.0, this will define a reference point & compatibility
guarantees will be maintained within each major version series.
## Active
### Added
- CCSRecord API to work with the minimally required data for CCS
- TextFileReader & TextFileWriter for generic line files (plain text or gzipped)
- BedReader & BedWriter for BED format support
## [1.0.6] - 2019-06-14
### Added
- IFastaWriter & IFastqWriter abstract base classes
## [1.0.5] - 2019-06-11
### Changed
- BAM tag lookup improvements under the hood.
## [1.0.4] - 2019-06-07
### Added
- General-purpose BgzipWriter
- BgzipFastaWriter and BgzipFastqWriter
- Read-only view to read indices passing a PbiFilter
- IPD field to SimpleRead
## [1.0.3] - 2019-05-20
### Added
- IndexedFastqReader for random access to FASTQ subregions
### Fixed
- MappedSimpleRead clipping: on disjoint aligned/requested regions and on requests larger
than available sequence.
## [1.0.2] - 2019-05-10
### Added
- Range-for iteration on FastaReader & FastqReader
## [1.0.1] - 2019-05-09
### Added
- SimpleRead & MappedSimpleRead for htslib-free processing.
### Fixed
- Incorrect type displayed in SAM output (pure-text) for floating-point values.
## [1.0.0] - 2019-04-22
### Changed
- C++14 is now a *hard* minimum.
### Removed
- Headers emulating C++14 features for C++11.
### Fixed
- Inconsistent whitelist/blacklist filters in DataSet XML.
## [0.25.0] - 2019-04-11
### Changed
- Requires C++14 at minimum.
### Fixed
- Reading BioSample(s) elements from DataSet XML.
## [0.24.0] - 2019-04-05
### Added
- Built-in support for dataset elements: BioSample(s) & DNABarcode(s).
- BaiIndexCache for reusing data from *.bai files(s).
- Support in GenomicIntervalQuery for new BaiIndexCache.
## [0.23.1] - 2019-03-21
### Added
- Streamable BamReader (via stdin).
- Enabled range-for on BamReader, compatible with the other *Query inputs.
## [0.23.0] - 2019-03-11
### Added
......
......@@ -45,7 +45,7 @@ unset BOOST_LIBRARYDIR
# in order to make shared libraries consumable
# by conda and other package managers
export LDFLAGS="-static-libstdc++ -static-libgcc"
export LDFLAGS=${LDFLAGS:-"-fuse-ld=gold -static-libstdc++ -static-libgcc"}
source scripts/ci/setup.sh
source scripts/ci/build.sh
......
pbbam (1.0.6+dfsg-1) UNRELEASED; urgency=medium
* Drop <!nocheck> option from python3-cram
Closes: #934467
* New upstream version
* Standards-Version: 4.4.1
* Remove patch debug_tests.patch that is missing from
debian/patches/series.
* debian/copyright: use spaces rather than tabs to start continuation
lines.
* Remove obsolete fields Contact, Name from debian/upstream/metadata.
* Build-Depends: cmake, libpbcopper-dev (>= 1.3.0)
TODO: ... -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libpbbam.so.1.0.6 -g -O2 -fdebug-prefix-map=/build/pbbam-1.0.6+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now -pthread /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libhts.so -lpbcopper -Wl,--end-group
FAILED: src/libpbbam.so.1.0.6
c++ -o src/libpbbam.so.1.0.6 'src/25a6634@@pbbam@sha/AlignmentPrinter.cpp.o' 'src/25a6634@@pbbam@sha/BaiIndexCache.cpp.o' 'src/25a6634@@pbbam@sha/BaiIndexedBamReader.cpp.o' 'src/25a6634@@pbbam@sha/BamFile.cpp.o' 'src/25a6634@@pbbam@sha/BamFileMerger.cpp.o' 'src/25a6634@@pbbam@sha/BamHeader.cpp.o' 'src/25a6634@@pbbam@sha/BamReader.cpp.o' 'src/25a6634@@pbbam@sha/BamRecord.cpp.o' 'src/25a6634@@pbbam@sha/BamRecordBuilder.cpp.o' 'src/25a6634@@pbbam@sha/BamRecordImpl.cpp.o' 'src/25a6634@@pbbam@sha/BamRecordTags.cpp.o' 'src/25a6634@@pbbam@sha/BamRecordView.cpp.o' 'src/25a6634@@pbbam@sha/BamTagCodec.cpp.o' 'src/25a6634@@pbbam@sha/BamWriter.cpp.o' 'src/25a6634@@pbbam@sha/BarcodeQuery.cpp.o' 'src/25a6634@@pbbam@sha/BgzipFastaWriter.cpp.o' 'src/25a6634@@pbbam@sha/BgzipFastqWriter.cpp.o' 'src/25a6634@@pbbam@sha/BgzipWriter.cpp.o' 'src/25a6634@@pbbam@sha/ChemistryTable.cpp.o' 'src/25a6634@@pbbam@sha/Compare.cpp.o' 'src/25a6634@@pbbam@sha/CompositeFastaReader.cpp.o' 'src/25a6634@@pbbam@sha/Config.cpp.o' 'src/25a6634@@pbbam@sha/DataSet.cpp.o' 'src/25a6634@@pbbam@sha/DataSetBaseTypes.cpp.o' 'src/25a6634@@pbbam@sha/DataSetElement.cpp.o' 'src/25a6634@@pbbam@sha/DataSetIO.cpp.o' 'src/25a6634@@pbbam@sha/DataSetTypes.cpp.o' 'src/25a6634@@pbbam@sha/DataSetXsd.cpp.o' 'src/25a6634@@pbbam@sha/EntireFileQuery.cpp.o' 'src/25a6634@@pbbam@sha/FaiIndex.cpp.o' 'src/25a6634@@pbbam@sha/FaiZmwChunker.cpp.o' 'src/25a6634@@pbbam@sha/FastaCache.cpp.o' 'src/25a6634@@pbbam@sha/FastaReader.cpp.o' 'src/25a6634@@pbbam@sha/FastaSequence.cpp.o' 'src/25a6634@@pbbam@sha/FastaSequenceQuery.cpp.o' 'src/25a6634@@pbbam@sha/FastaWriter.cpp.o' 'src/25a6634@@pbbam@sha/FastqReader.cpp.o' 'src/25a6634@@pbbam@sha/FastqSequence.cpp.o' 'src/25a6634@@pbbam@sha/FastqWriter.cpp.o' 'src/25a6634@@pbbam@sha/FileProducer.cpp.o' 'src/25a6634@@pbbam@sha/FileUtils.cpp.o' 'src/25a6634@@pbbam@sha/FofnReader.cpp.o' 'src/25a6634@@pbbam@sha/FormatUtils.cpp.o' 'src/25a6634@@pbbam@sha/GenomicIntervalQuery.cpp.o' 'src/25a6634@@pbbam@sha/IFastaWriter.cpp.o' 'src/25a6634@@pbbam@sha/IFastqWriter.cpp.o' 'src/25a6634@@pbbam@sha/IndexedBamWriter.cpp.o' 'src/25a6634@@pbbam@sha/IndexedFastaReader.cpp.o' 'src/25a6634@@pbbam@sha/IndexedFastqBgzfReader.cpp.o' 'src/25a6634@@pbbam@sha/IndexedFastqReader.cpp.o' 'src/25a6634@@pbbam@sha/IndexedFastqTextReader.cpp.o' 'src/25a6634@@pbbam@sha/IndexedFastqReaderImpl.cpp.o' 'src/25a6634@@pbbam@sha/IRecordWriter.cpp.o' 'src/25a6634@@pbbam@sha/KSeqReader.cpp.o' 'src/25a6634@@pbbam@sha/MD5.cpp.o' 'src/25a6634@@pbbam@sha/MemoryUtils.cpp.o' 'src/25a6634@@pbbam@sha/PbiBuilder.cpp.o' 'src/25a6634@@pbbam@sha/PbiFile.cpp.o' 'src/25a6634@@pbbam@sha/PbiFilter.cpp.o' 'src/25a6634@@pbbam@sha/PbiFilterQuery.cpp.o' 'src/25a6634@@pbbam@sha/PbiFilterTypes.cpp.o' 'src/25a6634@@pbbam@sha/PbiIndexedBamReader.cpp.o' 'src/25a6634@@pbbam@sha/PbiIndexIO.cpp.o' 'src/25a6634@@pbbam@sha/PbiRawData.cpp.o' 'src/25a6634@@pbbam@sha/ProgramInfo.cpp.o' 'src/25a6634@@pbbam@sha/QNameQuery.cpp.o' 'src/25a6634@@pbbam@sha/ReadAccuracyQuery.cpp.o' 'src/25a6634@@pbbam@sha/ReadGroupInfo.cpp.o' 'src/25a6634@@pbbam@sha/RecordType.cpp.o' 'src/25a6634@@pbbam@sha/SamTagCodec.cpp.o' 'src/25a6634@@pbbam@sha/SamWriter.cpp.o' 'src/25a6634@@pbbam@sha/SequenceInfo.cpp.o' 'src/25a6634@@pbbam@sha/StringUtilities.cpp.o' 'src/25a6634@@pbbam@sha/SubreadLengthQuery.cpp.o' 'src/25a6634@@pbbam@sha/Tag.cpp.o' 'src/25a6634@@pbbam@sha/TagCollection.cpp.o' 'src/25a6634@@pbbam@sha/TextFileReader.cpp.o' 'src/25a6634@@pbbam@sha/TextFileWriter.cpp.o' 'src/25a6634@@pbbam@sha/Validator.cpp.o' 'src/25a6634@@pbbam@sha/ValidationErrors.cpp.o' 'src/25a6634@@pbbam@sha/ValidationException.cpp.o' 'src/25a6634@@pbbam@sha/Version.cpp.o' 'src/25a6634@@pbbam@sha/VirtualZmwBamRecord.cpp.o' 'src/25a6634@@pbbam@sha/VirtualZmwCompositeReader.cpp.o' 'src/25a6634@@pbbam@sha/VirtualZmwReader.cpp.o' 'src/25a6634@@pbbam@sha/VirtualRegion.cpp.o' 'src/25a6634@@pbbam@sha/VirtualRegionTypeMap.cpp.o' 'src/25a6634@@pbbam@sha/XmlReader.cpp.o' 'src/25a6634@@pbbam@sha/XmlWriter.cpp.o' 'src/25a6634@@pbbam@sha/WhitelistedZmwReadStitcher.cpp.o' 'src/25a6634@@pbbam@sha/ZmwChunkedFastaReader.cpp.o' 'src/25a6634@@pbbam@sha/ZmwChunkedFastqReader.cpp.o' 'src/25a6634@@pbbam@sha/ZmwChunkedFastxBgzfReader.cpp.o' 'src/25a6634@@pbbam@sha/ZmwChunkedFastxReaderImpl.cpp.o' 'src/25a6634@@pbbam@sha/ZmwChunkedFastxTextReader.cpp.o' 'src/25a6634@@pbbam@sha/ZmwGroupQuery.cpp.o' 'src/25a6634@@pbbam@sha/ZmwReadStitcher.cpp.o' 'src/25a6634@@pbbam@sha/ZmwQuery.cpp.o' 'src/25a6634@@pbbam@sha/ZmwTypeMap.cpp.o' 'src/25a6634@@pbbam@sha/bed_BedReader.cpp.o' 'src/25a6634@@pbbam@sha/bed_BedWriter.cpp.o' 'src/25a6634@@pbbam@sha/ccs_CCSPbiBuilder.cpp.o' 'src/25a6634@@pbbam@sha/ccs_CCSRecordFormat.cpp.o' 'src/25a6634@@pbbam@sha/ccs_CCSRecordReader.cpp.o' 'src/25a6634@@pbbam@sha/ccs_CCSRecordWriter.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfFile.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfFormat.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfHeader.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfHeaderTypes.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfQuery.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfReader.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfSort.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfVariant.cpp.o' 'src/25a6634@@pbbam@sha/vcf_VcfWriter.cpp.o' 'src/25a6634@@pbbam@sha/pugixml_pugixml.cpp.o' -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libpbbam.so.1.0.6 -g -O2 -fdebug-prefix-map=/build/pbbam-1.0.6+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now -pthread /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libhts.so -lpbcopper -Wl,--end-group
/usr/bin/ld: cannot find -lpbcopper
collect2: error: ld returned 1 exit status
-- Andreas Tille <tille@debian.org> Fri, 13 Dec 2019 21:50:03 +0100
pbbam (0.23.0+dfsg-1) unstable; urgency=medium
* Afif removed himself from Uploaders
......
......@@ -8,15 +8,17 @@ Build-Depends: debhelper-compat (= 12),
d-shlibs,
meson,
pkg-config,
cmake,
# swig3.0,
libboost-dev,
zlib1g-dev,
libssl-dev,
libhts-dev,
libpbcopper-dev (>= 1.3.0),
python3-cram,
libgtest-dev <!nocheck>,
python3-cram <!nocheck>,
samtools <!nocheck>
Standards-Version: 4.4.0
Standards-Version: 4.4.1
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
......
Description: Only debug code to track down bug #909071 i386 (no solution yet)
Bug-Debian: https://bugs.debian.org/909071
Author: Andreas Tille <tille@debian.org>
Last-Update: Tue, 18 Sep 2018 08:40:19 +0200
--- a/tests/src/cram/pbmerge_pacbio_ordering.t.in
+++ b/tests/src/cram/pbmerge_pacbio_ordering.t.in
@@ -13,6 +13,8 @@ Setup:
Sanity Check:
+ $ ls -l $HQREGION_BAM
+ $ echo "DEBUG: $BAM2SAM --header-only $HQREGION_BAM"
$ $BAM2SAM --header-only $HQREGION_BAM
@HD\tVN:1.1\tSO:unknown\tpb:3.0.1 (esc)
@RG\tID:ca75d884\tPL:PACBIO\tDS:READTYPE=HQREGION;DeletionQV=dq;DeletionTag=dt;InsertionQV=iq;MergeQV=mq;SubstitutionQV=sq;SubstitutionTag=st;Ipd:Frames=ip;PulseWidth:Frames=pw;PkMid=pm;PkMean=pa;LabelQV=pq;AltLabel=pt;AltLabelQV=pv;PulseMergeQV=pg;PulseCall=pc;PrePulseFrames=pd;PulseCallWidth=px;BINDINGKIT=100372700;SEQUENCINGKIT=100356200;BASECALLERVERSION=0.1;FRAMERATEHZ=100.000000\tPU:ArminsFakeMovie (esc)
@@ -20,9 +22,11 @@ Sanity Check:
@PG\tID:bazFormat-0.3.0\tPN:bazFormat\tVN:0.3.0 (esc)
@PG\tID:bazwriter-0.15.0\tPN:bazwriter\tVN:0.15.0 (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $HQREGION_BAM | cut -f 1"
$ $BAM2SAM --no-header $HQREGION_BAM | cut -f 1
ArminsFakeMovie/100000/2659_7034
+ $ $echo "DEBUG: BAM2SAM --header-only $SCRAPS_BAM"
$ $BAM2SAM --header-only $SCRAPS_BAM
@HD\tVN:1.1\tSO:unknown\tpb:3.0.1 (esc)
@RG\tID:e83fc9c6\tPL:PACBIO\tDS:READTYPE=SCRAP;DeletionQV=dq;DeletionTag=dt;InsertionQV=iq;MergeQV=mq;SubstitutionQV=sq;SubstitutionTag=st;Ipd:Frames=ip;PulseWidth:Frames=pw;PkMid=pm;PkMean=pa;LabelQV=pq;AltLabel=pt;AltLabelQV=pv;PulseMergeQV=pg;PulseCall=pc;PrePulseFrames=pd;PulseCallWidth=px;BINDINGKIT=100372700;SEQUENCINGKIT=100356200;BASECALLERVERSION=0.1;FRAMERATEHZ=100.000000\tPU:ArminsFakeMovie (esc)
@@ -30,6 +34,7 @@ Sanity Check:
@PG\tID:bazFormat-0.3.0\tPN:bazFormat\tVN:0.3.0 (esc)
@PG\tID:bazwriter-0.15.0\tPN:bazwriter\tVN:0.15.0 (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $SCRAPS_BAM | cut -f 1"
$ $BAM2SAM --no-header $SCRAPS_BAM | cut -f 1
ArminsFakeMovie/100000/0_2659
ArminsFakeMovie/100000/3025_3047
--- a/tests/src/cram/pbmerge_aligned_ordering.t.in
+++ b/tests/src/cram/pbmerge_aligned_ordering.t.in
@@ -51,7 +51,10 @@ Sanity Check:
Normal Merge:
+ $ echo "DEBUG: $PBMERGE $INPUT_1 $INPUT_2 > $MERGED_BAM"
$ $PBMERGE $INPUT_1 $INPUT_2 > $MERGED_BAM
+ $ if [ ! -f $MERGED_BAM ] ; then echo "FIX 1: File $MERGED_BAM does not exists - no idea why. Try again creating it after 5s."; $PBMERGE $INPUT_1 $INPUT_2 > $MERGED_BAM ; fi
+ $ if [ ! -f $MERGED_BAM ] ; then echo "FIX 1: File $MERGED_BAM does not exists - even after trying again."; exit ; else echo echo "File $MERGED_BAM was created now" ; fi
$ $BAM2SAM --header-only $MERGED_BAM
@HD\tVN:1.3.1\tSO:coordinate\tpb:3.0.1 (esc)
@@ -60,6 +63,7 @@ Normal Merge:
@PG\tID:BLASR\tVN:1.3.1.141565\tCL:/home/UNIXHOME/yli/for_the_people/blasr_bam_out/blasr m140905_042212_sidney_c100564852550000001823085912221377_s1_X0.1.bax.h5 lambdaNEB.fa -out tmp.bam -bam -bestn 10 -minMatch 12 -nproc 8 -minSubreadLength 50 -minReadLength 50 -randomSeed 1 -clipping subread (esc)
@PG\tID:pbmerge-@PacBioBAM_VERSION@\tPN:pbmerge\tVN:@PacBioBAM_VERSION@ (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20"
$ $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/49050/48_1132\tlambda_NEB3011\t1 (esc)
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/32328/387_1134\tlambda_NEB3011\t303 (esc)
@@ -86,8 +90,15 @@ Normal Merge:
Shuffle Input:
+ $ echo DEBUG: PATH = $PATH
+ $ which pbmerge
+ $ echo "DEBUG: $PBMERGE $INPUT_2 $INPUT_2 > $MERGED_BAM"
$ $PBMERGE $INPUT_2 $INPUT_2 > $MERGED_BAM
+ $ if [ ! -f $MERGED_BAM ] ; then echo "FIX 2: File $MERGED_BAM does not exists - no idea why. Try again creating it after 5s."; $PBMERGE $INPUT_1 $INPUT_2 > $MERGED_BAM ; fi
+ $ if [ ! -f $MERGED_BAM ] ; then echo "FIX 2: File $MERGED_BAM does not exists - even after trying again."; exit ; else echo echo "File $MERGED_BAM was created now" ; fi
+ $ echo "DEBUG: $BAM2SAM --header-only $MERGED_BAM"
+ $ echo "DEBUG: That is the problematic command"
$ $BAM2SAM --header-only $MERGED_BAM
@HD\tVN:1.3.1\tSO:coordinate\tpb:3.0.1 (esc)
@SQ\tSN:lambda_NEB3011\tLN:48502\tM5:a1319ff90e994c8190a4fe6569d0822a (esc)
@@ -95,6 +106,7 @@ Shuffle Input:
@PG\tID:BLASR\tVN:1.3.1.141565\tCL:/home/UNIXHOME/yli/for_the_people/blasr_bam_out/blasr m140905_042212_sidney_c100564852550000001823085912221377_s1_X0.1.bax.h5 lambdaNEB.fa -out tmp.bam -bam -bestn 10 -minMatch 12 -nproc 8 -minSubreadLength 50 -minReadLength 50 -randomSeed 1 -clipping subread (esc)
@PG\tID:pbmerge-@PacBioBAM_VERSION@\tPN:pbmerge\tVN:@PacBioBAM_VERSION@ (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20"
$ $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/32328/387_1134\tlambda_NEB3011\t303 (esc)
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/6469/9936_10187\tlambda_NEB3011\t2171 (esc)
@@ -130,6 +142,7 @@ Explicit Output Filename (also enables P
@PG\tID:BLASR\tVN:1.3.1.141565\tCL:/home/UNIXHOME/yli/for_the_people/blasr_bam_out/blasr m140905_042212_sidney_c100564852550000001823085912221377_s1_X0.1.bax.h5 lambdaNEB.fa -out tmp.bam -bam -bestn 10 -minMatch 12 -nproc 8 -minSubreadLength 50 -minReadLength 50 -randomSeed 1 -clipping subread (esc)
@PG\tID:pbmerge-@PacBioBAM_VERSION@\tPN:pbmerge\tVN:@PacBioBAM_VERSION@ (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20"
$ $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/49050/48_1132\tlambda_NEB3011\t1 (esc)
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/32328/387_1134\tlambda_NEB3011\t303 (esc)
@@ -169,6 +182,7 @@ Explicit Output Filename (with disabled
@PG\tID:BLASR\tVN:1.3.1.141565\tCL:/home/UNIXHOME/yli/for_the_people/blasr_bam_out/blasr m140905_042212_sidney_c100564852550000001823085912221377_s1_X0.1.bax.h5 lambdaNEB.fa -out tmp.bam -bam -bestn 10 -minMatch 12 -nproc 8 -minSubreadLength 50 -minReadLength 50 -randomSeed 1 -clipping subread (esc)
@PG\tID:pbmerge-@PacBioBAM_VERSION@\tPN:pbmerge\tVN:@PacBioBAM_VERSION@ (esc)
+ $ echo "DEBUG: $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20"
$ $BAM2SAM --no-header $MERGED_BAM | cut -f 1,3,4 | head -n 20
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/49050/48_1132\tlambda_NEB3011\t1 (esc)
m140905_042212_sidney_c100564852550000001823085912221377_s1_X0/32328/387_1134\tlambda_NEB3011\t303 (esc)
Name: pbbam
Contact: Pacific Biosciences <devnet@pacificbiosciences.com>
......@@ -103,9 +103,9 @@ author = u'Derek Barnett'
# built documents.
#
# The short X.Y version.
version = '0.23.0'
version = '1.0.6'
# The full version, including alpha/beta/rc tags.
release = '0.23.0'
release = '1.0.6'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
......@@ -7,6 +7,7 @@ if not meson.is_subproject()
files([
'pbbam/Accuracy.h',
'pbbam/AlignmentPrinter.h',
'pbbam/BaiIndexCache.h',
'pbbam/BaiIndexedBamReader.h',
'pbbam/BamFile.h',
'pbbam/BamFileMerger.h',
......@@ -20,6 +21,9 @@ if not meson.is_subproject()
'pbbam/BamTagCodec.h',
'pbbam/BamWriter.h',
'pbbam/BarcodeQuery.h',
'pbbam/BgzipFastaWriter.h',
'pbbam/BgzipFastqWriter.h',
'pbbam/BgzipWriter.h',
'pbbam/Cigar.h',
'pbbam/CigarOperation.h',
'pbbam/ClipType.h',
......@@ -31,6 +35,7 @@ if not meson.is_subproject()
'pbbam/DataSetTypes.h',
'pbbam/DataSetXsd.h',
'pbbam/EntireFileQuery.h',
'pbbam/FaiIndex.h',
'pbbam/FastaCache.h',
'pbbam/FastaReader.h',
'pbbam/FastaSequence.h',
......@@ -39,16 +44,19 @@ if not meson.is_subproject()
'pbbam/FastqReader.h',
'pbbam/FastqSequence.h',
'pbbam/FastqWriter.h',
'pbbam/FormatUtils.h',
'pbbam/FrameEncodingType.h',
'pbbam/Frames.h',
'pbbam/GenomicInterval.h',
'pbbam/GenomicIntervalQuery.h',
'pbbam/IFastaWriter.h',
'pbbam/IFastqWriter.h',
'pbbam/IndexedBamWriter.h',
'pbbam/IndexedFastaReader.h',
'pbbam/IndexedFastqReader.h',
'pbbam/Interval.h',
'pbbam/IRecordWriter.h',
'pbbam/LocalContextFlags.h',
'pbbam/MakeUnique.h',
'pbbam/MD5.h',
'pbbam/MoveAppend.h',
'pbbam/Orientation.h',
......@@ -73,11 +81,14 @@ if not meson.is_subproject()
'pbbam/SamTagCodec.h',
'pbbam/SamWriter.h',
'pbbam/SequenceInfo.h',
'pbbam/SNR.h',
'pbbam/Strand.h',
'pbbam/StringUtilities.h',
'pbbam/SubreadLengthQuery.h',
'pbbam/Tag.h',
'pbbam/TagCollection.h',
'pbbam/TextFileReader.h',
'pbbam/TextFileWriter.h',
'pbbam/Unused.h',
'pbbam/Validator.h',
'pbbam/ZmwGroupQuery.h',
......@@ -86,6 +97,22 @@ if not meson.is_subproject()
'pbbam/ZmwTypeMap.h']),
subdir : 'pbbam')
install_headers(
files([
'pbbam/bed/BedReader.h',
'pbbam/bed/BedWriter.h']),
subdir : 'pbbam/bed')
install_headers(
files([
'pbbam/ccs/CCSHeader.h',
'pbbam/ccs/CCSPbiBuilder.h',
'pbbam/ccs/CCSRecord.h',
'pbbam/ccs/CCSRecordFormat.h',
'pbbam/ccs/CCSRecordReader.h',
'pbbam/ccs/CCSRecordWriter.h']),
subdir : 'pbbam/ccs')
install_headers(
files([
'pbbam/exception/BundleChemistryMappingException.h',
......@@ -100,7 +127,6 @@ if not meson.is_subproject()
'pbbam/internal/DataSetBaseTypes.h',
'pbbam/internal/DataSetElement.h',
'pbbam/internal/DataSetElement.inl',
'pbbam/internal/Interval.inl',
'pbbam/internal/PbiBasicTypes.inl',
'pbbam/internal/PbiFilter.inl',
'pbbam/internal/PbiFilterTypes.inl',
......
......@@ -9,46 +9,12 @@
#include "pbbam/Config.h"
#include <pbcopper/data/Accuracy.h>
namespace PacBio {
namespace BAM {
/// \brief The Accuracy class represents the expected accuracy of a BamRecord.
///
/// Values are clamped to fall within [0,1].
///
class PBBAM_EXPORT Accuracy
{
public:
static const float MIN; ///< Minimum valid accuracy value [0.0]
static const float MAX; ///< Maximum valid accuracy value [1.0]
public:
/// \name Constructors & Related Methods
/// \{
/// Constructs an Accuracy object from a floating-point number.
///
/// \note This is not an \b explicit ctor, to make it as easy as
/// possible to use in numeric operations. We really just want
/// to make sure that the acceptable range is respected.
///
Accuracy(float accuracy);
Accuracy(const Accuracy&);
Accuracy(Accuracy&&);
Accuracy& operator=(const Accuracy&);
Accuracy& operator=(Accuracy&&);
~Accuracy();
/// \}
public:
/// \returns Accuracy as float primitive
operator float() const;
private:
float accuracy_;
};
using Accuracy PBBAM_DEPRECATED = Data::Accuracy;
} // namespace BAM
} // namespace PacBio
......
......@@ -7,6 +7,8 @@
#ifndef ALIGNMENTPRINTER_H
#define ALIGNMENTPRINTER_H
#include "pbbam/Config.h"
#include <memory>
#include <string>
......@@ -39,13 +41,6 @@ public:
///
AlignmentPrinter(const IndexedFastaReader& ifr);
AlignmentPrinter() = delete;
AlignmentPrinter(const AlignmentPrinter&) = delete;
AlignmentPrinter(AlignmentPrinter&&);
AlignmentPrinter& operator=(const AlignmentPrinter&) = delete;
AlignmentPrinter& operator=(AlignmentPrinter&&);
~AlignmentPrinter();
/// \}
public:
......
// File Description
/// \file BaiIndexCache.h
/// \brief Defines the BaiIndexCache class.
//
// Author: Derek Barnett
#ifndef BAIINDEXCACHE_H
#define BAIINDEXCACHE_H
#include "pbbam/Config.h"
#include <memory>
#include <string>
#include <vector>
#include <htslib/hts.h>
#include "pbbam/Position.h"
namespace PacBio {
namespace BAM {
class BamFile;
class DataSet;
///
/// \brief Caches contents of *.bai file for re-use by multiple readers.
///
class BaiIndexCacheData
{
public:
explicit BaiIndexCacheData(const BamFile& bamFile);
explicit BaiIndexCacheData(const std::string& bamFilename);
~BaiIndexCacheData();
/// \note This is very much an internal method and should not be considered
/// public API. Exposed here only because of implementation details
/// (definition of htslib-related custom deleters) and may be removed.
///
/// \note Does not own the returned pointer; caller is responsible.
///
hts_itr_t* IteratorForInterval(const int32_t refId, const Position start,
const Position stop) const;
private:
struct BaiIndexCacheDataPrivate;
std::unique_ptr<BaiIndexCacheDataPrivate> d_;
};
using BaiIndexCache = std::shared_ptr<std::vector<std::shared_ptr<BaiIndexCacheData>>>;
BaiIndexCache MakeBaiIndexCache(const DataSet& dataset);
BaiIndexCache MakeBaiIndexCache(const std::vector<BamFile>& bamFiles);
BaiIndexCache MakeBaiIndexCache(const BamFile& bamFile);
} // namespace BAM
} // namespace PacBio
#endif // BAIINDEXCACHE_H
......@@ -7,6 +7,13 @@
#ifndef BAIINDEXEDBAMREADER_H
#define BAIINDEXEDBAMREADER_H
#include "pbbam/Config.h"
#include <memory>
#include <htslib/sam.h>
#include "pbbam/BaiIndexCache.h"
#include "pbbam/BamFile.h"
#include "pbbam/BamReader.h"
#include "pbbam/GenomicInterval.h"
......@@ -33,6 +40,7 @@ public:
/// for reading, or if the interval is invalid
///
explicit BaiIndexedBamReader(std::string filename);
BaiIndexedBamReader(std::string filename, const std::shared_ptr<BaiIndexCacheData>& index);
/// \brief Constructs %BAM reader, that can be queried on genomic interval.
///
......@@ -42,6 +50,7 @@ public:
/// for reading, or if the interval is invalid
///
explicit BaiIndexedBamReader(BamFile bamFile);
BaiIndexedBamReader(BamFile bamFile, const std::shared_ptr<BaiIndexCacheData>& index);
/// \brief Constructs %BAM reader, bounded by a genomic interval.
///
......@@ -54,6 +63,8 @@ public:
/// for reading, or if the interval is invalid
///
BaiIndexedBamReader(const GenomicInterval& interval, std::string filename);
BaiIndexedBamReader(const GenomicInterval& interval, std::string filename,
const std::shared_ptr<BaiIndexCacheData>& index);
/// \brief Constructs %BAM reader, bounded by a genomic interval.
///
......@@ -66,6 +77,8 @@ public:
/// for reading, or if the interval is invalid
///
BaiIndexedBamReader(const GenomicInterval& interval, BamFile bamFile);
BaiIndexedBamReader(const GenomicInterval& interval, BamFile bamFile,
const std::shared_ptr<BaiIndexCacheData>& index);
/// \}
......@@ -73,6 +86,9 @@ public:
/// \name Random-Access
/// \{
/// \returns the underlying BamFile
const BamFile& File() const;
/// \returns the current GenomicInterval in use by this reader
const GenomicInterval& Interval() const;
......
......@@ -7,11 +7,12 @@
#ifndef BAMFILE_H
#define BAMFILE_H
#include "pbbam/Config.h"
#include <cstdint>
#include <string>
#include "pbbam/BamHeader.h"
#include "pbbam/Config.h"
namespace PacBio {
namespace BAM {
......@@ -36,9 +37,9 @@ public:
BamFile(std::string filename);
BamFile(const BamFile& other);
BamFile(BamFile&& other);
BamFile(BamFile&& other) noexcept;
BamFile& operator=(const BamFile& other);
BamFile& operator=(BamFile&& other);
BamFile& operator=(BamFile&& other) noexcept;
~BamFile();
/// \}
......
......@@ -3,10 +3,13 @@
#ifndef BAMFILEMERGER_H
#define BAMFILEMERGER_H
#include <pbbam/ProgramInfo.h>
#include "pbbam/Config.h"
#include <string>
#include <vector>
#include <pbbam/ProgramInfo.h>
namespace PacBio {
namespace BAM {
......
......@@ -7,6 +7,8 @@
#ifndef BAMHEADER_H
#define BAMHEADER_H
#include "pbbam/Config.h"
#include <cstddef>
#include <cstdint>
#include <memory>
......@@ -14,7 +16,6 @@
#include <string>
#include <vector>
#include "pbbam/Config.h"
#include "pbbam/ProgramInfo.h"
#include "pbbam/ReadGroupInfo.h"
#include "pbbam/SequenceInfo.h"
......@@ -53,11 +54,6 @@ public:
BamHeader(const std::string& samHeaderText);
BamHeader();
BamHeader(const BamHeader&);
BamHeader(BamHeader&&);
BamHeader& operator=(const BamHeader&);
BamHeader& operator=(BamHeader&&);
~BamHeader();
/// \brief Detaches underlying data from the shared-pointer, returning a
/// independent copy of the header contents.
......
......@@ -7,6 +7,8 @@
#ifndef BAMREADER_H
#define BAMREADER_H
#include "pbbam/Config.h"
#include <cstdint>
#include <memory>
#include <string>
......@@ -16,8 +18,8 @@
#include "pbbam/BamFile.h"
#include "pbbam/BamHeader.h"
#include "pbbam/BamRecord.h"
#include "pbbam/Config.h"
#include "pbbam/GenomicInterval.h"
#include "pbbam/internal/QueryBase.h"
namespace PacBio {
namespace BAM {
......@@ -28,12 +30,15 @@ namespace BAM {
/// records. Derived classes may implement other access schemes (e.g. genomic
/// region, PBI-enabled record filtering).
///
class PBBAM_EXPORT BamReader
class PBBAM_EXPORT BamReader : public internal::IQuery
{
public:
/// \name Constructors & Related Methods
/// \{
/// \brief Opens BAM for streaming from stdin
BamReader();
/// \brief Opens BAM file for reading.
///
/// \param[in] fn %BAM filename
......@@ -56,9 +61,6 @@ public:
/// \name BAM File Attributes
/// \{
/// \returns the underlying BamFile
const BamFile& File() const;
/// \returns %BAM filename
const std::string& Filename() const;
......
......@@ -7,6 +7,8 @@
#ifndef BAMRECORD_H
#define BAMRECORD_H
#include "pbbam/Config.h"
#include <cstddef>
#include <cstdint>
#include <memory>
......@@ -14,6 +16,9 @@
#include <utility>
#include <vector>
#include <pbcopper/data/MappedRead.h>
#include <pbcopper/data/Read.h>
#include "pbbam/Accuracy.h"
#include "pbbam/BamHeader.h"
#include "pbbam/BamRecordImpl.h"
......@@ -61,9 +66,9 @@ public:
BamRecord(BamHeader header);
BamRecord(BamRecordImpl impl);
BamRecord(const BamRecord& other);
BamRecord(BamRecord&& other);
BamRecord(BamRecord&& other) noexcept;
BamRecord& operator=(const BamRecord& other);
BamRecord& operator=(BamRecord&& other);
BamRecord& operator=(BamRecord&& other) noexcept;
virtual ~BamRecord();
/// \}
......@@ -101,6 +106,10 @@ public:
///
Position QueryEnd() const;
/// \returns the number of frames from start of movie to the last base of read
///
int32_t QueryEndFrameNumber() const;
/// \returns the record's query start position, or 0 if not stored
///
/// \note QueryStart is in polymerase read coordinates, NOT genomic
......@@ -108,6 +117,10 @@ public:
///
Position QueryStart() const;
/// \returns the number of frames from start of movie to the first base of read
///
int32_t QueryStartFrameNumber() const;
/// \returns this record's expected read accuracy [0, 1000]
Accuracy ReadAccuracy() const;
......@@ -371,9 +384,15 @@ public:
/// \returns true if this record has QueryEnd data
bool HasQueryEnd() const;
/// \returns true if this record has QueryEnd data
bool HasQueryEndFrameNumber() const;
/// \returns true if this record has QueryStart data
bool HasQueryStart() const;
/// \returns true if this record has QueryStartFrameNumber data
bool HasQueryStartFrameNumber() const;
/// \returns true if this record has ScrapRegionType data (only in SCRAP)
bool HasScrapRegionType() const;
......@@ -791,6 +810,13 @@ public:
///
BamRecord& QueryEnd(const PacBio::BAM::Position pos);
/// \brief Sets this record's query end frame number
///
/// \param[in] frame number
/// \returns reference to this record
///
BamRecord& QueryEndFrameNumber(const int32_t frameNumber);
/// \brief Sets this record's query start position.
///
/// \note Changing this will modify the name of non-CCS records.
......@@ -800,6 +826,13 @@ public:
///
BamRecord& QueryStart(const PacBio::BAM::Position pos);
/// \brief Sets this record's query start frame number
///
/// \param[in] frame number
/// \returns reference to this record
///
BamRecord& QueryStartFrameNumber(const int32_t frameNumber);
/// \brief Sets this record's expected read accuracy [0, 1000]
///
/// \param[in] accuracy
......@@ -1131,6 +1164,24 @@ public:
/// \}
public:
/// \name [Mapped]Read conversion
/// \{
///
/// \return Data::Read representation of this record
///
Data::Read ToRead() const;
///
/// \return Data::MappedRead representation of this record
///
/// \throws std::runtime_error if record is unmapped
///
Data::MappedRead ToMappedRead() const;
/// \}
public:
/// \name Clipping & Mapping
/// \{
......@@ -1193,18 +1244,8 @@ private:
void ClipFields(const size_t clipPos, const size_t clipLength);
BamRecord& ClipToQuery(const PacBio::BAM::Position start, const PacBio::BAM::Position end);
BamRecord& ClipToQueryForward(const PacBio::BAM::Position start,
const PacBio::BAM::Position end);
BamRecord& ClipToQueryReverse(const PacBio::BAM::Position start,
const PacBio::BAM::Position end);
BamRecord& ClipToReference(const PacBio::BAM::Position start, const PacBio::BAM::Position end,
const bool exciseFlankingInserts);
BamRecord& ClipToReferenceForward(const PacBio::BAM::Position start,
const PacBio::BAM::Position end,
const bool exciseFlankingInserts);
BamRecord& ClipToReferenceReverse(const PacBio::BAM::Position start,
const PacBio::BAM::Position end,
const bool exciseFlankingInserts);
private:
///\internal
......
......@@ -7,11 +7,13 @@
#ifndef BAMRECORDBUILDER_H
#define BAMRECORDBUILDER_H
#include "pbbam/Config.h"
#include <cstdint>
#include <string>
#include "pbbam/BamHeader.h"
#include "pbbam/BamRecord.h"
#include "pbbam/Config.h"
namespace PacBio {
namespace BAM {
......@@ -47,12 +49,6 @@ public:
///
BamRecordBuilder(const BamRecord& prototype);
BamRecordBuilder(const BamRecordBuilder&);
BamRecordBuilder(BamRecordBuilder&&);
BamRecordBuilder& operator=(const BamRecordBuilder&);
BamRecordBuilder& operator=(BamRecordBuilder&&);
~BamRecordBuilder();
/// \}
public:
......