minimap2 0.0.4 → 0.2.23.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +113 -98
  3. data/ext/Rakefile +41 -0
  4. data/ext/cmappy/cmappy.c +129 -0
  5. data/ext/cmappy/cmappy.h +44 -0
  6. data/ext/minimap2/FAQ.md +46 -0
  7. data/ext/minimap2/LICENSE.txt +24 -0
  8. data/ext/minimap2/MANIFEST.in +10 -0
  9. data/ext/minimap2/Makefile +132 -0
  10. data/ext/minimap2/Makefile.simde +97 -0
  11. data/ext/minimap2/NEWS.md +807 -0
  12. data/ext/minimap2/README.md +403 -0
  13. data/ext/minimap2/align.c +1020 -0
  14. data/ext/minimap2/bseq.c +169 -0
  15. data/ext/minimap2/bseq.h +64 -0
  16. data/ext/minimap2/code_of_conduct.md +30 -0
  17. data/ext/minimap2/cookbook.md +243 -0
  18. data/ext/minimap2/esterr.c +64 -0
  19. data/ext/minimap2/example.c +63 -0
  20. data/ext/minimap2/format.c +559 -0
  21. data/ext/minimap2/hit.c +466 -0
  22. data/ext/minimap2/index.c +775 -0
  23. data/ext/minimap2/kalloc.c +205 -0
  24. data/ext/minimap2/kalloc.h +76 -0
  25. data/ext/minimap2/kdq.h +132 -0
  26. data/ext/minimap2/ketopt.h +120 -0
  27. data/ext/minimap2/khash.h +615 -0
  28. data/ext/minimap2/krmq.h +474 -0
  29. data/ext/minimap2/kseq.h +256 -0
  30. data/ext/minimap2/ksort.h +153 -0
  31. data/ext/minimap2/ksw2.h +184 -0
  32. data/ext/minimap2/ksw2_dispatch.c +96 -0
  33. data/ext/minimap2/ksw2_extd2_sse.c +402 -0
  34. data/ext/minimap2/ksw2_exts2_sse.c +416 -0
  35. data/ext/minimap2/ksw2_extz2_sse.c +313 -0
  36. data/ext/minimap2/ksw2_ll_sse.c +152 -0
  37. data/ext/minimap2/kthread.c +159 -0
  38. data/ext/minimap2/kthread.h +15 -0
  39. data/ext/minimap2/kvec.h +105 -0
  40. data/ext/minimap2/lchain.c +344 -0
  41. data/ext/minimap2/main.c +455 -0
  42. data/ext/minimap2/map.c +714 -0
  43. data/ext/minimap2/minimap.h +409 -0
  44. data/ext/minimap2/minimap2.1 +722 -0
  45. data/ext/minimap2/misc/README.md +179 -0
  46. data/ext/minimap2/misc/mmphase.js +335 -0
  47. data/ext/minimap2/misc/paftools.js +3149 -0
  48. data/ext/minimap2/misc.c +162 -0
  49. data/ext/minimap2/mmpriv.h +131 -0
  50. data/ext/minimap2/options.c +233 -0
  51. data/ext/minimap2/pe.c +177 -0
  52. data/ext/minimap2/python/README.rst +196 -0
  53. data/ext/minimap2/python/cmappy.h +152 -0
  54. data/ext/minimap2/python/cmappy.pxd +153 -0
  55. data/ext/minimap2/python/mappy.pyx +273 -0
  56. data/ext/minimap2/python/minimap2.py +39 -0
  57. data/ext/minimap2/sdust.c +213 -0
  58. data/ext/minimap2/sdust.h +25 -0
  59. data/ext/minimap2/seed.c +131 -0
  60. data/ext/minimap2/setup.py +55 -0
  61. data/ext/minimap2/sketch.c +143 -0
  62. data/ext/minimap2/splitidx.c +84 -0
  63. data/ext/minimap2/sse2neon/emmintrin.h +1689 -0
  64. data/ext/minimap2/test/MT-human.fa +278 -0
  65. data/ext/minimap2/test/MT-orang.fa +276 -0
  66. data/ext/minimap2/test/q-inv.fa +4 -0
  67. data/ext/minimap2/test/q2.fa +2 -0
  68. data/ext/minimap2/test/t-inv.fa +127 -0
  69. data/ext/minimap2/test/t2.fa +2 -0
  70. data/ext/minimap2/tex/Makefile +21 -0
  71. data/ext/minimap2/tex/bioinfo.cls +930 -0
  72. data/ext/minimap2/tex/blasr-mc.eval +17 -0
  73. data/ext/minimap2/tex/bowtie2-s3.sam.eval +28 -0
  74. data/ext/minimap2/tex/bwa-s3.sam.eval +52 -0
  75. data/ext/minimap2/tex/bwa.eval +55 -0
  76. data/ext/minimap2/tex/eval2roc.pl +33 -0
  77. data/ext/minimap2/tex/graphmap.eval +4 -0
  78. data/ext/minimap2/tex/hs38-simu.sh +10 -0
  79. data/ext/minimap2/tex/minialign.eval +49 -0
  80. data/ext/minimap2/tex/minimap2.bib +460 -0
  81. data/ext/minimap2/tex/minimap2.tex +724 -0
  82. data/ext/minimap2/tex/mm2-s3.sam.eval +62 -0
  83. data/ext/minimap2/tex/mm2-update.tex +240 -0
  84. data/ext/minimap2/tex/mm2.approx.eval +12 -0
  85. data/ext/minimap2/tex/mm2.eval +13 -0
  86. data/ext/minimap2/tex/natbib.bst +1288 -0
  87. data/ext/minimap2/tex/natbib.sty +803 -0
  88. data/ext/minimap2/tex/ngmlr.eval +38 -0
  89. data/ext/minimap2/tex/roc.gp +60 -0
  90. data/ext/minimap2/tex/snap-s3.sam.eval +62 -0
  91. data/ext/minimap2.patch +19 -0
  92. data/ext/vendor/libminimap2.so +0 -0
  93. data/lib/minimap2/aligner.rb +16 -5
  94. data/lib/minimap2/alignment.rb +6 -2
  95. data/lib/minimap2/ffi/constants.rb +74 -53
  96. data/lib/minimap2/ffi/functions.rb +5 -0
  97. data/lib/minimap2/ffi.rb +1 -2
  98. data/lib/minimap2/version.rb +2 -1
  99. data/lib/minimap2.rb +67 -22
  100. metadata +98 -64
  101. data/lib/minimap2/ffi_helper.rb +0 -53
@@ -0,0 +1,409 @@
1
+ #ifndef MINIMAP2_H
2
+ #define MINIMAP2_H
3
+
4
+ #include <stdint.h>
5
+ #include <stdio.h>
6
+ #include <sys/types.h>
7
+
8
+ #define MM_F_NO_DIAG 0x001 // no exact diagonal hit
9
+ #define MM_F_NO_DUAL 0x002 // skip pairs where query name is lexicographically larger than target name
10
+ #define MM_F_CIGAR 0x004
11
+ #define MM_F_OUT_SAM 0x008
12
+ #define MM_F_NO_QUAL 0x010
13
+ #define MM_F_OUT_CG 0x020
14
+ #define MM_F_OUT_CS 0x040
15
+ #define MM_F_SPLICE 0x080 // splice mode
16
+ #define MM_F_SPLICE_FOR 0x100 // match GT-AG
17
+ #define MM_F_SPLICE_REV 0x200 // match CT-AC, the reverse complement of GT-AG
18
+ #define MM_F_NO_LJOIN 0x400
19
+ #define MM_F_OUT_CS_LONG 0x800
20
+ #define MM_F_SR 0x1000
21
+ #define MM_F_FRAG_MODE 0x2000
22
+ #define MM_F_NO_PRINT_2ND 0x4000
23
+ #define MM_F_2_IO_THREADS 0x8000
24
+ #define MM_F_LONG_CIGAR 0x10000
25
+ #define MM_F_INDEPEND_SEG 0x20000
26
+ #define MM_F_SPLICE_FLANK 0x40000
27
+ #define MM_F_SOFTCLIP 0x80000
28
+ #define MM_F_FOR_ONLY 0x100000
29
+ #define MM_F_REV_ONLY 0x200000
30
+ #define MM_F_HEAP_SORT 0x400000
31
+ #define MM_F_ALL_CHAINS 0x800000
32
+ #define MM_F_OUT_MD 0x1000000
33
+ #define MM_F_COPY_COMMENT 0x2000000
34
+ #define MM_F_EQX 0x4000000 // use =/X instead of M
35
+ #define MM_F_PAF_NO_HIT 0x8000000 // output unmapped reads to PAF
36
+ #define MM_F_NO_END_FLT 0x10000000
37
+ #define MM_F_HARD_MLEVEL 0x20000000
38
+ #define MM_F_SAM_HIT_ONLY 0x40000000
39
+ #define MM_F_RMQ (0x80000000LL)
40
+ #define MM_F_QSTRAND (0x100000000LL)
41
+ #define MM_F_NO_INV (0x200000000LL)
42
+
43
+ #define MM_I_HPC 0x1
44
+ #define MM_I_NO_SEQ 0x2
45
+ #define MM_I_NO_NAME 0x4
46
+
47
+ #define MM_IDX_MAGIC "MMI\2"
48
+
49
+ #define MM_MAX_SEG 255
50
+
51
+ #define MM_CIGAR_MATCH 0
52
+ #define MM_CIGAR_INS 1
53
+ #define MM_CIGAR_DEL 2
54
+ #define MM_CIGAR_N_SKIP 3
55
+ #define MM_CIGAR_SOFTCLIP 4
56
+ #define MM_CIGAR_HARDCLIP 5
57
+ #define MM_CIGAR_PADDING 6
58
+ #define MM_CIGAR_EQ_MATCH 7
59
+ #define MM_CIGAR_X_MISMATCH 8
60
+
61
+ #define MM_CIGAR_STR "MIDNSHP=XB"
62
+
63
+ #ifdef __cplusplus
64
+ extern "C" {
65
+ #endif
66
+
67
+ // emulate 128-bit integers and arrays
68
+ typedef struct { uint64_t x, y; } mm128_t;
69
+ typedef struct { size_t n, m; mm128_t *a; } mm128_v;
70
+
71
+ // minimap2 index
72
+ typedef struct {
73
+ char *name; // name of the db sequence
74
+ uint64_t offset; // offset in mm_idx_t::S
75
+ uint32_t len; // length
76
+ uint32_t is_alt;
77
+ } mm_idx_seq_t;
78
+
79
+ typedef struct {
80
+ int32_t b, w, k, flag;
81
+ uint32_t n_seq; // number of reference sequences
82
+ int32_t index;
83
+ int32_t n_alt;
84
+ mm_idx_seq_t *seq; // sequence name, length and offset
85
+ uint32_t *S; // 4-bit packed sequence
86
+ struct mm_idx_bucket_s *B; // index (hidden)
87
+ struct mm_idx_intv_s *I; // intervals (hidden)
88
+ void *km, *h;
89
+ } mm_idx_t;
90
+
91
+ // minimap2 alignment
92
+ typedef struct {
93
+ uint32_t capacity; // the capacity of cigar[]
94
+ int32_t dp_score, dp_max, dp_max2; // DP score; score of the max-scoring segment; score of the best alternate mappings
95
+ uint32_t n_ambi:30, trans_strand:2; // number of ambiguous bases; transcript strand: 0 for unknown, 1 for +, 2 for -
96
+ uint32_t n_cigar; // number of cigar operations in cigar[]
97
+ uint32_t cigar[];
98
+ } mm_extra_t;
99
+
100
+ typedef struct {
101
+ int32_t id; // ID for internal uses (see also parent below)
102
+ int32_t cnt; // number of minimizers; if on the reverse strand
103
+ int32_t rid; // reference index; if this is an alignment from inversion rescue
104
+ int32_t score; // DP alignment score
105
+ int32_t qs, qe, rs, re; // query start and end; reference start and end
106
+ int32_t parent, subsc; // parent==id if primary; best alternate mapping score
107
+ int32_t as; // offset in the a[] array (for internal uses only)
108
+ int32_t mlen, blen; // seeded exact match length; seeded alignment block length
109
+ int32_t n_sub; // number of suboptimal mappings
110
+ int32_t score0; // initial chaining score (before chain merging/spliting)
111
+ uint32_t mapq:8, split:2, rev:1, inv:1, sam_pri:1, proper_frag:1, pe_thru:1, seg_split:1, seg_id:8, split_inv:1, is_alt:1, strand_retained:1, dummy:5;
112
+ uint32_t hash;
113
+ float div;
114
+ mm_extra_t *p;
115
+ } mm_reg1_t;
116
+
117
+ // indexing and mapping options
118
+ typedef struct {
119
+ short k, w, flag, bucket_bits;
120
+ int64_t mini_batch_size;
121
+ uint64_t batch_size;
122
+ } mm_idxopt_t;
123
+
124
+ typedef struct {
125
+ int64_t flag; // see MM_F_* macros
126
+ int seed;
127
+ int sdust_thres; // score threshold for SDUST; 0 to disable
128
+
129
+ int max_qlen; // max query length
130
+
131
+ int bw, bw_long; // bandwidth
132
+ int max_gap, max_gap_ref; // break a chain if there are no minimizers in a max_gap window
133
+ int max_frag_len;
134
+ int max_chain_skip, max_chain_iter;
135
+ int min_cnt; // min number of minimizers on each chain
136
+ int min_chain_score; // min chaining score
137
+ float chain_gap_scale;
138
+ float chain_skip_scale;
139
+ int rmq_size_cap, rmq_inner_dist;
140
+ int rmq_rescue_size;
141
+ float rmq_rescue_ratio;
142
+
143
+ float mask_level;
144
+ int mask_len;
145
+ float pri_ratio;
146
+ int best_n; // top best_n chains are subjected to DP alignment
147
+
148
+ float alt_drop;
149
+
150
+ int a, b, q, e, q2, e2; // matching score, mismatch, gap-open and gap-ext penalties
151
+ int sc_ambi; // score when one or both bases are "N"
152
+ int noncan; // cost of non-canonical splicing sites
153
+ int junc_bonus;
154
+ int zdrop, zdrop_inv; // break alignment if alignment score drops too fast along the diagonal
155
+ int end_bonus;
156
+ int min_dp_max; // drop an alignment if the score of the max scoring segment is below this threshold
157
+ int min_ksw_len;
158
+ int anchor_ext_len, anchor_ext_shift;
159
+ float max_clip_ratio; // drop an alignment if BOTH ends are clipped above this ratio
160
+
161
+ int rank_min_len;
162
+ float rank_frac;
163
+
164
+ int pe_ori, pe_bonus;
165
+
166
+ float mid_occ_frac; // only used by mm_mapopt_update(); see below
167
+ float q_occ_frac;
168
+ int32_t min_mid_occ, max_mid_occ;
169
+ int32_t mid_occ; // ignore seeds with occurrences above this threshold
170
+ int32_t max_occ, max_max_occ, occ_dist;
171
+ int64_t mini_batch_size; // size of a batch of query bases to process in parallel
172
+ int64_t max_sw_mat;
173
+ int64_t cap_kalloc;
174
+
175
+ const char *split_prefix;
176
+ } mm_mapopt_t;
177
+
178
+ // index reader
179
+ typedef struct {
180
+ int is_idx, n_parts;
181
+ int64_t idx_size;
182
+ mm_idxopt_t opt;
183
+ FILE *fp_out;
184
+ union {
185
+ struct mm_bseq_file_s *seq;
186
+ FILE *idx;
187
+ } fp;
188
+ } mm_idx_reader_t;
189
+
190
+ // memory buffer for thread-local storage during mapping
191
+ typedef struct mm_tbuf_s mm_tbuf_t;
192
+
193
+ // global variables
194
+ extern int mm_verbose, mm_dbg_flag; // verbose level: 0 for no info, 1 for error, 2 for warning, 3 for message (default); debugging flag
195
+ extern double mm_realtime0; // wall-clock timer
196
+
197
+ /**
198
+ * Set default or preset parameters
199
+ *
200
+ * @param preset NULL to set all parameters as default; otherwise apply preset to affected parameters
201
+ * @param io pointer to indexing parameters
202
+ * @param mo pointer to mapping parameters
203
+ *
204
+ * @return 0 if success; -1 if _present_ unknown
205
+ */
206
+ int mm_set_opt(const char *preset, mm_idxopt_t *io, mm_mapopt_t *mo);
207
+ int mm_check_opt(const mm_idxopt_t *io, const mm_mapopt_t *mo);
208
+
209
+ /**
210
+ * Update mm_mapopt_t::mid_occ via mm_mapopt_t::mid_occ_frac
211
+ *
212
+ * If mm_mapopt_t::mid_occ is 0, this function sets it to a number such that no
213
+ * more than mm_mapopt_t::mid_occ_frac of minimizers in the index have a higher
214
+ * occurrence.
215
+ *
216
+ * @param opt mapping parameters
217
+ * @param mi minimap2 index
218
+ */
219
+ void mm_mapopt_update(mm_mapopt_t *opt, const mm_idx_t *mi);
220
+
221
+ void mm_mapopt_max_intron_len(mm_mapopt_t *opt, int max_intron_len);
222
+
223
+ /**
224
+ * Initialize an index reader
225
+ *
226
+ * @param fn index or fasta/fastq file name (this function tests the file type)
227
+ * @param opt indexing parameters
228
+ * @param fn_out if not NULL, write built index to this file
229
+ *
230
+ * @return an index reader on success; NULL if fail to open _fn_
231
+ */
232
+ mm_idx_reader_t *mm_idx_reader_open(const char *fn, const mm_idxopt_t *opt, const char *fn_out);
233
+
234
+ /**
235
+ * Read/build an index
236
+ *
237
+ * If the input file is an index file, this function reads one part of the
238
+ * index and returns. If the input file is a sequence file (fasta or fastq),
239
+ * this function constructs the index for about mm_idxopt_t::batch_size bases.
240
+ * Importantly, for a huge collection of sequences, this function may only
241
+ * return an index for part of sequences. It needs to be repeatedly called
242
+ * to traverse the entire index/sequence file.
243
+ *
244
+ * @param r index reader
245
+ * @param n_threads number of threads for constructing index
246
+ *
247
+ * @return an index on success; NULL if reaching the end of the input file
248
+ */
249
+ mm_idx_t *mm_idx_reader_read(mm_idx_reader_t *r, int n_threads);
250
+
251
+ /**
252
+ * Destroy/deallocate an index reader
253
+ *
254
+ * @param r index reader
255
+ */
256
+ void mm_idx_reader_close(mm_idx_reader_t *r);
257
+
258
+ int mm_idx_reader_eof(const mm_idx_reader_t *r);
259
+
260
+ /**
261
+ * Check whether the file contains a minimap2 index
262
+ *
263
+ * @param fn file name
264
+ *
265
+ * @return the file size if fn is an index file; 0 if fn is not.
266
+ */
267
+ int64_t mm_idx_is_idx(const char *fn);
268
+
269
+ /**
270
+ * Load a part of an index
271
+ *
272
+ * Given a uni-part index, this function loads the entire index into memory.
273
+ * Given a multi-part index, it loads one part only and places the file pointer
274
+ * at the end of that part.
275
+ *
276
+ * @param fp pointer to FILE object
277
+ *
278
+ * @return minimap2 index read from fp
279
+ */
280
+ mm_idx_t *mm_idx_load(FILE *fp);
281
+
282
+ /**
283
+ * Append an index (or one part of a full index) to file
284
+ *
285
+ * @param fp pointer to FILE object
286
+ * @param mi minimap2 index
287
+ */
288
+ void mm_idx_dump(FILE *fp, const mm_idx_t *mi);
289
+
290
+ /**
291
+ * Create an index from strings in memory
292
+ *
293
+ * @param w minimizer window size
294
+ * @param k minimizer k-mer size
295
+ * @param is_hpc use HPC k-mer if true
296
+ * @param bucket_bits number of bits for the first level of the hash table
297
+ * @param n number of sequences
298
+ * @param seq sequences in A/C/G/T
299
+ * @param name sequence names; could be NULL
300
+ *
301
+ * @return minimap2 index
302
+ */
303
+ mm_idx_t *mm_idx_str(int w, int k, int is_hpc, int bucket_bits, int n, const char **seq, const char **name);
304
+
305
+ /**
306
+ * Print index statistics to stderr
307
+ *
308
+ * @param mi minimap2 index
309
+ */
310
+ void mm_idx_stat(const mm_idx_t *idx);
311
+
312
+ /**
313
+ * Destroy/deallocate an index
314
+ *
315
+ * @param r minimap2 index
316
+ */
317
+ void mm_idx_destroy(mm_idx_t *mi);
318
+
319
+ /**
320
+ * Initialize a thread-local buffer for mapping
321
+ *
322
+ * Each mapping thread requires a buffer specific to the thread (see mm_map()
323
+ * below). The primary purpose of this buffer is to reduce frequent heap
324
+ * allocations across threads. A buffer shall not be used by two or more
325
+ * threads.
326
+ *
327
+ * @return pointer to a thread-local buffer
328
+ */
329
+ mm_tbuf_t *mm_tbuf_init(void);
330
+
331
+ /**
332
+ * Destroy/deallocate a thread-local buffer for mapping
333
+ *
334
+ * @param b the buffer
335
+ */
336
+ void mm_tbuf_destroy(mm_tbuf_t *b);
337
+
338
+ void *mm_tbuf_get_km(mm_tbuf_t *b);
339
+
340
+ /**
341
+ * Align a query sequence against an index
342
+ *
343
+ * This function possibly finds multiple alignments of the query sequence.
344
+ * The returned array and the mm_reg1_t::p field of each element are allocated
345
+ * with malloc().
346
+ *
347
+ * @param mi minimap2 index
348
+ * @param l_seq length of the query sequence
349
+ * @param seq the query sequence
350
+ * @param n_regs number of hits (out)
351
+ * @param b thread-local buffer; two mm_map() calls shall not use one buffer at the same time!
352
+ * @param opt mapping parameters
353
+ * @param name query name, used for all-vs-all overlapping and debugging
354
+ *
355
+ * @return an array of hits which need to be deallocated with free() together
356
+ * with mm_reg1_t::p of each element. The size is written to _n_regs_.
357
+ */
358
+ mm_reg1_t *mm_map(const mm_idx_t *mi, int l_seq, const char *seq, int *n_regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *name);
359
+
360
+ void mm_map_frag(const mm_idx_t *mi, int n_segs, const int *qlens, const char **seqs, int *n_regs, mm_reg1_t **regs, mm_tbuf_t *b, const mm_mapopt_t *opt, const char *qname);
361
+
362
+ /**
363
+ * Align a fasta/fastq file and print alignments to stdout
364
+ *
365
+ * @param idx minimap2 index
366
+ * @param fn fasta/fastq file name
367
+ * @param opt mapping parameters
368
+ * @param n_threads number of threads
369
+ *
370
+ * @return 0 on success; -1 if _fn_ can't be read
371
+ */
372
+ int mm_map_file(const mm_idx_t *idx, const char *fn, const mm_mapopt_t *opt, int n_threads);
373
+
374
+ int mm_map_file_frag(const mm_idx_t *idx, int n_segs, const char **fn, const mm_mapopt_t *opt, int n_threads);
375
+
376
+ /**
377
+ * Generate the cs tag (new in 2.12)
378
+ *
379
+ * @param km memory blocks; set to NULL if unsure
380
+ * @param buf buffer to write the cs/MD tag; typicall NULL on the first call
381
+ * @param max_len max length of the buffer; typically set to 0 on the first call
382
+ * @param mi index
383
+ * @param r alignment
384
+ * @param seq query sequence
385
+ * @param no_iden true to use : instead of =
386
+ *
387
+ * @return the length of cs
388
+ */
389
+ int mm_gen_cs(void *km, char **buf, int *max_len, const mm_idx_t *mi, const mm_reg1_t *r, const char *seq, int no_iden);
390
+ int mm_gen_MD(void *km, char **buf, int *max_len, const mm_idx_t *mi, const mm_reg1_t *r, const char *seq);
391
+
392
+ // query sequence name and sequence in the minimap2 index
393
+ int mm_idx_index_name(mm_idx_t *mi);
394
+ int mm_idx_name2id(const mm_idx_t *mi, const char *name);
395
+ int mm_idx_getseq(const mm_idx_t *mi, uint32_t rid, uint32_t st, uint32_t en, uint8_t *seq);
396
+
397
+ int mm_idx_alt_read(mm_idx_t *mi, const char *fn);
398
+ int mm_idx_bed_read(mm_idx_t *mi, const char *fn, int read_junc);
399
+ int mm_idx_bed_junc(const mm_idx_t *mi, int32_t ctg, int32_t st, int32_t en, uint8_t *s);
400
+
401
+ // deprecated APIs for backward compatibility
402
+ void mm_mapopt_init(mm_mapopt_t *opt);
403
+ mm_idx_t *mm_idx_build(const char *fn, int w, int k, int flag, int n_threads);
404
+
405
+ #ifdef __cplusplus
406
+ }
407
+ #endif
408
+
409
+ #endif // MINIMAP2_H