From 6464b9470e35a88c00c3623fddcfbfd668e20d04 Mon Sep 17 00:00:00 2001 From: Aaron <aaronquinlan@gmail.com> Date: Wed, 3 Mar 2010 21:07:52 -0500 Subject: [PATCH] Version 2.5.4 (Mar-3-2010) Fixed an insidious bug that caused malformed BAM output from intersectBed and pairToBed. The previous BAM files worked fine with samtools as BAM input, but when piped in as SAM, there was an extra tab that thwarted conversion from SAM back to BAM. Many thanks to Ivan Gregoretti for reporting this bug. I had never used the BAM output in this way and thus never caught the bug! --- src/utils/BamTools/BamWriter.cpp | 2 +- src/utils/version/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/BamTools/BamWriter.cpp b/src/utils/BamTools/BamWriter.cpp index c834d45a..d3363807 100644 --- a/src/utils/BamTools/BamWriter.cpp +++ b/src/utils/BamTools/BamWriter.cpp @@ -243,7 +243,7 @@ void BamWriter::BamWriterPrivate::SaveAlignment(const BamAlignment& al) { const unsigned int encodedQueryLen = encodedQuery.size(); // store the tag data length - const unsigned int tagDataLength = al.TagData.size() + 1; + const unsigned int tagDataLength = al.TagData.size(); // assign the BAM core data unsigned int buffer[8]; diff --git a/src/utils/version/version.h b/src/utils/version/version.h index 0e95be16..4c794260 100644 --- a/src/utils/version/version.h +++ b/src/utils/version/version.h @@ -3,6 +3,6 @@ // define the version. All tools in the // suite carry the same version number. -#define VERSION "2.5.3" +#define VERSION "2.5.4" #endif /* VERSION_H */ -- GitLab