From: Diane Trout Date: Thu, 6 Dec 2012 20:09:20 +0000 (-0800) Subject: Commit patch to not break on spaces. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=bowtie.git;a=commitdiff_plain;h=refs%2Fheads%2Fmaster Commit patch to not break on spaces. --- diff --git a/debian/changelog b/debian/changelog index 8c0543a..84dc9c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +bowtie (0.12.7-3~ppa1) UNRELEASED; urgency=low + + * Patch sam.cpp to not stop writing the header on the first space. + + -- Diane Trout Thu, 06 Dec 2012 12:08:23 -0800 + bowtie (0.12.7-3) unstable; urgency=low * debian/patches/use-dpkg-buildflags.patch: Regard LDFLAGS/CPPFLAGS diff --git a/debian/patches/series b/debian/patches/series index 9982159..89efa8e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ +spaces-in-sam gcc-4.7.patch use-dpkg-buildflags.patch diff --git a/debian/patches/spaces-in-sam b/debian/patches/spaces-in-sam new file mode 100644 index 0000000..62bc5b9 --- /dev/null +++ b/debian/patches/spaces-in-sam @@ -0,0 +1,34 @@ +Index: bowtie/sam.cpp +=================================================================== +--- bowtie.orig/sam.cpp 2012-12-06 12:06:23.118153141 -0800 ++++ bowtie/sam.cpp 2012-12-06 12:07:16.122153504 -0800 +@@ -51,6 +51,14 @@ + os.writeString(ss.str()); + } + ++static inline int iseol(int c) ++{ ++ if (c == '\n' || c == '\r') { ++ return true; ++ } ++ return false; ++} ++ + /** + * Append a SAM output record for an unaligned read. + */ +@@ -68,12 +76,12 @@ + if(h.mate > 0) { + // truncate final 2 chars + for(int i = 0; i < (int)seqan::length(h.patName)-2; i++) { +- if(isspace(h.patName[i])) break; ++ if(iseol(h.patName[i])) break; + ss << h.patName[i]; + } + } else { + for(int i = 0; i < (int)seqan::length(h.patName); i++) { +- if(isspace(h.patName[i])) break; ++ if(iseol(h.patName[i])) break; + ss << h.patName[i]; + } + }