[med-svn] [libseqlib] 01/01: Trying to adapt to patches of Debian fermi-lite

Andreas Tille tille at debian.org
Thu Feb 2 17:42:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository libseqlib.

commit ec624861da9ad1f9a267b0a19068b971a9bcbd5a
Author: Andreas Tille <tille at debian.org>
Date:   Thu Feb 2 18:41:52 2017 +0100

    Trying to adapt to patches of Debian fermi-lite
---
 debian/patches/adapt_to_debian_fermi-lite.patch | 169 ++++++++++++++++++++++++
 debian/patches/fix_missing_declaration.patch    |  11 ++
 debian/patches/series                           |   4 +-
 3 files changed, 183 insertions(+), 1 deletion(-)

diff --git a/debian/patches/adapt_to_debian_fermi-lite.patch b/debian/patches/adapt_to_debian_fermi-lite.patch
new file mode 100644
index 0000000..4d7a8ee
--- /dev/null
+++ b/debian/patches/adapt_to_debian_fermi-lite.patch
@@ -0,0 +1,169 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Fri, 27 Jan 2017 13:18:48 +0100
+Description: In Debian's fermi-lite 0.1-3 a name space pollution with
+ bwa was resolved.  This solution was different to the one libseqlib
+ author was doing in his private copy of fermi-lite
+
+--- a/SeqLib/BFC.h
++++ b/SeqLib/BFC.h
+@@ -129,7 +129,7 @@ namespace SeqLib {
+     float kcov;
+ 
+     // reads to correct in place
+-    fseq1_t * m_seqs;
++    fml_seq1_t * m_seqs;
+ 
+     // number of sequeces
+     size_t n_seqs;
+--- a/SeqLib/FermiAssembler.h
++++ b/SeqLib/FermiAssembler.h
+@@ -117,7 +117,7 @@ namespace SeqLib {
+   private:
+ 
+     // reads to assemble
+-    fseq1_t *m_seqs;
++    fml_seq1_t *m_seqs;
+   
+     // size of m_seqs
+     size_t m;
+--- a/src/BFC.cpp
++++ b/src/BFC.cpp
+@@ -31,6 +31,7 @@ SOFTWARE.
+ */
+ 
+ #include "SeqLib/BFC.h"
++#include <bfc.h>
+ 
+ #include <stdexcept>
+ #include <algorithm>
+@@ -43,7 +44,7 @@ namespace SeqLib {
+       return false;
+     
+     m_seqs_size = n;
+-    m_seqs = (fseq1_t*)realloc(m_seqs, n * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)realloc(m_seqs, n * sizeof(fml_seq1_t));
+ 
+     if (!m_seqs)
+       return false;
+@@ -78,12 +79,12 @@ namespace SeqLib {
+     // do the intial allocation
+     if (n_seqs == 0 && !m_seqs) {
+       m_seqs_size = 32;
+-      m_seqs = (fseq1_t*)malloc(m_seqs_size * sizeof(fseq1_t));
++      m_seqs = (fml_seq1_t*)malloc(m_seqs_size * sizeof(fml_seq1_t));
+     }
+     // realloc if not enough space
+     else if (n_seqs >= m_seqs_size) {
+       m_seqs_size = 2 * m_seqs_size;
+-      m_seqs = (fseq1_t*)realloc(m_seqs, m_seqs_size * sizeof(fseq1_t));
++      m_seqs = (fml_seq1_t*)realloc(m_seqs, m_seqs_size * sizeof(fml_seq1_t));
+     }
+ 
+     if (!m_seqs)
+@@ -96,7 +97,7 @@ namespace SeqLib {
+     if (!strlen(seq))
+       return false;
+ 
+-    fseq1_t *s;
++    fml_seq1_t *s;
+     
+     s = &m_seqs[n_seqs];
+     
+@@ -245,12 +246,12 @@ namespace SeqLib {
+   void BFC::allocate_sequences_from_char(const std::vector<char*>& v) {
+ 
+     m_seqs_size = v.size();
+-    m_seqs = (fseq1_t*)malloc(v.size() * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)malloc(v.size() * sizeof(fml_seq1_t));
+     
+     uint64_t size = 0;
+     for (std::vector<char*>::const_iterator r = v.begin(); r != v.end(); ++r) {
+     //    for (auto& r : v) {
+-      fseq1_t *s;
++      fml_seq1_t *s;
+       
+       s = &m_seqs[n_seqs];
+       
+@@ -268,14 +269,14 @@ namespace SeqLib {
+       
+     // alloc the memory
+     m_seqs_size = brv.size();
+-    m_seqs = (fseq1_t*)malloc(brv.size() * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)malloc(brv.size() * sizeof(fml_seq1_t));
+     
+     uint64_t size = 0;
+     for (BamRecordVector::const_iterator r = brv.begin(); r != brv.end(); ++r) {
+       //    for (auto& r : brv) {
+       m_names.push_back(strdup(r->Qname().c_str()));
+ 
+-      fseq1_t *s;
++      fml_seq1_t *s;
+       
+       s = &m_seqs[n_seqs];
+ 
+--- a/src/FermiAssembler.cpp
++++ b/src/FermiAssembler.cpp
+@@ -41,13 +41,13 @@ namespace SeqLib {
+     // dynamically alloc the memory
+     if (m <= n_seqs)
+       m = m <= 0 ? 32 : (m*2); // if out of mem, double it
+-    m_seqs = (fseq1_t*)realloc(m_seqs, m * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)realloc(m_seqs, m * sizeof(fml_seq1_t));
+     
+     // add the name
+     m_names.push_back(r.Name);
+ 
+     // construct the seq
+-    fseq1_t *s;
++    fml_seq1_t *s;
+     s = &m_seqs[n_seqs];
+     s->seq   = strdup(r.Seq.c_str());
+     s->qual = r.Qual.empty() ? NULL : strdup(r.Qual.c_str());
+@@ -61,11 +61,11 @@ namespace SeqLib {
+ 
+     // alloc the memory
+     m = n_seqs + v.size();
+-    m_seqs = (fseq1_t*)realloc(m_seqs, m * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)realloc(m_seqs, m * sizeof(fml_seq1_t));
+ 
+     for (UnalignedSequenceVector::const_iterator r = v.begin(); r != v.end(); ++r) {
+       m_names.push_back(r->Name);
+-      fseq1_t *s;
++      fml_seq1_t *s;
+ 
+       s = &m_seqs[n_seqs];
+ 
+@@ -81,13 +81,13 @@ namespace SeqLib {
+   void FermiAssembler::AddReads(const BamRecordVector& brv) {
+ 
+     // alloc the memory
+-    m_seqs = (fseq1_t*)realloc(m_seqs, (n_seqs + brv.size()) * sizeof(fseq1_t));
++    m_seqs = (fml_seq1_t*)realloc(m_seqs, (n_seqs + brv.size()) * sizeof(fml_seq1_t));
+ 
+     int m = 0;
+     uint64_t size = 0;
+     for (BamRecordVector::const_iterator r = brv.begin(); r != brv.end(); ++r) {
+       m_names.push_back(r->Qname());
+-      fseq1_t *s;
++      fml_seq1_t *s;
+       
+       s = &m_seqs[n_seqs];
+       
+@@ -111,7 +111,7 @@ namespace SeqLib {
+       return; //already cleared
+ 
+     for (size_t i = 0; i < n_seqs; ++i) {
+-      fseq1_t * s = &m_seqs[i];
++      fml_seq1_t * s = &m_seqs[i];
+       if (s->qual)
+        free(s->qual); 
+       s->qual = NULL;
+@@ -164,7 +164,7 @@ namespace SeqLib {
+     
+     UnalignedSequenceVector r;
+     for (size_t i = 0; i < n_seqs; ++i) {
+-      fseq1_t * s = &m_seqs[i];
++      fml_seq1_t * s = &m_seqs[i];
+       UnalignedSequence read;
+       if (s->seq)
+ 	read.Seq = (std::string(s->seq));
diff --git a/debian/patches/fix_missing_declaration.patch b/debian/patches/fix_missing_declaration.patch
new file mode 100644
index 0000000..de6b94c
--- /dev/null
+++ b/debian/patches/fix_missing_declaration.patch
@@ -0,0 +1,11 @@
+--- a/src/BFC.cpp
++++ b/src/BFC.cpp
+@@ -348,7 +348,7 @@ namespace SeqLib {
+     // bfc_ch_t *ch; // set in BFC.h
+     
+     // do the counting
+-    ch = fml_count(n_seqs, m_seqs, bfc_opt.k, bfc_opt.q, bfc_opt.l_pre, bfc_opt.n_threads);
++    int ch = fml_count(n_seqs, m_seqs, bfc_opt.k, bfc_opt.q, bfc_opt.l_pre, bfc_opt.n_threads);
+ 
+ #ifdef DEBUG_BFC
+     // size of random hash value
diff --git a/debian/patches/series b/debian/patches/series
index 8c62d80..04f0f2c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,6 @@
 use_debian_packaged_libs.patch
+adapt_to_debian_fermi-lite.patch
 fix_fermi-lite_usage.patch
 fix_htslib_usage.patch
-remove_duplicated_typedefs.patch
+# remove_duplicated_typedefs.patch
+# fix_missing_declaration.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libseqlib.git



More information about the debian-med-commit mailing list