]> git.donarmstrong.com Git - bamtools.git/log
bamtools.git
13 years agoupdated debugging output in BamIndex, seek vs. calculate distinction
Erik Garrison [Sat, 11 Sep 2010 17:27:30 +0000 (13:27 -0400)]
updated debugging output in BamIndex, seek vs. calculate distinction

13 years agoAdded more verbose debugging output to BamMultiReader::SetRegion
Erik Garrison [Sat, 11 Sep 2010 14:55:22 +0000 (10:55 -0400)]
Added more verbose debugging output to BamMultiReader::SetRegion

13 years agoReimplemented BamToolsIndex for bug fix and performance upgrade. *** NOTE *** This...
Derek [Fri, 10 Sep 2010 21:38:03 +0000 (17:38 -0400)]
Reimplemented BamToolsIndex for bug fix and performance upgrade. *** NOTE *** This commit invalidats any previous BamToolsIndex files (.bti). Please re-run 'bamtools index -bti -in <yourBam>' to generate the new index files.

13 years agoRemoved debug output statement that slipped into last commit.
Derek [Fri, 10 Sep 2010 03:45:21 +0000 (23:45 -0400)]
Removed debug output statement that slipped into last commit.

13 years agoReorganizing index/jumping calls. Now all BamReader cares about is sending a Jump...
Derek [Fri, 10 Sep 2010 03:42:04 +0000 (23:42 -0400)]
Reorganizing index/jumping calls. Now all BamReader cares about is sending a Jump() request to a BamIndex with a desired region and receiving a success/fail flag. BamIndex-derived classes will now handle all index-format-specific offset calculation, overlap checking, etc and make sure its associated BGZF stream has seek-ed as close to the desired region as that index scheme allows.

13 years agoprefer bamtools index in BamMultiReader
Erik Garrison [Wed, 8 Sep 2010 20:17:20 +0000 (16:17 -0400)]
prefer bamtools index in BamMultiReader

13 years agoMerge branch 'master' of git://github.com/pezmaster31/bamtools
Erik Garrison [Wed, 8 Sep 2010 19:36:39 +0000 (15:36 -0400)]
Merge branch 'master' of git://github.com/pezmaster31/bamtools

Conflicts:
src/api/BamReader.cpp

13 years agoRelicensed the source code used in bamtools_options. Most of it derived from Mosaik...
Derek [Tue, 7 Sep 2010 18:42:03 +0000 (14:42 -0400)]
Relicensed the source code used in bamtools_options. Most of it derived from Mosaik source, which was originally released under GPL.  Now under MIT License with author's permission. This puts the entire BamTools codebase securely under one unrestrictive license.

13 years agoDocumentation update
Derek [Tue, 7 Sep 2010 18:30:08 +0000 (14:30 -0400)]
Documentation update

13 years agoAdded -region option to bamtools_merge
Derek [Tue, 7 Sep 2010 17:24:56 +0000 (13:24 -0400)]
Added -region option to bamtools_merge

13 years agoPreviously missed a line in BamReader.cpp with the recent index overhaul.
Derek [Tue, 7 Sep 2010 04:56:03 +0000 (00:56 -0400)]
Previously missed a line in BamReader.cpp with the recent index overhaul.

13 years agoLarge-scale API indexing re-organization:
Derek [Fri, 3 Sep 2010 21:14:05 +0000 (17:14 -0400)]
Large-scale API indexing re-organization:

 * Moved FileExists() to BamAux.h so that all API classes have access to its functionality.
 * Created 2 'factory methods' in BamIndex.h to return a BamIndex subclass, depending on client\'s specified PreferredIndexType & on what files actually exist on disk.
 * Renamed BamDefaultIndex as BamStandardIndex.  Hopefully this name should be a clearer description going forward than BamDefaultIndex, since the standardized index may not always be the 'default' in every situation.

13 years agoModified Utilities::FileExists() so it doesnt rely on sys/stat.h. While this header...
Derek [Fri, 3 Sep 2010 04:40:11 +0000 (00:40 -0400)]
Modified Utilities::FileExists() so it doesnt rely on sys/stat.h.  While this header is de facto provided and supported on *most* systems, it really is not standard C/C++, so cant be trusted to be fully portable.

13 years agoCleaned up index file handling throughout toolkit. Did this by adding a FileExists...
Derek [Fri, 3 Sep 2010 04:37:39 +0000 (00:37 -0400)]
Cleaned up index file handling throughout toolkit.  Did this by adding a FileExists() methods to BamMultiReader for determining which index file to load.

13 years agoAdded IsIndexLoaded() public method to BamReader. Allows client to make sure index...
Derek [Fri, 3 Sep 2010 04:35:05 +0000 (00:35 -0400)]
Added IsIndexLoaded() public method to BamReader. Allows client to make sure index data is available before attempting any random access ops

13 years agoModified help description for -bti option
Derek [Thu, 2 Sep 2010 19:58:06 +0000 (15:58 -0400)]
Modified help description for -bti option

13 years agoAdded uncompressed output as default behavior for Filter-, Merge-, and RandomTools...
Derek [Wed, 1 Sep 2010 03:09:20 +0000 (23:09 -0400)]
Added uncompressed output as default behavior for Filter-, Merge-, and RandomTools when sending results to stdout. User can override this behavior using the command line option: -forceCompression

13 years agoPosted implementation of FilterTool.
Derek [Mon, 30 Aug 2010 22:53:59 +0000 (18:53 -0400)]
Posted implementation of FilterTool.

13 years agoMinor formatting & commenting update
Derek [Mon, 30 Aug 2010 20:17:32 +0000 (16:17 -0400)]
Minor formatting & commenting update

13 years agoUpdated bamtools_utilities with #defines
Derek [Mon, 30 Aug 2010 20:12:23 +0000 (16:12 -0400)]
Updated bamtools_utilities with #defines

13 years agoUpdating bamtools_options
Derek [Mon, 30 Aug 2010 20:11:14 +0000 (16:11 -0400)]
Updating bamtools_options

13 years agoAdded bamtools_filter_engine.*
Derek [Mon, 30 Aug 2010 20:08:09 +0000 (16:08 -0400)]
Added bamtools_filter_engine.*

13 years agoRemoved -pg debug flag from Makefile CXXFLAGS, accidentally incorporated into a prior...
Derek [Mon, 30 Aug 2010 20:05:50 +0000 (16:05 -0400)]
Removed -pg debug flag from Makefile CXXFLAGS, accidentally incorporated into a prior commit

13 years agoForgot to add jsoncpp/json.h in a previous commit
Derek [Mon, 30 Aug 2010 20:04:04 +0000 (16:04 -0400)]
Forgot to add jsoncpp/json.h in a previous commit

13 years agoFixed: Calls to GetEndPosition() rely on CIGAR data being parsed. Previously this...
Derek [Mon, 30 Aug 2010 19:57:55 +0000 (15:57 -0400)]
Fixed: Calls to GetEndPosition() rely on CIGAR data being parsed. Previously this was not set if BamAlignment was retrieved via GetNextAlignmentCore().  Moved CIGAR parsing back to LoadNextAlignment() to ensure this works properly.

13 years agoAdded JsonCPP code to repo. Will be used by FilterTool for script parsing
Derek [Mon, 30 Aug 2010 19:55:20 +0000 (15:55 -0400)]
Added JsonCPP code to repo. Will be used by FilterTool for script parsing

13 years agochange printf's to fprint(stderr,
Erik Garrison [Fri, 20 Aug 2010 16:22:34 +0000 (12:22 -0400)]
change printf's to fprint(stderr,

This pushes errors to the expected output, stderr, instead of mixing
them into the standard output stream.

13 years agoMissed a Makefile in last commit - just adding header comments
Derek [Wed, 18 Aug 2010 19:59:10 +0000 (15:59 -0400)]
Missed a Makefile in last commit - just adding header comments

13 years agoAdded simple header comments to all Makefiles, to help distinguish between them easier
Derek [Wed, 18 Aug 2010 19:56:58 +0000 (15:56 -0400)]
Added simple header comments to all Makefiles, to help distinguish between them easier

13 years agoModified Makefile to ensure creation of bin/ and obj/ directories
Derek [Wed, 18 Aug 2010 19:28:51 +0000 (15:28 -0400)]
Modified Makefile to ensure creation of bin/ and obj/ directories

13 years agoReorganized source tree & build system
Derek [Wed, 18 Aug 2010 19:19:08 +0000 (15:19 -0400)]
Reorganized source tree & build system

13 years agoMinor formatting cleanup in BamIndex.*
Derek [Wed, 18 Aug 2010 01:51:51 +0000 (21:51 -0400)]
Minor formatting cleanup in BamIndex.*

13 years agoModified the way BGZF sets up uncompressed output. Modified BamWriter to support...
Derek [Tue, 17 Aug 2010 20:39:44 +0000 (16:39 -0400)]
Modified the way BGZF sets up uncompressed output. Modified BamWriter to support uncompressed option.

13 years agoModified BamWriter::Open() to return bool on success/fail - was silent before, so...
Derek [Tue, 17 Aug 2010 19:19:10 +0000 (15:19 -0400)]
Modified BamWriter::Open() to return bool on success/fail - was silent before, so clients had no way of handling errors

13 years agoAdded write-uncompressed flag to BGZF. Commit includes some other formatting cleanup...
Derek [Tue, 17 Aug 2010 16:04:51 +0000 (12:04 -0400)]
Added write-uncompressed flag to BGZF. Commit includes some other formatting cleanup as well.

13 years agoMerge git://github.com/ekg/bamtools
Derek [Fri, 6 Aug 2010 15:35:50 +0000 (11:35 -0400)]
Merge git://github.com/ekg/bamtools

13 years agoMinor formatting cleanup: really just an update to be able to pull in Erik's JSON...
Derek [Fri, 6 Aug 2010 15:35:43 +0000 (11:35 -0400)]
Minor formatting cleanup: really just an update to be able to pull in Erik's JSON changes.

13 years agofor json output in bamtools convert
Erik Garrison [Thu, 5 Aug 2010 13:01:02 +0000 (09:01 -0400)]
for json output in bamtools convert

Process qualities to provide a list of Q scores in the json output
instead of just a string of characters.

13 years agoBug fix in BamReader::Jump()
Derek [Wed, 4 Aug 2010 20:03:07 +0000 (16:03 -0400)]
Bug fix in BamReader::Jump()

13 years agoAdded AddTag/EditTag/RemoveTag methods to BamAlignment. Refactored existing GetTag...
Derek [Tue, 27 Jul 2010 16:52:58 +0000 (12:52 -0400)]
Added AddTag/EditTag/RemoveTag methods to BamAlignment. Refactored existing GetTag methods.

13 years agoReworded bamtools stats general help description
Derek [Fri, 23 Jul 2010 03:10:54 +0000 (23:10 -0400)]
Reworded bamtools stats general help description

13 years agoMostly cosmetic fixes. A few tweaks to subtool options/settings naming or default...
Derek [Fri, 23 Jul 2010 03:09:58 +0000 (23:09 -0400)]
Mostly cosmetic fixes. A few tweaks to subtool options/settings naming or default handling as well.

13 years agoImplemented basic alignment stats (count/%) for most of the alignment flags
Derek [Fri, 23 Jul 2010 02:58:15 +0000 (22:58 -0400)]
Implemented basic alignment stats (count/%) for most of the alignment flags

13 years agoVarious cleanups. Added -noheader to SAM conversion in ConvertTool
Derek [Thu, 22 Jul 2010 18:24:54 +0000 (14:24 -0400)]
Various cleanups.  Added -noheader to SAM conversion in ConvertTool

13 years agoForgot to update Makefile with last commit
Derek [Thu, 22 Jul 2010 18:23:48 +0000 (14:23 -0400)]
Forgot to update Makefile with last commit

13 years agoRemoved SamTool (bamtools sam ...) from toolkit. This functionality is covered by...
Derek [Thu, 22 Jul 2010 18:23:14 +0000 (14:23 -0400)]
Removed SamTool (bamtools sam ...) from toolkit.  This functionality is covered by ConvertTool.

13 years agoFixed variable length tag data retrieval in BamAlignment::GetTag(). To do this, remov...
Derek [Thu, 22 Jul 2010 16:18:16 +0000 (12:18 -0400)]
Fixed variable length tag data retrieval in BamAlignment::GetTag(). To do this, removed templated GetTag(). Now have explicit overridden string, unsigned int, signed int, and float flavors of the method.

13 years agoFixed: remove unnecessary EOF write attempt for read-only files in BGZF::Close()
Derek [Thu, 22 Jul 2010 16:16:06 +0000 (12:16 -0400)]
Fixed: remove unnecessary EOF write attempt for read-only files in  BGZF::Close()

13 years agoForgot to include updated bamtools 'main' with RandomTool commmit.
Derek [Wed, 21 Jul 2010 15:00:44 +0000 (11:00 -0400)]
Forgot to include updated bamtools 'main' with RandomTool commmit.

13 years agoAdded the <cctype> include to BamAux to explicitly support the toupper() fxn. It...
Derek [Wed, 21 Jul 2010 14:48:04 +0000 (10:48 -0400)]
Added the <cctype> include to BamAux to explicitly support the toupper() fxn.  It had slipped past newer compilers so far

13 years agoFixed fopen-related typo in bamtools_fasta.*
Derek [Tue, 20 Jul 2010 22:34:31 +0000 (18:34 -0400)]
Fixed fopen-related typo in bamtools_fasta.*

13 years agoAdded basic implementation of RandomTool. This generates a random (well, pseudo....
Derek [Tue, 20 Jul 2010 20:28:31 +0000 (16:28 -0400)]
Added basic implementation of RandomTool. This generates a random (well, pseudo... its based on rand()) subset of alignments from BAM file(s). User can specify REGION and/or number of alignments to generate. No duplicate checking implemented. TODO: Handle BAM files without existing index - tool currently depends heavily on being able to jump around randomly

13 years agoModified BamMultiReader::Open() to return bool. Still needs some tweaks to handle...
Derek [Tue, 20 Jul 2010 20:25:48 +0000 (16:25 -0400)]
Modified BamMultiReader::Open() to return bool. Still needs some tweaks to handle all error cases correctly.

13 years agoAdded cross-platform LFS for tell/seek. Removed fopen64/freopen64 - hopefully unecess...
Derek [Mon, 19 Jul 2010 23:05:51 +0000 (19:05 -0400)]
Added cross-platform LFS for tell/seek. Removed fopen64/freopen64 - hopefully unecessary with -D_FILE_OFFSET_BITS=64 compiler flag

13 years agoFixed Rewind(). Now using LoadNextAlignment() instead of GetNextAlignmentCore()...
Derek [Thu, 15 Jul 2010 18:04:16 +0000 (14:04 -0400)]
Fixed Rewind().  Now using LoadNextAlignment() instead of GetNextAlignmentCore(). GNAC() does region checks which, in this case of clearing prior region data, are unnecessary at best and most likely erroneous.

13 years agoModified Rewind() to check actual data present when resetting region markers, instead...
Derek [Thu, 15 Jul 2010 17:59:42 +0000 (13:59 -0400)]
Modified Rewind() to check actual data present when resetting region markers, instead of relying on potentially incorrect RefData::RefHasAlignments

13 years agoModified handling of BamAlignmentSupportData. This fix should allow BamWriter::SaveA...
Derek [Thu, 15 Jul 2010 17:44:53 +0000 (13:44 -0400)]
Modified handling of BamAlignmentSupportData.  This fix should allow BamWriter::SaveAlignment to still handle BamAlignments retrieved using the 'standard' GetNextAlignment[Core] correctly, while adding support for BamAlignments **generated directly** in client code. Switched BASD::IsParsed to HasCoreOnly, which is false by default and only set by BamReader::GetMextAlignmentCore() - therefore the client should never to touch the BASD struct.

13 years agoPurely cosmetic udpate. Cleaned up some commented blocks, added file header informati...
Derek [Tue, 13 Jul 2010 16:00:42 +0000 (12:00 -0400)]
Purely cosmetic udpate. Cleaned up some commented blocks, added file header information (author, description, etc)

13 years agoUpdated Makefile for fasta & pileup
Derek [Tue, 13 Jul 2010 14:47:17 +0000 (10:47 -0400)]
Updated Makefile for fasta & pileup

13 years agoAdded support for reading FASTA sequences, as well as generating FASTA index (.fai...
Derek [Tue, 13 Jul 2010 01:57:40 +0000 (21:57 -0400)]
Added support for reading FASTA sequences, as well as generating FASTA index (.fai) files. TODO: need to drop FASTA functionality into pileup conversion, as well as create command line feature to generate FASTA indices

13 years agoBegun basic pileup conversion
Derek [Tue, 13 Jul 2010 01:53:57 +0000 (21:53 -0400)]
Begun basic pileup conversion

13 years agoAdded simple PrintBed() method; plan to add PrintWiggle() next. Added use of function...
Derek [Fri, 9 Jul 2010 19:29:17 +0000 (15:29 -0400)]
Added simple PrintBed() method; plan to add PrintWiggle() next. Added use of function pointer to clean up code for conversion method selection.

13 years agoFixed typos in last commit.
Derek [Fri, 9 Jul 2010 17:02:07 +0000 (13:02 -0400)]
Fixed typos in last commit.

13 years agoReorganized convert tool code. Restored stdin by default. Implemented FASTA/FASTQ...
Derek [Fri, 9 Jul 2010 16:57:55 +0000 (12:57 -0400)]
Reorganized convert tool code. Restored stdin by default. Implemented FASTA/FASTQ convert methods. Still need to include support for new (.bti) index file format

13 years agoMerge http://github.com/ekg/bamtools
Derek [Fri, 9 Jul 2010 16:28:22 +0000 (12:28 -0400)]
Merge http://github.com/ekg/bamtools

13 years agoFixed: proper handling of BamAlignment::AlignedBases when QueryBases is empty. Thank...
Derek [Fri, 9 Jul 2010 16:20:39 +0000 (12:20 -0400)]
Fixed: proper handling of BamAlignment::AlignedBases when QueryBases is empty.  Thanks to Aaron Quinlan for catching this.

13 years agoUpdated index and count sub-tools to recognize new (.bti) index file format
Derek [Fri, 9 Jul 2010 16:08:31 +0000 (12:08 -0400)]
Updated index and count sub-tools to recognize new (.bti) index file format

13 years agoSeparated indexing ops to new class. Implemented a fixed-partition-size index format...
Derek [Fri, 9 Jul 2010 16:06:27 +0000 (12:06 -0400)]
Separated indexing ops to new class. Implemented a fixed-partition-size index format (.bti) as an alternative to the BAM default (.bai)

13 years agoEnforced proper handling of large files (>4Gb) on 32-bit systems.
Derek [Fri, 9 Jul 2010 16:04:07 +0000 (12:04 -0400)]
Enforced proper handling of large files (>4Gb) on 32-bit systems.

13 years agoMerge BamMultiReader and SetRegion into bamtools convert
Erik Garrison [Wed, 7 Jul 2010 19:54:39 +0000 (15:54 -0400)]
Merge BamMultiReader and SetRegion into bamtools convert

This commit merges the BamMultiReader and SetRegion method into the
conversion tool.  This greatly simplifies the process of dumping
alignments from regions in a set of bam files.

Breaking in this commit: stdin input by default.  To be fixed in a
subsequent commit.

13 years agoRemove heavy-handed failure mode in BamMultiReader::SetRegion
Erik Garrison [Wed, 7 Jul 2010 19:32:48 +0000 (15:32 -0400)]
Remove heavy-handed failure mode in BamMultiReader::SetRegion

In practice a failure of BamReader::SetRegion means that we can't get
alignments from the specified region.  It is simpler to ignore failures
of SetRegion as they are gracefully handled by UpdateAlignments, which
simply doesn't add alignments from the readers which don't have
alignments in the target region.

This resolves a bug in which bamtools count (and any other utility using
BamMultiReader::SetRegion) would crash when provided a target region
with no alignments.

13 years agoRemoved accidental commit of .o files
Derek [Mon, 28 Jun 2010 19:14:12 +0000 (15:14 -0400)]
Removed accidental commit of .o files

13 years agoModified BamReader(and BGZF)::Open() to return bool. Tried to eliminate most exit...
Derek [Mon, 28 Jun 2010 19:10:28 +0000 (15:10 -0400)]
Modified BamReader(and BGZF)::Open() to return bool. Tried to eliminate most exit() calls. These changes should allow for more graceful error handling. Some 'code cleanup' in BW, but no logic changes.

13 years agoUpdated temp file path stubs to reflect input BAM file stub, so that simultaneous...
Derek [Tue, 22 Jun 2010 03:17:38 +0000 (23:17 -0400)]
Updated temp file path stubs to reflect input BAM file stub, so that simultaneous sort runs don't interfere with each other.

13 years agoRough implementation of sort tool. Generate lots of smaller sorted (STL sort with...
Derek [Tue, 22 Jun 2010 02:23:32 +0000 (22:23 -0400)]
Rough implementation of sort tool.  Generate lots of smaller sorted (STL sort with 'custom' compare fxn) temp files in one pass, using a specified buffer size.  Uses BamMultiReader paired with BamWriter to re-merge all temp files back into a single output BAM, also in one pass. Some work remains on optimizing parameters (e.g. default buffer size), scalability (single pass generates lots of temp files), & parallelization to make tool more sophisticated & robust.

13 years agoGracefully handle empty files with the BamMultiReader
Erik Garrison [Mon, 21 Jun 2010 15:56:39 +0000 (11:56 -0400)]
Gracefully handle empty files with the BamMultiReader

This commit handles the case where an empty BAM file is passed in the
list of filenames given to BamMultiReader::Open(...).  Now a warning is
emitted if the file contains no alignments (or cannot be opened) and the
file is ignored.

13 years agointegration of SetRegion into BamMultiReader
Erik Garrison [Fri, 18 Jun 2010 19:13:46 +0000 (15:13 -0400)]
integration of SetRegion into BamMultiReader

Also includes update to bamtools_count which uses the BamMultiReader by
default and no longer requires the specification of an index file on the
command line, as this would be very cumbersome to parse for multiple
input files.  Added method to check for file existence using stat to
bamtools_utilities.cpp

13 years agomoved bamtools_count to use BamRegion
Erik Garrison [Fri, 18 Jun 2010 15:31:34 +0000 (11:31 -0400)]
moved bamtools_count to use BamRegion

This is more consistent than using a bespoke struct (Region) with the
same fields.

13 years agoModified Jump() scheme to take better account of specified region and drill down...
Derek [Thu, 17 Jun 2010 21:35:27 +0000 (17:35 -0400)]
Modified Jump() scheme to take better account of specified region and drill down closer to region beginning. Introduced RegionState to BRP in order to allow LoadNextAlignment to quit once an alignment is found beyond region.

13 years agoModified BamReaderPrivate::GetOffset() & BinsFromRegion() to make use of right bound...
Derek [Thu, 17 Jun 2010 16:31:29 +0000 (12:31 -0400)]
Modified BamReaderPrivate::GetOffset() & BinsFromRegion() to make use of right bound cutoffs

13 years agoAdded concept of a fully specified region of interest to the BamReader API. Added...
Derek [Thu, 17 Jun 2010 04:01:56 +0000 (00:01 -0400)]
Added concept of a fully specified region of interest to the BamReader API. Added BamRegion struct to BamAux.h. Added SetRegion() methods to BamReader. Reorganized or modified these existing BamReaderPrivate functions: BamReaderPrivate(), Close(), GetNextAlignment/Core(), IsOverlap(), Jump(), & Rewind(). Cleans up a lot of region-checking client code.

13 years agochange merger to use GetNextAlignmentCore
Erik Garrison [Thu, 10 Jun 2010 17:33:28 +0000 (13:33 -0400)]
change merger to use GetNextAlignmentCore

This provides a modest performance boost to the merger.  A small change
to the BamAlignment copy constructor was required (to copy
BamAlignmentSupportData).

13 years agoMerge branch 'master' of git://github.com/pezmaster31/bamtools
Erik Garrison [Thu, 10 Jun 2010 13:23:36 +0000 (09:23 -0400)]
Merge branch 'master' of git://github.com/pezmaster31/bamtools

13 years agoMoved BamAlignmentSupportData into BamAlignment data type. This continues the read...
Derek [Thu, 10 Jun 2010 04:50:37 +0000 (00:50 -0400)]
Moved BamAlignmentSupportData into BamAlignment data type. This continues the read/write speedup mentioned in prior commits, but removes the need for clients to manage this additional auxilary data object. The 'BamAlignment lite' is accessed by calling BamReader::GetNextAlignmentCore() and written by BamWriter::SaveAlignment() which checks to see how much parsing & packing is needed before writing.

13 years agofurther cleanup of duplicate @RG tag warning reporting
Erik Garrison [Wed, 9 Jun 2010 16:06:13 +0000 (12:06 -0400)]
further cleanup of duplicate @RG tag warning reporting

13 years agoadded warning for duplicate @RG tag in header
Erik Garrison [Wed, 9 Jun 2010 15:46:46 +0000 (11:46 -0400)]
added warning for duplicate @RG tag in header

13 years agofixed potential bug with previous commit
Erik Garrison [Wed, 9 Jun 2010 13:39:07 +0000 (09:39 -0400)]
fixed potential bug with previous commit

The previous commit made assumptions about the ordering of subtags
within @RG header lines.  This commit only assumes that the read group
ID is specified by "ID", thus following spec.

13 years agofixed bug with @RG handling
Erik Garrison [Wed, 9 Jun 2010 13:31:01 +0000 (09:31 -0400)]
fixed bug with @RG handling

Prior to this commit files merged with bamtools merge would have one @RG
tag for each file.  This is undesirable behavior.  This commit fixes the
issue by tracking unique @RG tags in our unified header
(BamMultiReader::GetHeaderText) and prevents the MultiReader from
observing more than one @RG tag in the header.  Future merges will have
the correct header.

13 years agoMerge branch 'master' of git://github.com/pezmaster31/bamtools
Erik Garrison [Wed, 9 Jun 2010 12:39:07 +0000 (08:39 -0400)]
Merge branch 'master' of git://github.com/pezmaster31/bamtools

13 years agoRemoved accidental add of object files
Derek [Wed, 9 Jun 2010 03:42:03 +0000 (23:42 -0400)]
Removed accidental add of object files

13 years agoAdded GetNextAlignmentCore() to BamReader API as well as a corresponding SaveAlignmen...
Derek [Wed, 9 Jun 2010 03:29:45 +0000 (23:29 -0400)]
Added GetNextAlignmentCore() to BamReader API as well as a corresponding SaveAlignment() in BamWriter. Both utilitze the BamAlignmentSupportData structure which contains the raw character data and lengths, and which has been bumped to BamAux.h.  Exposing these methods should allow for quicker read/writes for tools that are only concerned with alignment/positional data, not the actual sequences.

13 years agoBamMultiReader data structure rewrite
Erik Garrison [Tue, 8 Jun 2010 20:28:58 +0000 (16:28 -0400)]
BamMultiReader data structure rewrite

Rewrite to improve performance of the MultiReader on large sets of
files.  Move tracking of readers, alignments, and positions from several
decoupled vectors into a single multimap, allowing rapid acquisition of
the lowest 'current' alignment among the set of open readers.  Expect
some performance boost when running the MultReader on large numbers of
files, as prior to this rewrite each alignment required roughly 3 x N
ops (where N is the number of files) checking all these vectors.

13 years agojson output
Erik Garrison [Tue, 8 Jun 2010 17:05:59 +0000 (13:05 -0400)]
json output

13 years agoFixed output of tag types c & C. Removed atoi() call. Simply casting the single byte...
Derek [Tue, 8 Jun 2010 16:32:02 +0000 (12:32 -0400)]
Fixed output of tag types c & C. Removed atoi() call. Simply casting the single byte to int works correctly.

13 years agoThis fixes the out-of-range exception. Though there's still a discrepancy with some...
Derek [Mon, 7 Jun 2010 20:18:10 +0000 (16:18 -0400)]
This fixes the out-of-range exception. Though there's still a discrepancy with some (but, maddeningly, not all) tags following a string tag. Will look into to more detail, but at least it shouldn't crash in the meantime

13 years agopass ostream variable to print functions in convert
Erik Garrison [Mon, 7 Jun 2010 19:25:25 +0000 (15:25 -0400)]
pass ostream variable to print functions in convert

13 years agoBegan rolling over bamtools_sam into bamtools_convert. Kinda hacky setup for now...
Derek [Mon, 7 Jun 2010 17:58:46 +0000 (13:58 -0400)]
Began rolling over bamtools_sam into bamtools_convert.  Kinda hacky setup for now, but ok to get conversion routines tested

13 years agoFixed typo in settings config.
Derek [Mon, 7 Jun 2010 17:24:51 +0000 (13:24 -0400)]
Fixed typo in settings config.

13 years agoAdded ConvertTool.h/cpp. Not yet implemented.
Derek [Thu, 3 Jun 2010 20:02:51 +0000 (16:02 -0400)]
Added ConvertTool.h/cpp. Not yet implemented.

13 years agoUpdated README
Derek [Thu, 3 Jun 2010 19:28:43 +0000 (15:28 -0400)]
Updated README