Update patches
Andreas Tille
3 years ago
108 | 108 | --- a/misc.c |
109 | 109 | +++ b/misc.c |
110 | 110 | @@ -40,7 +40,7 @@ void fml_opt_init(fml_opt_t *opt) |
111 | opt->mag_opt.flag = MAG_F_NO_SIMPL; | |
111 | opt->mag_opt.flag = MAG_F_NO_SIMPL | MAG_F_POPOPEN; | |
112 | 112 | } |
113 | 113 | |
114 | 114 | -void fml_opt_adjust(fml_opt_t *opt, int n_seqs, const bseq1_t *seqs) |
125 | 125 | { |
126 | 126 | mrope_t *mr; |
127 | 127 | kstring_t str = {0,0,0}; |
128 | @@ -75,7 +75,7 @@ struct rld_t *fml_fmi_gen(int n, bseq1_t | |
128 | @@ -80,7 +80,7 @@ struct rld_t *fml_fmi_gen(int n, bseq1_t | |
129 | 129 | mr = mr_init(ROPE_DEF_MAX_NODES, ROPE_DEF_BLOCK_LEN, MR_SO_RCLO); |
130 | 130 | for (k = 0; k < n; ++k) { |
131 | 131 | int i; |
134 | 134 | if (s->l_seq == 0) continue; |
135 | 135 | free(s->qual); |
136 | 136 | for (i = 0; i < s->l_seq; ++i) |
137 | @@ -116,7 +116,7 @@ struct rld_t *fml_fmi_gen(int n, bseq1_t | |
137 | @@ -121,7 +121,7 @@ struct rld_t *fml_fmi_gen(int n, bseq1_t | |
138 | 138 | return e; |
139 | 139 | } |
140 | 140 | |
143 | 143 | { |
144 | 144 | return fml_fmi_gen(n, seq, opt->n_threads > 1? 1 : 0); |
145 | 145 | } |
146 | @@ -251,7 +251,7 @@ void fml_utg_destroy(int n, fml_utg_t *u | |
146 | @@ -277,7 +277,7 @@ void fml_utg_destroy(int n, fml_utg_t *u | |
147 | 147 | |
148 | 148 | #define MAG_MIN_NSR_COEF .1 |
149 | 149 | |
157 | 157 | @@ -7,7 +7,7 @@ int main(int argc, char *argv[]) |
158 | 158 | { |
159 | 159 | fml_opt_t opt; |
160 | int c, n_seqs, n_utg; | |
160 | int c, n_seqs, n_utg, gfa_out = 0; | |
161 | 161 | - bseq1_t *seqs; |
162 | 162 | + fml_seq1_t *seqs; |
163 | 163 | fml_utg_t *utg; |
164 | 164 | |
165 | 165 | fml_opt_init(&opt); |
166 | @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) | |
167 | fprintf(stderr, " -A discard heterozygotes (apply this to assemble bacterial genomes)\n"); | |
166 | @@ -41,7 +41,7 @@ int main(int argc, char *argv[]) | |
167 | fprintf(stderr, " -g output the assembly graph in the GFA format\n"); | |
168 | 168 | return 1; |
169 | 169 | } |
170 | 170 | - seqs = bseq_read(argv[optind], &n_seqs); |
171 | 171 | + seqs = fml_seq_read(argv[optind], &n_seqs); |
172 | 172 | utg = fml_assemble(&opt, n_seqs, seqs, &n_utg); |
173 | fml_utg_print(n_utg, utg); | |
174 | fml_utg_destroy(n_utg, utg); | |
173 | if (!gfa_out) fml_utg_print(n_utg, utg); | |
174 | else fml_utg_print_gfa(n_utg, utg); | |
175 | 175 | --- a/internal.h |
176 | 176 | +++ b/internal.h |
177 | 177 | @@ -12,7 +12,7 @@ extern "C" { |
188 | 188 | @@ -8,7 +8,7 @@ |
189 | 189 | typedef struct { |
190 | 190 | int32_t l_seq; |
191 | char *seq, *qual; | |
191 | char *seq, *qual; // NULL-terminated strings; length expected to match $l_seq | |
192 | 192 | -} bseq1_t; |
193 | 193 | +} fml_seq1_t; |
194 | 194 | |
195 | #define MAG_F_AGGRESSIVE 0x20 | |
196 | #define MAG_F_NO_SIMPL 0x80 | |
197 | @@ -60,7 +60,7 @@ extern "C" { | |
195 | #define MAG_F_AGGRESSIVE 0x20 // pop variant bubbles (not default) | |
196 | #define MAG_F_POPOPEN 0x40 // aggressive tip trimming (default) | |
197 | @@ -63,7 +63,7 @@ extern "C" { | |
198 | 198 | * |
199 | 199 | * @return array of sequences |
200 | 200 | */ |
203 | 203 | |
204 | 204 | /** |
205 | 205 | * Initialize default parameters |
206 | @@ -79,7 +79,7 @@ void fml_opt_init(fml_opt_t *opt); | |
206 | @@ -82,7 +82,7 @@ void fml_opt_init(fml_opt_t *opt); | |
207 | 207 | * |
208 | 208 | * @return array of unitigs |
209 | 209 | */ |
212 | 212 | |
213 | 213 | /** |
214 | 214 | * Free unitigs |
215 | @@ -100,7 +100,7 @@ void fml_utg_destroy(int n_utg, fml_utg_ | |
215 | @@ -103,7 +103,7 @@ void fml_utg_destroy(int n_utg, fml_utg_ | |
216 | 216 | * @param n_seqs number of sequences |
217 | 217 | * @param seqs array of sequences |
218 | 218 | */ |
221 | 221 | |
222 | 222 | /** |
223 | 223 | * Error correction |
224 | @@ -111,8 +111,8 @@ void fml_opt_adjust(fml_opt_t *opt, int | |
224 | @@ -114,8 +114,8 @@ void fml_opt_adjust(fml_opt_t *opt, int | |
225 | 225 | * |
226 | 226 | * @return k-mer coverage |
227 | 227 | */ |
232 | 232 | |
233 | 233 | /** |
234 | 234 | * Construct FMD-index |
235 | @@ -123,7 +123,7 @@ float fml_fltuniq(const fml_opt_t *opt, | |
236 | * | |
237 | * @return FMD-index | |
235 | @@ -126,7 +126,7 @@ float fml_fltuniq(const fml_opt_t *opt, | |
236 | * | |
237 | * @return FMD-index on success; NULL if all input sequences are zero in length | |
238 | 238 | */ |
239 | 239 | -struct rld_t *fml_seq2fmi(const fml_opt_t *opt, int n, bseq1_t *seq); |
240 | 240 | +struct rld_t *fml_seq2fmi(const fml_opt_t *opt, int n, fml_seq1_t *seq); |
243 | 243 | * Generate initial overlap graph |
244 | 244 | --- a/README.md |
245 | 245 | +++ b/README.md |
246 | @@ -29,11 +29,11 @@ sketch of the example: | |
246 | @@ -34,11 +34,11 @@ sketch of the example: | |
247 | 247 | int main(int argc, char *argv[]) |
248 | 248 | { |
249 | 249 | int i, n_seqs, n_utgs; |