derek [Thu, 23 Feb 2012 02:49:18 +0000 (21:49 -0500)]
Provided initialization values for previously unspecified (potentially
garbage) integer fields in default-constructed BamAlignments
derek [Mon, 13 Feb 2012 17:16:38 +0000 (12:16 -0500)]
Fixed: error in BamWriter metadata output on big-endian systems
derek [Tue, 17 Jan 2012 16:47:13 +0000 (11:47 -0500)]
Fixed regression: missing EOF empty block on BgzfStream::Close()
derek [Sat, 14 Jan 2012 03:43:45 +0000 (22:43 -0500)]
Fixed: const-related typo in last commit
derek [Fri, 13 Jan 2012 17:06:22 +0000 (12:06 -0500)]
Removed use of std::map::at() in HttpHeader, not a standard STL method
derek [Thu, 5 Jan 2012 19:55:19 +0000 (14:55 -0500)]
Fixed: bad_alloc in socket buffer on some machines
derek [Thu, 8 Dec 2011 08:26:16 +0000 (03:26 -0500)]
Nonstandard, user-defined tags now allowed in SAM header text
derek [Thu, 8 Dec 2011 08:24:31 +0000 (03:24 -0500)]
Added support for custom reference prefix in split tool
derek [Thu, 8 Dec 2011 08:14:17 +0000 (03:14 -0500)]
Fixed: split tool crash when trying to split unmapped reads by reference
derek [Thu, 8 Dec 2011 07:59:37 +0000 (02:59 -0500)]
Fixed: premature EOF issues & updated Windows implementation
derek [Thu, 8 Dec 2011 05:35:02 +0000 (00:35 -0500)]
Rolled back test suite code from master until it's ready for full merge
derek [Thu, 8 Dec 2011 05:26:10 +0000 (00:26 -0500)]
Fixed EOF issues on *nix platforms
derek [Tue, 29 Nov 2011 02:59:09 +0000 (21:59 -0500)]
Reorganized test suite source tree
derek [Tue, 29 Nov 2011 00:09:58 +0000 (19:09 -0500)]
Post-merge cleanup
derek [Mon, 28 Nov 2011 23:55:31 +0000 (18:55 -0500)]
merge with remoteio branch
derek [Mon, 28 Nov 2011 23:48:59 +0000 (18:48 -0500)]
Updated CMakeLists.txt files
derek [Mon, 28 Nov 2011 23:48:12 +0000 (18:48 -0500)]
Initial test suite commit
derek [Thu, 17 Nov 2011 02:02:26 +0000 (21:02 -0500)]
Basic Windows implementation
derek [Tue, 15 Nov 2011 03:20:54 +0000 (22:20 -0500)]
Removed spurious assert
derek [Thu, 10 Nov 2011 18:39:14 +0000 (13:39 -0500)]
Updated file headers (filename, license, description, etc)
derek [Thu, 10 Nov 2011 04:58:20 +0000 (23:58 -0500)]
Added generic I/O device to BamIndex side of things
* Remote BAM access (now w/ random access) seems to be working with the
simple test cases so far
* Major TODO: not yet implemented for Windows
derek [Wed, 9 Nov 2011 22:34:48 +0000 (17:34 -0500)]
Added FTP support (text-tested, not BAM)
derek [Mon, 7 Nov 2011 17:50:10 +0000 (12:50 -0500)]
Implemented basic TCP support layer
* buffered I/O
* design should support future expansion of protocols, proxies, etc
* so far, HTTP range requests working well (on plain HTML text tests,
not yet BAM-tested)
derek [Tue, 25 Oct 2011 16:33:54 +0000 (12:33 -0400)]
Organized api/internal into subdirs
derek [Mon, 17 Oct 2011 19:55:12 +0000 (15:55 -0400)]
Removed some debugging 'error string' messages that snuck into last
commit
derek [Mon, 17 Oct 2011 03:30:34 +0000 (23:30 -0400)]
Regression fixed: error in BamAlignment tag access methods
derek [Sun, 16 Oct 2011 05:48:00 +0000 (01:48 -0400)]
Removed data duplication in last update to Sam*Dictionaries
derek [Fri, 14 Oct 2011 16:42:15 +0000 (12:42 -0400)]
Fixed regression: improper @SQ line ordering in SamHeader output
derek [Fri, 14 Oct 2011 05:14:30 +0000 (01:14 -0400)]
Regression fixed: wasn't properly merging from multiple BAMs
derek [Fri, 14 Oct 2011 05:13:30 +0000 (01:13 -0400)]
Minor cleanup in FilterTool
derek [Thu, 13 Oct 2011 14:03:22 +0000 (10:03 -0400)]
Added GetSoftClips() method to BamAlignment
derek [Wed, 12 Oct 2011 20:30:59 +0000 (16:30 -0400)]
Major speedup in SamSequenceDictionary & SamReadGroupDictionary classes
* Please note that this does introduce a minor source-incompatibility,
only affecting those working directly with the provided Sam*Iterator
typedefs. The short answer is that the iterator now references a
std::pair instead of the 'plain old' data. Use the pair's "second" field
to access the desired SamSequence or SamReadGroup.
* Doxygen docs have been updated to reflect this and provide a bit more
explanation/examples (in docs folder run 'doxygen Doxyfile' to get the
updated API pages).
derek [Tue, 11 Oct 2011 20:52:51 +0000 (16:52 -0400)]
Cleanup in SortTool
* Now using the new BamTools::Algorithms::Sort function objects
* Special handling of unmapped alignments should no longer be necessary
as the sorting function objects (also used by multi-reader merging
strategy) handles those cases.
derek [Tue, 11 Oct 2011 19:21:58 +0000 (15:21 -0400)]
Bug fix in BgzfStream I/O
derek [Tue, 11 Oct 2011 17:34:13 +0000 (13:34 -0400)]
Fixed typo
derek [Tue, 11 Oct 2011 12:35:36 +0000 (08:35 -0400)]
Cleanup missed by earlier "includes cleanup" commit
derek [Tue, 11 Oct 2011 05:09:35 +0000 (01:09 -0400)]
Updated Doxyfile to reflect version 2.0.0
derek [Tue, 11 Oct 2011 04:04:54 +0000 (00:04 -0400)]
Removed index cache mode
derek [Mon, 10 Oct 2011 22:29:53 +0000 (18:29 -0400)]
Cleaned up intra-API includes & moved version numbers to 2.0.0
derek [Mon, 10 Oct 2011 21:26:46 +0000 (17:26 -0400)]
Updated Doxygen comments
derek [Sun, 9 Oct 2011 03:47:07 +0000 (23:47 -0400)]
Converted intervals from 0-based, CLOSED to 0-based, HALF-OPEN
derek [Fri, 7 Oct 2011 22:19:09 +0000 (18:19 -0400)]
Cleaned up output/exception/asserts, etc after last merge
derek [Fri, 7 Oct 2011 20:11:43 +0000 (16:11 -0400)]
Merge with earlier IODevice work
* This commit still has some console pollution. I need to work in the
recent Exception/ErrorString approach, but wanted to go ahead and do the
merge-conflict resolution now before diving into remote file support.
derek [Fri, 7 Oct 2011 19:12:57 +0000 (15:12 -0400)]
Removed STDERR pollution by API
* Accomplished this by introducing a GetErrorString() on most API
objects. When a method returns false, you can ignore it, parse the error
string to decide what to do next, prompt the user, make a sandwich,
whatever. But nothing should leak out to the console.
* Internally the error messages are passed by a new BamException class.
This new exception should not cross the library boundary. The exception
should be caught "under the hood" and its what() string should be
(possibly formatted and) stored as the error string in one of the high-
derek [Tue, 4 Oct 2011 04:44:22 +0000 (00:44 -0400)]
First stab at templated tag access in BamAlignment
* Seems to work OK, but will definitely need further testing to be sure
derek [Tue, 4 Oct 2011 04:39:40 +0000 (00:39 -0400)]
Removed duplicated method that snuck past a prior merge conflict resolution
derek [Mon, 3 Oct 2011 20:50:56 +0000 (16:50 -0400)]
merge conflict
derek [Mon, 3 Oct 2011 20:33:44 +0000 (16:33 -0400)]
MultiReader (&MultiMerger) now using Algorithms::Sort objects
derek [Fri, 30 Sep 2011 20:20:28 +0000 (16:20 -0400)]
Initial test run of new BamAlgorithms
derek [Wed, 28 Sep 2011 16:26:25 +0000 (12:26 -0400)]
Fix: unmapped reads now pushed to end of coordinate-sorted BAM
derek [Tue, 27 Sep 2011 15:46:40 +0000 (11:46 -0400)]
Fixed typo in error messages
Derek Barnett [Tue, 27 Sep 2011 04:10:59 +0000 (21:10 -0700)]
Merge pull request #16 from gabeiscoding/patch-2
Fixed: Crash in BamStandardIndex::GetOffset for small BAM files
gabeiscoding [Fri, 23 Sep 2011 15:35:34 +0000 (09:35 -0600)]
In standard indexed BAM files with with sparce coverage (our test case was a roughly 1M read RNAseq BAM file), queries made to intervals may not have any of the candidate offesets present in the index as the BAM index only contains bins that have reads.
Without this bail out, we would get a crash. Returning false silently is the preferred behavior in our view as it allows our read logic to go to the next query and does not add noise to stderr.
derek [Sat, 10 Sep 2011 02:05:02 +0000 (22:05 -0400)]
Merge branches 'master' and 'iodevice' into iodevice
derek [Sat, 10 Sep 2011 01:40:06 +0000 (21:40 -0400)]
Minor cleanup
* Removed SourceForge URL from README
* Removed phrase "All rights reserved." from all files
derek [Fri, 9 Sep 2011 22:49:44 +0000 (18:49 -0400)]
Removed unnecessary peek-and-rewind behavior in BamMultiReader
* Fixes some piping issues
derek [Fri, 9 Sep 2011 22:32:44 +0000 (18:32 -0400)]
Removed 'core mode' concept from BamMultiReader internals
* Now char data is only generated if needed by multi-merger
implementation or on-demand by client call to
BamMultiReader::GetNextAlignment()
derek [Fri, 9 Sep 2011 19:09:53 +0000 (15:09 -0400)]
Refactored shared pipe/file behavior into ILocalIODevice
derek [Fri, 9 Sep 2011 16:07:31 +0000 (12:07 -0400)]
Merge branches 'master' and 'iodevice' into iodevice
derek [Fri, 9 Sep 2011 16:02:06 +0000 (12:02 -0400)]
Basic internal implementation of BamFile & BamPipe
* BgzfStream now working on IBamIODevice instead of FILE*
* BamReaderPrivate now queries stream's IsOpen() method instead of
touching member variable directly
* Empty implementations of BamHttp & BamFtp
* Added global BT_ASSERT_X macro for convenience
Derek Barnett [Thu, 8 Sep 2011 20:59:09 +0000 (13:59 -0700)]
Merge pull request #15 from gabeiscoding/patch-1
Bug discovered. The chunkStop was not being read from the correct offset
gabeiscoding [Thu, 8 Sep 2011 13:32:48 +0000 (07:32 -0600)]
Bug discovered. The chunkStop was not being read from the correct offset (rather always being read as the first chunkStart value for the # alignment chunks in that bin of the index.
The result of this is that chunkStop will never be >= minOffset (or maybe rarely, since it always equals the first chunkStart for the first chunk) and thus the linear index doesn't really help in reducing the number of seeks performed.
derek [Wed, 7 Sep 2011 17:54:30 +0000 (13:54 -0400)]
Added empty IBamIODevice.h
derek [Fri, 2 Sep 2011 17:01:43 +0000 (13:01 -0400)]
Added support for "-" as indicator for stdin/stdout
* Thanks to Aaron Quinlan for suggestion
derek [Fri, 2 Sep 2011 16:35:54 +0000 (12:35 -0400)]
Added "isSingleton" property to filter tool
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