derek [Wed, 27 Jul 2011 15:34:41 +0000 (11:34 -0400)]
Implemented binary search through bins in BAI
derek [Wed, 6 Jul 2011 16:24:00 +0000 (12:24 -0400)]
Added a -minMQ (minimum map quality) option to ResolveTool
Derek Barnett [Tue, 28 Jun 2011 16:37:30 +0000 (09:37 -0700)]
Merge pull request #13 from alecchap/master
Fixes for Visual Studio
derek [Tue, 28 Jun 2011 16:31:25 +0000 (12:31 -0400)]
Added unique-alignment checks for ResolveTool
* Unique-ness determined by comparing MapQuality to 0
* Only pairs with both mates unique are used for the 'makeStats' median
fragment size calculation.
Alec Chapman [Tue, 28 Jun 2011 01:58:30 +0000 (21:58 -0400)]
Fix Visual Studio compiler errors.
Don't use dynamic stack allocation (variable length arrays).
Rename bamtools target to bamtools_cmd to not conflict with BamTools target (they differ only in case).
bamtools_cmd only compiles if I remove bamtools_filter.cpp, which I haven't committed.
I also had to manually configure the include directory for zlib,
but that's probably due to having multiple copies floating around my machine.
derek [Thu, 23 Jun 2011 19:35:35 +0000 (15:35 -0400)]
Fixed -fPIC issue for CentOS users.
* Forced compiler flag that was not being automatically set by CMake on
that OS. Had previously set this on API library. Got feedback that it
worked there, so I added the flag to Utils & JsonCPP libs as well.
derek [Fri, 17 Jun 2011 04:09:49 +0000 (00:09 -0400)]
Removed pessimistic warnings when jumping to regions with no data, using
the standard index format (not actually an error case, so no need to
alarm users with scary messages)
derek [Fri, 17 Jun 2011 02:13:26 +0000 (22:13 -0400)]
Added re-calculation of BamAlignment's BinID during
BamWriter::SaveAlignment() in all cases
* Previously, the bin IDs of purely "core-only" alignments were simply
written directly out to output BAM. However, in cases where alignment
Position is changed (re-alignment), the original bin ID may no longer be
correct.
derek [Tue, 14 Jun 2011 17:41:56 +0000 (13:41 -0400)]
Implemented better coupling of unmapped reads with mates during sorting
(assuming assigned same coordinates)
* Used std::stable_sort instead of std::sort, to preserve order
* Add checks at buffer boundary to keep mates from being split into
different temp files. This makes the buffer boundary "softer", but in
practice, shouldn't differ much if at all.
derek [Tue, 14 Jun 2011 17:16:36 +0000 (13:16 -0400)]
Further fixes for ISIZE-handling in ResolveTool
derek [Mon, 13 Jun 2011 19:37:36 +0000 (15:37 -0400)]
Fixed some signed/unsigned InsertSize bugs in ResolveTool
derek [Sat, 11 Jun 2011 21:07:43 +0000 (17:07 -0400)]
ConvertTool fix: removed extra space in (BAM->FASTA) header lines
derek [Sat, 11 Jun 2011 21:05:43 +0000 (17:05 -0400)]
Created 3 modes for ResolveTool: makeStats, markPairs, & twoPass
* "TwoPass" mode (the initial implementation of the tool) effectively
eliminates piped BAMs as an input option, since you can't exactly rewind
stdin and start reading from the beginning.
* To get around this, I separated the two passes into separate "modes"
(-makeStats & -markPairs), that communicate via a simple, human-readable
stats summary file. Data can then be merged, filtered, etc and piped
into each mode if you don't mind the runtime of preprocessing twice but
don't want to physically store the unresolved intermediate BAM file.
derek [Sat, 11 Jun 2011 20:55:08 +0000 (16:55 -0400)]
Cleaned up help formatting & added some string utilities
derek [Tue, 7 Jun 2011 19:47:42 +0000 (15:47 -0400)]
Added new ResolveTool - for paired-end resolution. Similar to functionality provided inthe deprecated (or soon to be) MosaikSort tool
derek [Tue, 7 Jun 2011 19:45:35 +0000 (15:45 -0400)]
Minor cleanup to toolkit code formatting.
derek [Tue, 10 May 2011 23:28:31 +0000 (19:28 -0400)]
Fixed minimum offset error in BAI jumping
Derek Barnett [Thu, 5 May 2011 17:49:59 +0000 (10:49 -0700)]
Merge pull request #9 from bookest/patch-1
'make install' should install bin/bamtools
Christopher Grim [Thu, 5 May 2011 17:17:59 +0000 (10:17 -0700)]
'make install' should install bin/bamtools
derek [Wed, 27 Apr 2011 06:22:30 +0000 (02:22 -0400)]
Removed debug statements that snuck into last commit
derek [Wed, 27 Apr 2011 06:19:15 +0000 (02:19 -0400)]
Fixed regression bug in index formats. Wasn't properly handling empty references
derek [Fri, 22 Apr 2011 18:40:36 +0000 (14:40 -0400)]
Additional attempt to force -fPIC on CentOS
derek [Fri, 22 Apr 2011 16:55:01 +0000 (12:55 -0400)]
Modified BamAlignment in attempt to resolve symbol issues on 64-bit systems.
derek [Tue, 19 Apr 2011 23:01:01 +0000 (19:01 -0400)]
Brought API up to compliance with recent SAM Format Spec (v1.4-r962)
* Added support for new "binary array" tag type
* Added support for '=' and 'X' CIGAR ops
* Added support for multiple PG entries in header
* Added support for new RG fields
derek [Tue, 5 Apr 2011 17:37:01 +0000 (13:37 -0400)]
Rolled back the BGZF buffer size to the original 64K. 256K was causing
crashes on some systems.
derek [Tue, 5 Apr 2011 16:43:31 +0000 (12:43 -0400)]
Major performance boost to startup & random-access - especially for the
use cases involving multiple (hundreds) of BAMs with BAI index files.
* This did require some changes to the BamIndex interface. I doubt man
y people are writing custom index format classes, but if you are one of
them and have any problems, feel free to contact me with questions.
derek [Wed, 23 Mar 2011 06:57:31 +0000 (02:57 -0400)]
Updated Doxyfile, attempt to fix online file access
derek [Wed, 23 Mar 2011 06:37:39 +0000 (02:37 -0400)]
Major update to BamTools version 1.0
derek [Thu, 24 Feb 2011 16:36:12 +0000 (11:36 -0500)]
Attempt to fix SamHeaderVersion compile bug
derek [Wed, 19 Jan 2011 17:57:13 +0000 (12:57 -0500)]
Bug fix in SamHeaderVersion::SetVersion()
derek [Wed, 19 Jan 2011 17:08:52 +0000 (12:08 -0500)]
Missed bug fix in BamMultiMerger in early commit. Fixed now.
derek [Mon, 17 Jan 2011 19:49:32 +0000 (14:49 -0500)]
Added ExportHeader command for BamConstants.h
derek [Mon, 17 Jan 2011 19:45:09 +0000 (14:45 -0500)]
Removed SamHeaderValidatorPrivate pimpl. No real need for it since not exposed to API, and harder to test
derek [Mon, 17 Jan 2011 19:42:42 +0000 (14:42 -0500)]
Added UNSORTED to BamMultiReader::SortOrder types. Unsorted BAMs are 'merged' through a simple reader queue.
derek [Thu, 13 Jan 2011 06:40:25 +0000 (01:40 -0500)]
Minor formatting cleanup
derek [Wed, 12 Jan 2011 22:47:04 +0000 (17:47 -0500)]
Minor update to API version 0.9.3 - addition of SamHeader::SetHeaderText().
derek [Wed, 12 Jan 2011 16:37:17 +0000 (11:37 -0500)]
Added BamConstants.h
derek [Wed, 12 Jan 2011 03:43:51 +0000 (22:43 -0500)]
Removed explicit keyword from SamHeader-related object copy ctors
derek [Wed, 12 Jan 2011 03:37:31 +0000 (22:37 -0500)]
Update to BamTools API 0.9.2 with exposure of SamHeader object from BamReader and to BamWriter
derek [Wed, 12 Jan 2011 03:35:09 +0000 (22:35 -0500)]
Added explicit copy ctors to SamHeader data structures
derek [Fri, 24 Dec 2010 03:33:33 +0000 (22:33 -0500)]
Added SAM header-handling classes for read/write/validate.
* Not fully connected to the BamReader/Writer API yet, but will be
phased in soon.
* Will enable clients to query, modify & validate a BAM file's SAM
header data using the BamTools API, instead of having to use hand-rolled
string-parsing code on the result of BamReader::GetHeaderText().
derek [Fri, 24 Dec 2010 02:26:02 +0000 (21:26 -0500)]
Updated to 0.9.1
* With changes to BamMultiReader interface.
derek [Fri, 24 Dec 2010 02:14:49 +0000 (21:14 -0500)]
Implemented proper -byname sorting (finally).
* BamMultiReader used to merge the "next" alignment based on (refID,
position). Extracted this and generalized to support merging on either
position OR alignment name.
derek [Fri, 24 Dec 2010 01:56:01 +0000 (20:56 -0500)]
Added static library to build step.
* Suggested & contributed by Rob Bradley.
derek [Wed, 22 Dec 2010 19:22:40 +0000 (14:22 -0500)]
Moved BuildCharData() from BamReader to BamAlignment
* This will enable even "lazier" population of the alignment character
data later in analysis, outside the context of reading it from the BAM
file
derek [Thu, 16 Dec 2010 17:33:32 +0000 (12:33 -0500)]
Fixed: Improper sorting -byname
derek [Wed, 15 Dec 2010 20:39:54 +0000 (15:39 -0500)]
Added creation of include/ folder in bamtools root directory at build time.
* API-related headers are copied here to provide an explicit target for client code.
derek [Mon, 13 Dec 2010 20:53:12 +0000 (15:53 -0500)]
Minor formatting cleanup
derek [Mon, 13 Dec 2010 20:28:33 +0000 (15:28 -0500)]
Made BamAlignment flag queries symmetrical
* For example: there is now a SetIsMapped() setter to match the
IsMapped() getter. Before you had to reverse your logic on a few of the
flags (in this case, using SetIsUnmapped()). Not impossible to use, but
not immediately obvious and intuitive, and hard to remember when to use
the opposite setter. These older methods will remain available, but
should be considered deprecated.
derek [Tue, 7 Dec 2010 18:02:24 +0000 (13:02 -0500)]
Fixed: handling BamAlignments with limited char data
derek [Mon, 6 Dec 2010 21:30:13 +0000 (16:30 -0500)]
Fixed : improper exit code from FilterTool
derek [Mon, 6 Dec 2010 17:02:18 +0000 (12:02 -0500)]
Fixed: core mode setting for BamMultiReader::Open() in FilterTool
* Was opening with coreMode=true, which caused errors filtering the
first alignment's char data
derek [Mon, 6 Dec 2010 04:11:03 +0000 (23:11 -0500)]
Added new RevertTool to the toolkit
* "$ bamtools revert ... " will clear the IsDuplicate flag on
BamAlignments and replace the Qualities with the contents of the OQ tag.
* Suggested by and draft implementation contributed by Al Ward.
derek [Fri, 3 Dec 2010 20:45:20 +0000 (15:45 -0500)]
Fixed: bug in the BamReader::Jump() codepath, specifically the
BRP::AdjustRegion() logic
derek [Mon, 22 Nov 2010 18:02:38 +0000 (13:02 -0500)]
Moved private implementation API files to internal directory for clearer separation. These should not be included by client code
derek [Mon, 22 Nov 2010 17:48:00 +0000 (12:48 -0500)]
Added proper import of bamtools version info from CMake
derek [Mon, 22 Nov 2010 17:47:10 +0000 (12:47 -0500)]
Fixed BamRegion bug: previously only checked if refID was -1, needed to make sure all negative values were invalid
derek [Fri, 19 Nov 2010 20:52:04 +0000 (15:52 -0500)]
Continued breaking up of monolithic classes: extracted BamStandardIndex & BamToolsIndex into their own source files.
derek [Fri, 19 Nov 2010 17:41:54 +0000 (12:41 -0500)]
Extracted BamReaderPrivate & BamWriterPrivate from inner classes.
First step in breaking up the API's monolithic classes. Should allow easier maintenance, testing, and adding features as we go forward.
derek [Fri, 19 Nov 2010 16:14:54 +0000 (11:14 -0500)]
Added UTILS_EXPORT macro to classes in BamTools utility library
derek [Fri, 19 Nov 2010 16:01:58 +0000 (11:01 -0500)]
Added API_EXPORT macro to classes in BamTools API
derek [Fri, 19 Nov 2010 15:42:40 +0000 (10:42 -0500)]
Removed commented (library export) definitions from utils & jsoncpp CMakeLists files
derek [Fri, 19 Nov 2010 15:32:45 +0000 (10:32 -0500)]
Migrated to CMake build system.
* Please see README: Installation for help in building BamTools toolkit & API and integrating the new shared library into your application
derek [Thu, 18 Nov 2010 00:41:29 +0000 (19:41 -0500)]
Changed GetNextAlignmentCore() calls to GetNextAlignment() in FilterTool
derek [Mon, 15 Nov 2010 19:54:27 +0000 (14:54 -0500)]
Minor formatting cleanup
derek [Wed, 27 Oct 2010 16:54:38 +0000 (12:54 -0400)]
Removed more non-standard STL calls from BamIndex.cpp
derek [Wed, 27 Oct 2010 16:33:56 +0000 (12:33 -0400)]
Merge branch 'master' of git://github.com/ekg/bamtools
derek [Wed, 27 Oct 2010 16:32:16 +0000 (12:32 -0400)]
Removed non-standard stl::map method calls
Erik Garrison [Wed, 27 Oct 2010 16:08:22 +0000 (12:08 -0400)]
Merge branch 'master' of http://github.com/pezmaster31/bamtools
Erik Garrison [Wed, 27 Oct 2010 16:07:47 +0000 (12:07 -0400)]
clarified no-index behavior in bam multi reader
derek [Mon, 25 Oct 2010 18:10:42 +0000 (14:10 -0400)]
Updated BamTools version information.
* Also automated version information propagation forfuture updates.
Only need to set version in top-level Makefile.
derek [Sun, 24 Oct 2010 19:26:15 +0000 (15:26 -0400)]
Updated README
Derek [Thu, 21 Oct 2010 21:15:07 +0000 (17:15 -0400)]
Merge branch 'master' of git://github.com/ekg/bamtools
Derek [Thu, 21 Oct 2010 21:14:44 +0000 (17:14 -0400)]
Updating README... still a work in progress
Erik Garrison [Thu, 21 Oct 2010 21:03:48 +0000 (17:03 -0400)]
add index caching mode setter to BamMultiReader
Derek [Thu, 21 Oct 2010 19:00:03 +0000 (15:00 -0400)]
Fixed NoIndexCaching behavior
* Previous commit lacked the post-jump dump of index data when this
mode is selected.
Derek [Thu, 21 Oct 2010 04:22:36 +0000 (00:22 -0400)]
Merge branch 'master' of git://github.com/pezmaster31/bamtools
Derek [Thu, 21 Oct 2010 04:19:40 +0000 (00:19 -0400)]
Implemented index cache mode for both BAI & BTI formats
* Client code can now decide between 3 index cache modes:
Full : save entire index data in memory
Limited (default) : save only index data for current reference
None : save no index data - only load data necessary for a single-
* Required a major overhaul to BamIndex interface and derived classes.
Lots of refactoring to move common code up to BamIndex.
Derived classes now share much of the same method names &
organization. Only implementation details differ, as needed.
* Miscellaneous: moved BAMTOOLS_LFS definitions into BamAux.h & cleaned
up BGZF.h
Derek [Thu, 21 Oct 2010 04:19:40 +0000 (00:19 -0400)]
Implemented index cache mode for both BAI & BTI formats
* Client code can now decide between 3 index cache modes:
Full : save entire index data in memory
Limited (default) : save only index data for current reference
None : save no index data - only load data necessary for a single-
* Required a major overhaul to BamIndex interface and derived classes.
Lots of refactoring to move common code up to BamIndex.
Derived classes now share much of the same method names &
organization. Only implementation details differ, as needed.
* Miscellaneous: moved BAMTOOLS_LFS definitions into BamAux.h & cleaned
up BGZF.h
Derek [Sat, 16 Oct 2010 20:45:08 +0000 (16:45 -0400)]
modified/clarified some help & usage messages
* (also a test run for different git commit system on my end)
Derek [Sat, 9 Oct 2010 23:54:03 +0000 (19:54 -0400)]
Changed BamAlignment::SupportData from private to public.
This should remove the access-control errors that occur when building BamTools with older, less-conforming compilers
Derek [Sat, 9 Oct 2010 23:28:42 +0000 (19:28 -0400)]
Fixed: bug(s) related to empty references and regions.
* NOTE - This fix does introduce a slight modification to the *.bti index format.
So any existing BTI index files will need to be rebuilt to support the bug fix (apologies).
Derek [Tue, 5 Oct 2010 15:15:50 +0000 (11:15 -0400)]
Minor formatting, commenting cleanup
derek [Mon, 4 Oct 2010 17:49:10 +0000 (13:49 -0400)]
Added tag support in filter tool.
derek [Mon, 4 Oct 2010 14:25:30 +0000 (10:25 -0400)]
Reviewed BAM to YAML conversion contribution (thank you Chase Miller). Reorganized to fit BT code style & structure.
Erik Garrison [Wed, 29 Sep 2010 20:23:56 +0000 (16:23 -0400)]
convert: cleanup of prior fix, report if no index file found
Erik Garrison [Wed, 29 Sep 2010 15:54:48 +0000 (11:54 -0400)]
prior commit caused bug with convert
Fix: attempt to open indexes when we are not reading from stdin.
Erik Garrison [Tue, 28 Sep 2010 21:44:29 +0000 (17:44 -0400)]
exposes cigar string data to bamtools filter
Erik Garrison [Tue, 28 Sep 2010 21:44:12 +0000 (17:44 -0400)]
added reader.Open checks to a number of tools
Chase Miller [Tue, 28 Sep 2010 15:16:13 +0000 (11:16 -0400)]
Added Yaml for outputing BamAlignments.
Erik Garrison [Tue, 28 Sep 2010 02:23:27 +0000 (22:23 -0400)]
Merge branch 'master' of http://github.com/pezmaster31/bamtools
Derek [Thu, 23 Sep 2010 19:56:43 +0000 (15:56 -0400)]
Fixed lack of reverse complemented output in BAM -> FASTA/Q conversion.
* Also appended '/1' or '/2' to paired-end FASTQ entries to indicate which mate it represents.
Erik Garrison [Thu, 23 Sep 2010 14:30:09 +0000 (10:30 -0400)]
Merge branch 'master' of http://github.com/pezmaster31/bamtools
Derek [Wed, 22 Sep 2010 02:00:14 +0000 (22:00 -0400)]
Implemented 'compound rule' logic in the FilterTool's script support.
* Previously the script was limited to doing 'OR' comparisons on various
property sets (what I call here filters). Now, by providing each filter
with an id, you can use these id's to define a compound rule.
* Documentation is severely lacking on this end at the moment, but I hope
to have a good explanation up soon. I think this interface could provide
a powerful flexibility in querying BAM files for very specific cases for
further analyses.
Derek [Mon, 20 Sep 2010 15:35:16 +0000 (11:35 -0400)]
Cleaned up SplitTool internal implementation. Use of template methods should make maintenance a bit easier.
Erik Garrison [Mon, 20 Sep 2010 12:33:39 +0000 (08:33 -0400)]
Merge branch 'master' of http://github.com/pezmaster31/bamtools
Derek [Sun, 19 Sep 2010 21:06:02 +0000 (17:06 -0400)]
Removed a backup text file that snuck into an earlier commit
Derek [Sun, 19 Sep 2010 21:05:16 +0000 (17:05 -0400)]
Added implementation of new SplitTool. This tool splits a single BAM file into multiple BAMs, based on a user-specified property. For now, properties supported are mapped/unmapped, paired/unpaired, split by reference, and split based on a given tag.
Derek [Sun, 19 Sep 2010 21:02:17 +0000 (17:02 -0400)]
Added GetTagType() to BamAlignment
Derek [Sat, 18 Sep 2010 20:47:34 +0000 (16:47 -0400)]
Updated to match new BamAlignment.h includes