Package: libseqlib / 1.1.2+dfsg-3

adapt_to_debian_fermi-lite.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Author: Andreas Tille <tille@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
@@ -117,7 +117,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 <fml/bfc.h>
 
 #include <stdexcept>
 #include <algorithm>
@@ -42,12 +43,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)
@@ -60,7 +61,7 @@ namespace SeqLib {
     if (!strlen(seq))
       return false;
 
-    fseq1_t *s;
+    fml_seq1_t *s;
     
     s = &m_seqs[n_seqs];
     
@@ -108,13 +109,13 @@ namespace SeqLib {
     assert(n_seqs == 0);
     assert(m_names.size() == 0);
 
-    m_seqs = (fseq1_t*)malloc(1 * sizeof(fseq1_t));
+    m_seqs = (fml_seq1_t*)malloc(1 * sizeof(fml_seq1_t));
     n_seqs = 1;
     
     //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[0];
     s->seq   = strdup(str.c_str());
     s->qual  = q.empty() || q.length() != str.length() ? NULL : strdup(q.c_str()); 
--- 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,12 +81,12 @@ 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));
 
     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];
       
@@ -110,7 +110,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;
@@ -163,7 +163,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));