noodles-csi 0.35.0

Coordinate-sorted index (CSI) format reader and writer
Documentation
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# Changelog

## 0.35.0 - 2024-05-16

### Changed

  * csi: Sync dependencies.

## 0.34.0 - 2024-05-08

### Changed

  * csi: Sync dependencies.

## 0.33.0 - 2024-05-02

### Changed

  * csi/io/query: Allow a generic buffered, seekable BGZF reader
    (`Query::new`).

## 0.32.0 - 2024-03-28

### Changed

  * csi: Sync dependencies.

## 0.31.0 - 2024-03-12

### Changed

  * csi: Sync dependencies.

## 0.30.0 - 2024-01-25

### Changed

  * csi: Sync dependencies.

## 0.29.0 - 2023-12-14

### Added

  * csi: Readd `BinningIndex`.

    This now encompasses a more generic interface to binning indices than
    before, as it no longer includes access to the reference sequences. Import
    `BinningIndex` if previously using `Index::min_shift`, `Index::depth`,
    `Index::header`, `Index::unplaced_unmapped_record_count`, or
    `Index::query`.

  * csi: Move `Index` under the `binning_index` module.

  * csi/binning_index/index/reference_sequence/bin: Add `Bin::add_chunk` to add
    or merge a chunk.

    `Bin` no longer has a builder.

  * csi/io/index_reader: Add type parameter for the index.

### Changed

  * csi: Raise minimum supported Rust version (MSRV) to 1.70.0.

  * csi: Increase the visibility of the `reader` module.

  * csi: Define `csi::Index` as `binning_index::Index<BinnedIndex>`.

  * csi/binning_index: Move `Indexer` under `binning_index` module.

### Removed

  * csi/binning_index/index/reference_sequence/bin: Remove `Bin::loffset`.

    First record positions for each bin is now moved to the reference sequence.

  * csi/binning_index/index/reference_sequence: Remove `Builder`.

    Use `ReferenceSequence::update` instead.

  * csi/binning_index/index/reference_sequence/bin: Remove `Builder`.

    Use `Bin::add_chunk` instead.

## 0.28.0 - 2023-11-14

### Added

  * csi/reader/index: Add read errors.

### Changed

  * csi: Rename `aux` module ([#217]).

    Windows does not allow the `aux` module to be named `aux.rs`.

[#217]: https://github.com/zaeleus/noodles/issues/217

## 0.27.0 - 2023-11-13

### Changed

  * csi/async/reader: Disallow duplicate bin IDs.

### Fixed

  * csi/reader: Fix column indices being off-by-one when reading a tabix
    header ([#215]).

  * csi/writer: Fix column indices being off-by-one when writing a tabix
    header ([#215]).

  * csi/writer: Fix writing the end position of a chunk ([#216]).

[#215]: https://github.com/zaeleus/noodles/issues/215
[#216]: https://github.com/zaeleus/noodles/issues/216

## 0.26.0 - 2023-10-26

### Changed

  * csi/index/reference_sequence: Change bins to an ordered map ([#213]).

    Bins now maintain their insertion order. While this does not directly
    affect reading and in-memory usage, it does make serialization
    deterministic.

[#213]: https://github.com/zaeleus/noodles/issues/213

## 0.25.1 - 2023-10-19

### Fixed

  * csi/index/indexer: Fix final reference sequence count when building index.

## 0.25.0 - 2023-10-12

### Changed

  * csi: Sync dependencies.

## 0.24.0 - 2023-08-31

### Changed

  * csi: Sync dependencies.

## 0.23.0 - 2023-08-17

### Changed

  * csi: Sync dependencies.

## 0.22.0 - 2023-07-06

### Changed

  * csi: Update to indexmap 2.0.0.

## 0.21.0 - 2023-06-29

### Added

  * csi/index/reference_sequence/bin: Make `Bin::max_id` and `Bin::metadata_id`
    `const`.

### Changed

  * csi/reader: Disallow duplicate bin IDs.

## 0.20.0 - 2023-06-15

### Changed

  * csi: Sync dependencies.

## 0.19.0 - 2023-06-01

### Fixed

  * csi/index/reference_sequence: Use the available linear index for the start
    position of the first record in the last linear bin ([#172]).

[#172]: https://github.com/zaeleus/noodles/issues/172

## 0.18.0 - 2023-05-18

### Added

  * csi/io: Add a filtered indexed records iterator (`FilterByRegion`).

    This filters indexed records that intersect a given region.

  * csi/io: Add an indexed records iterator (`IndexedRecords`).

    This parses lines from a reader as an indexed record.

  * csi/io: Add `IndexedRecord` trait to represent the components used to
    index a record.

    I.e., a reference sequence name, start position, and end position.

  * csi/io: Add an indexed reader (`IndexedReader`).

  * csi/io/query: Add `Query::indexed_records` to create an
    iterator of indexed records.

### Changed

  * csi/index/header: Change column indices to be 0-based.

## 0.17.0 - 2023-05-04

### Added

  * csi/io: Add `Query` reader for reading the uncompressed data between all
    the given chunks.

## 0.16.0 - 2023-04-27

### Changed

  * csi: Sync dependencies.

## 0.15.0 - 2023-04-06

### Added

  * csi/async: Add a convenience write function to write an index to a file
    (`csi::r#async::write`).

  * csi/index: Add an indexer (`csi::index::Indexer`) ([#157]).

  * csi/index: Add `Header`.

    This is the same structure as a tabix header. It was moved from
    `noodles_tabix::index::Header`.

  * csi/index/reference_sequence: Add a linear index
    (`ReferenceSequence::linear_index`).

    This is optional and may be preferred over bin linear offsets.

  * csi/index/reference_sequence/builder: Build linear index.

[#157]: https://github.com/zaeleus/noodles/issues/157

### Changed

  * csi/index: Replace `aux` with an optional tabix header
    (`Option<csi::index::Header>`).

    It isn't clear what `aux` is supposed to be used for, so noodles-csi
    assumes if it's set, it's a tabix header.

  * csi/index: Optimize chunks from `Index::query`.

  * csi/index/reference_sequence: Increase the visibility of `Builder`.

  * csi/index/reference_sequence: Change bins to a `HashMap<usize, Bin>`.

    `Bin` no longer holds its bin ID.

  * csi/index/reference_sequence/bin: Increase the visibility of `Builder`.

### Removed

  * csi: Remove `BinningIndex`.

    `csi::Index` is now the only concrete implementation of a binning index.

## 0.14.0 - 2023-03-03

### Changed

  * csi: Sync dependencies.

## 0.13.0 - 2023-02-03

### Changed

  * csi: Raise minimum supported Rust version (MSRV) to 1.64.0.

### Removed

  * csi: Remove `BinningIndexReferenceSequence`.

    This was deprecated in noodles-csi 0.4.0. Use
    `noodles_csi::binning_index::ReferenceSequenceExt` instead.

  * csi/index: Remove `Index::unmapped_read_count`.

    This was deprecated in noodles-csi 0.2.0. Use
    `Index::unplaced_unmapped_record_count` instead.

  * csi/index/builder: Remove `Index::set_n_no_coor`.

    This was deprecated in noodles-csi 0.2.0. Use
    `Builder::set_unplaced_unmapped_record_count` instead.

## 0.12.0 - 2022-11-18

### Changed

  * csi: Sync dependencies.

## 0.11.0 - 2022-10-28

### Changed

  * csi: Sync dependencies.

## 0.10.0 - 2022-10-20

### Changed

  * csi: Sync dependencies.

## 0.9.1 - 2022-09-29

### Fixed

  * csi: Sync dependencies.

## 0.9.0 - 2022-08-16

### Changed

  * csi: Raise minimum supported Rust version (MSRV) to 1.57.0.

## 0.8.0 - 2022-07-05

### Added

  * csi/index/reference_sequence: Add finding the minimum start virtual
    position for a bin (`ReferenceSequence::min_offset`).

  * csi/index/reference_sequence/bin/chunk: Implement
    `From<Range<bgzf::VirtualPosition>>` for `Chunk`.

### Fixed

  * csi/index/reference_sequence: Fix finding the start position of the first
    record in the last linear bin.

    The bins are not necessarily sorted.

## 0.7.0 - 2022-06-08

### Changed

  * csi/binning_index: Change generic reference sequence type to an associated
    type.

  * csi/binning_index: Change query interval to `Into<Interval>`.

  * csi/index/reference_sequence/bin: Change bin ID to a `usize`.

## 0.6.0 - 2022-03-29

### Changed

  * csi/binning_index: Change interval bounds to `Position`.

  * csi/index: Change `min_shift` and `depth` to a `u8`.

  * csi/index/reference_sequence: `ReferenceSequence::query` returns an
    `io::Error` instead of `QueryError`.

### Fixed

  * csi/index/reference_sequence: Ensure the start position is not out of range
    for a query.

## 0.5.1 - 2022-03-02

### Fixed

  * csi: Sync dependencies.

## 0.5.0 - 2022-02-17

### Added

  * csi: Set minimum supported Rust version (MSRV) to 1.56.0 in package
    manifest.

## 0.4.3 - 2022-01-27

### Fixed

  * csi: Sync dependencies.

## 0.4.2 - 2021-12-02

### Fixed

  * csi: Require tokio's `fs` feature as a dependency ([#62]).

[#62]: https://github.com/zaeleus/noodles/issues/62

## 0.4.1 - 2021-11-18

### Fixed

  * csi: Sync dependencies.

## 0.4.0 - 2021-11-11

### Changed

  * csi: Update to Rust 2021.

### Deprecated

  * csi/binning_index: Rename `csi::BinningIndexReferenceSequence` to
    `csi::binning_index::ReferenceSequenceExt`.

## 0.3.0 - 2021-08-19

### Added

  * csi/async: Add async reader (`csi::AsyncReader`).

  * csi/async: Add async writer (`csi::AsyncWriter`).

    Async I/O can be enabled with the `async` feature.

## 0.2.2 - 2021-08-11

### Fixed

  * csi: Sync dependencies.

## 0.2.1 - 2021-07-30

### Fixed

  * csi/reader: Return I/O errors when failing to read `n_no_coor`.

    This previously ignored all I/O errors but now only catches
    `UnexpectedEof`.

## 0.2.0 - 2021-07-21

### Added

  * csi: Add convenience function to write an entire index to a file:
    `csi::write`.

  * csi/binning_index: Added chunk merging functions for chunk list reduction
    (`noodles_csi::binning_index::{merge_chunks, optimize_chunks}`).

    Chunks are merged when they overlap and can be filtered by a minimum
    offset.

  * csi/binning_index: Added `BinningIndex` and `BinningIndexReferenceSequence`
    traits to define shared behavior among binning index formats.

  * csi/binning_index: Added `first_record_in_last_linear_bin_start_position`.

    This is the closest position to the unplaced, unmapped records, if any,
    that is available in an index.

  * csi/index: Implemented `BinningIndex` for `Index`.

  * csi/index: Added `query` method to find chunks that intersect the given
    region.

  * csi/index/reference_sequence: Implemented `BinningIndexReferenceSequence`
    for `ReferenceSequence`.

### Deprecated

  * csi/index: Deprecated `Index::unmapped_read_count`.

    Use `unplaced_unmapped_record_count` instead.

  * csi/index/builder: Deprecated `Builder::set_n_no_coor`.

    Use `set_unplaced_unmapped_record_count` instead.

### Fixed

  * csi: Fixed documentation link in package manifest ([#31]).

[#31]: https://github.com/zaeleus/noodles/issues/31

## 0.1.0 - 2021-07-14

  * csi: Initial release.