]> git.donarmstrong.com Git - bamtools.git/commitdiff
Merge pull request #41 from tobiasmarschall/master
authorDerek Barnett <derekwbarnett@gmail.com>
Wed, 4 Apr 2012 18:47:01 +0000 (11:47 -0700)
committerDerek Barnett <derekwbarnett@gmail.com>
Wed, 4 Apr 2012 18:47:01 +0000 (11:47 -0700)
Include header sys/filio.h when compiling on SunOS.

CMakeLists.txt
src/api/SamConstants.h
src/api/SamHeader.cpp
src/toolkit/CMakeLists.txt
src/toolkit/bamtools_sort.cpp

index f5b9403f13a1deaecb485365a103b50462bbf880..b89990e0ecaba46096eb0bc0ef3b516e923954f9 100644 (file)
@@ -32,7 +32,7 @@ ensure_out_of_source_build( "
 # set BamTools version information
 set( BamTools_VERSION_MAJOR 2 )
 set( BamTools_VERSION_MINOR 1 )
-set( BamTools_VERSION_BUILD 0 )
+set( BamTools_VERSION_BUILD 1 )
 
 # set our library and executable destination dirs
 set( EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin" )
index 405668c796814fc3f911be1217d8912ea29dc1ff..4bb7ee9b0268a392dec65ca1ee8fd64965912322 100644 (file)
@@ -2,7 +2,7 @@
 // SamConstants.h (c) 2010 Derek Barnett
 // Marth Lab, Department of Biology, Boston College
 // ---------------------------------------------------------------------------
-// Last modified: 10 October 2011 (DB)
+// Last modified: 27 March 2012 (DB)
 // ---------------------------------------------------------------------------
 // Provides constants for SAM header
 // ***************************************************************************
@@ -24,6 +24,8 @@ const char SAM_STAR   = '*';
 const char SAM_TAB    = '\t';
 const std::string SAM_DIGITS = "0123456789";
 
+const std::string SAM_CURRENT_VERSION = "1.4";
+
 // HD entries
 const std::string SAM_HD_BEGIN_TOKEN    = "@HD";
 const std::string SAM_HD_VERSION_TAG    = "VN";
index b2925f2a5d6575729ba785e4926c85bab8bb9fd5..967957ac15dde882fd56677553fd6389afcacfa6 100644 (file)
@@ -72,6 +72,7 @@ SamHeader::SamHeader(const SamHeader& other)
     , Sequences(other.Sequences)
     , ReadGroups(other.ReadGroups)
     , Programs(other.Programs)
+    , Comments(other.Comments)
 { }
 
 /*! \fn SamHeader::~SamHeader(void)
index 58f3697ed780ee82a62130f82490411da0eb36c6..a88cf7952cb91494798d7c4bdf2c347706603e13 100644 (file)
@@ -31,7 +31,7 @@ add_executable( bamtools_cmd
 
 # set BamTools application properties
 set_target_properties( bamtools_cmd PROPERTIES
-                       VERSION  2.1.0
+                       VERSION  2.1.1
                        OUTPUT_NAME "bamtools"
                      )
 # make version info available in application
index 03143e18bee6b94c1cc7e3719046f40333b16372..e268bee748b7d8c726bec2a71ade943a871f7f5d 100644 (file)
@@ -2,7 +2,7 @@
 // bamtools_sort.cpp (c) 2010 Derek Barnett, Erik Garrison
 // Marth Lab, Department of Biology, Boston College
 // ---------------------------------------------------------------------------
-// Last modified: 11 October 2011 (DB)
+// Last modified: 27 March 2012 (DB)
 // ---------------------------------------------------------------------------
 // Sorts an input BAM file
 // ***************************************************************************
@@ -133,6 +133,8 @@ bool SortTool::SortToolPrivate::GenerateSortedRuns(void) {
     
     // get basic data that will be shared by all temp/output files 
     SamHeader header = reader.GetHeader();
+    if ( !header.HasVersion() )
+        header.Version = Constants::SAM_CURRENT_VERSION;
     header.SortOrder = ( m_settings->IsSortingByName
                        ? Constants::SAM_HD_SORTORDER_QUERYNAME
                        : Constants::SAM_HD_SORTORDER_COORDINATE );