Permalink
Browse files

patch samtools to handle situation where LB tags aren't in the @RG he…

…ader line
  • Loading branch information...
1 parent 4b6479a commit 652e82f6141d7ea79a42d6068c95e65c6a1aebdf @ernfrid ernfrid committed Apr 24, 2014
Showing with 15 additions and 3 deletions.
  1. +3 −3 README.textile
  2. +1 −0 cmake/BuildSamtools.cmake
  3. +11 −0 vendor/samtools0.1.19.patch
View
@@ -84,12 +84,12 @@ h2. Build Dependencies
h3. Available Packages for Dependencies
* For APT-based systems (Debian, Ubuntu), install the following packages:
-bc. sudo apt-get install build-essential git-core cmake zlib1g-dev libncurses-dev
+bc. sudo apt-get install build-essential git-core cmake zlib1g-dev libncurses-dev patch
* For RPM-based systems (Fedora, CentOS, RHEL), install the following packages instead:
bc. sudo yum groupinstall "Development tools"
-sudo yum install zlib-devel ncurses-devel cmake
+sudo yum install zlib-devel ncurses-devel cmake patch
Note that for some RPM based systems (like RHEL), you will need to install cmake 2.8 or greater yourself as the packaged version is much older.
@@ -104,7 +104,7 @@ bc. git clone https://github.com/genome/bam-readcount.git
h3. Compile bam-readcount
* bam-readcount does not support in source builds. Create a new build directory, enter it, and run:
-bc.. cmake /path/to/bam-readcount/repo
+bc. cmake /path/to/bam-readcount/repo
make deps
make
@@ -31,6 +31,7 @@ ExternalProject_Add(
URL ${CMAKE_SOURCE_DIR}/vendor/samtools-0.1.19.tar.gz
SOURCE_DIR ${SAMTOOLS_ROOT}
BINARY_DIR ${SAMTOOLS_ROOT}
+ PATCH_COMMAND patch -p2 -t -N < ${CMAKE_SOURCE_DIR}/vendor/samtools0.1.19.patch
CONFIGURE_COMMAND echo "Building samtools, build log at ${SAMTOOLS_LOG}"
BUILD_COMMAND make INCLUDES=-I${ZLIB_INCLUDE_DIRS} libbam.a > ${SAMTOOLS_LOG} 2>&1
INSTALL_COMMAND ""
@@ -0,0 +1,11 @@
+--- samtools-0.1.19/sam_header.c 2013-03-19 02:48:09.000000000 -0500
++++ vendor/samtools/sam_header.c 2014-04-23 20:58:22.114860000 -0500
+@@ -687,7 +687,7 @@
+ HeaderTag *key, *value;
+ key = header_line_has_tag(hline,key_tag);
+ value = header_line_has_tag(hline,value_tag);
+- if ( !key && !value )
++ if ( !key || !value )
+ {
+ l = l->next;
+ continue;

0 comments on commit 652e82f

Please sign in to comment.