noodles-fasta 0.45.0

FASTA 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
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# Changelog

## 0.45.0 - 2024-10-22

### Added

  * fasta/async/io: Add async writer (`fasta::r#async::io::Writer`).

  * fasta/io/writer/builder: Add build from path (`Builder::build_from_path`).

### Deprecated

  * fasta: Deprecate async re-export (`AsyncReader`).

    Use `fasta::r#async::io::Reader` instead.

## 0.44.0 - 2024-09-26

### Changed

  * fasta/fai: Move reader (`Reader`) and writer (`Writer`) to `io` module.

  * fasta/fai/async: Move reader (`Reader`) to `io` module.

### Deprecated

  * fasta/fai: Deprecate `Reader` and `Writer`.

    Use `fai::io::Reader` and `fai::io::Writer`, respectively, instead.

  * fasta/fai/async: Deprecate `Reader` and `Writer`.

    Use `fai::r#async::io::Reader` instead.

## 0.43.0 - 2024-09-04

### Changed

  * fasta/io/writer/builder: Rename `Builder::build_with_writer`
    to `Builder::build_from_writer`.

### Deprecated

  * fasta/io/writer/builder: Deprecate `Builder::build_with_writer`.

    Use `Builder::build_from_writer` instead.

## 0.42.0 - 2024-08-04

### Added

  * fasta/io/writer: Add additional methods to get the underlying writer
    (`Writer::get_mut` and `Writer::into_inner`).

## 0.41.0 - 2024-07-14

### Added

  * fasta/async/io/reader: Add common methods to access the underlying reader.

  * fasta/fai/record: Implement `Clone`.

  * fasta/sequence: Add `Record` trait.

### Changed

  * fasta/fai/index: Add wrapper (`Index`).

    Use `AsRef<Vec<Record>>` to get the list of records.

## 0.40.0 - 2024-06-17

### Added

  * fasta/fai: Add common methods to access the underlying I/O ([#269]).

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

## 0.39.0 - 2024-05-31

### Changed

  * fasta: Move readers (`Reader` and `IndexedReader`), writer (`Writer`), and
    indexer (`index`) to `io` module.

  * fasta/record/sequence/complement: Allow lowercase bases ([#267]).

[#267]: https://github.com/zaeleus/noodles/pull/267

### Deprecated

  * fasta: Deprecate `fasta::Reader`, `fasta::IndexedReader`, `fasta::Writer`,
    and `fasta::index`.

    These are moved under the `fasta::io` module.

## 0.38.0 - 2024-05-16

### Changed

  * fasta: Sync dependencies.

## 0.37.0 - 2024-05-08

### Changed

  * fasta: Sync dependencies.

## 0.36.0 - 2024-05-02

### Changed

  * fasta: Sync dependencies.

## 0.35.0 - 2024-03-28

### Changed

  * fasta: Sync dependencies.

## 0.34.0 - 2024-03-12

### Changed

  * fasta: Sync dependencies.

## 0.33.0 - 2024-02-22

### Changed

  * fasta/repository/adapter: Add `Send` and `Sync` constraints to `Adapter`.

### Fixed

  * fasta/repository: Make `Repository` thread-safe ([#234]).

  `Repository` was intended to allow concurrent access, which is why the
  adapter has a readers-writer lock.

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

## 0.32.0 - 2024-01-25

### Changed

  * fasta/record/definition: Change fields to byte strings.

## 0.31.0 - 2023-12-14

### Changed

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

## 0.30.0 - 2023-10-12

### Changed

  * fasta: Sync dependencies.

## 0.29.0 - 2023-08-31

### Changed

  * fasta: Sync dependencies.

## 0.28.0 - 2023-08-17

### Changed

  * fasta: Sync dependencies.

## 0.27.0 - 2023-07-27

### Changed

  * fasta/reader/sequence: Skip empty lines ([#189]).

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

## 0.26.0 - 2023-07-20

### Changed

  * fasta/reader: Increase visibility of `sequence::Reader`.

## 0.25.0 - 2023-06-15

### Changed

  * fasta: Sync dependencies.

## 0.24.0 - 2023-06-08

### Added

  * fasta/reader: Add a sequence reader (`fasta::reader::sequence::Reader`)
    ([#101]).

    This is created by calling `fasta::Reader::sequence_reader`. It is used for
    lower-level reading of the sequence.

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

## 0.23.0 - 2023-06-01

### Changed

  * fasta: Sync dependencies.

### Deprecated

  * fasta/fai/record: Deprecate `Record::len`.

    Use `Record::length` instead.

## 0.22.0 - 2023-05-04

### Changed

  * fasta/fai/record: Accept `Into<String>` for the record name.

## 0.21.0 - 2023-04-27

### Changed

  * fasta: Sync dependencies.

## 0.20.0 - 2023-03-14

### Added

  * fasta/indexed_reader: Add getter for index (`IndexedReader::index`).

## 0.19.0 - 2023-03-03

### Changed

  * fasta/reader: Improve performance of querying small regions ([#146]).

    The reader no longer needs to read the entire sequence when querying.

  * fasta/reader/builder: Add `bgz` as a known BGZF extension ([#144]).

[#144]: https://github.com/zaeleus/noodles/pull/144
[#146]: https://github.com/zaeleus/noodles/issues/146

## 0.18.0 - 2023-02-03

### Added

  * fasta/fai/record: Implement `std::error::Error::source` for `ParseError`.

### Changed

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

### Removed

  * fasta/fai/record: Remove `Record::reference_sequence_name`.

    This was deprecated in noodles-fasta 0.3.0. Use `Record::name`
    instead.

  * fasta/record: Remove `Record::reference_sequence_name`.

    This was deprecated in noodles-fasta 0.2.0. Use `Record::name`
    instead.

  * fasta/record/definition: Remove
    `Definition::reference_sequence_name`.

    This was deprecated in noodles-fasta 0.3.0. Use `Definition::name`
    instead.

  * fasta/record/definition: Remove
    `ParseError::MissingReferenceSequenceName`.

    This was deprecated in noodles-fasta 0.6.0. Use
    `ParseError::MissingName` instead.


## 0.17.0 - 2022-11-18

### Changed

  * fasta: Sync dependencies.

## 0.16.0 - 2022-10-28

### Added

  * fasta/writer/builder: Implement `Default`.

### Changed

  * fasta/writer/builder: `Builder` no longer holds a writer.

### Removed

  * fasta/writer: Remove `Writer::builder`.

    Use `writer::Builder::default` instead.

  * fasta/writer/builder: Remove `Builder::build`.

    Use `Builder::build_with_writer` instead.

## 0.15.0 - 2022-10-20

### Changed

  * fasta: Sync dependencies.

### Unreleased

## Changed

  * fasta: Split indexed reader from reader.

    `reader::Builder` no longer attempts to load associated indices. This
    functionality is separated into `IndexedReader`, which now guarantees
    associated indices are loaded for querying.

    Changes usages of `fasta::reader::Builder` to
    `fasta::indexed_reader::Builder` if it is known querying is necessary.

## 0.14.0 - 2022-09-29

### Added

  * fasta/reader: Add common methods to access the underlying reader
    (`Reader::get_ref`, `Reader::get_mut`, and `Reader::into_inner`).

  * fasta/reader: Add builder (`fasta::reader::Builder`).

    The builder is able to construct a reader from a path
    (`Builder::build_from_path`), which can open raw FASTA files (`*.fa`) and
    bgzipped FASTA (`*.fa.gz`) files. If an associated index (`*.fai`) exists,
    it is loaded to allow querying.

### Changed

  * fasta/reader: `Reader::query` no longer takes a `fai::Index` as input.

    Use an indexed reader via `reader::Builder` to load or set an associated
    index instead.

### Removed

  * fasta/reader: Remove `seek` and `virtual_position` delegates.

    Use the inner reader instead.

  * fasta/repository/adapters/indexed_reader: Remove `Builder`.

    Use `fasta::reader::Builder` and construct `IndexedReader` with a
    `fasta::Reader` instead.

## 0.13.0 - 2022-08-16

### Changed

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

## 0.12.0 - 2022-07-05

### Changed

  * fasta: Sync dependencies.

## 0.11.0 - 2022-06-08

### Added

  * fasta/record/sequence: Implement `FromIterator<u8>`.

  * fasta/record/sequence: Add iterator to complement a sequence
    (`Sequence::complement`) ([#86]).

  * fasta/record/sequence: Add method to return a slice as a `Sequence`
    (`Sequence::slice`).

  * fasta/writer: Add builder ([#87]).

    This allows overriding the line base count.

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

### Changed

  * fasta/indexer: Sequence lines no longer strip end-of-line ASCII whitespace.

    This previously would take a line (i.e., characters up to `\n`) and strip
    [ASCII whitespace] from the end. To be consistent with the FASTA reader,
    all characters in the line are now considered bases. This leads to a ~20%
    performance improvement by avoiding having to copy the line buffer.

[ASCII whitespace]: https://infra.spec.whatwg.org/#ascii-whitespace

## 0.10.0 - 2022-04-14

### Added

  * fasta/repository/adapters/indexed_reader: Add convenience buidler for
    `BufReader<File>`.

## 0.9.0 - 2022-03-29

### Added

  * fasta/record/sequence: Add indexing by `Position`.

  * fasta/record/sequence: Implement `From<Bytes>`.

### Changed

  * fasta/repository: Box the adapter.

    `fasta::Repository` no longer carries an adapter generic.

  * fasta/repository: Implement `Default`.

  * fasta/repository/adapters: Add an empty adapter.

    This may be useful to create a repository that is never used.

## 0.8.0 - 2022-03-02

### Added

  * fasta: Add async reader (`fasta::AsyncReader`).

  * fasta: Add sequence repository (`fasta::Repository`).

    A repository is a concurrent cache that uses a storage adapter to lookup
    and load sequence data.

  * fasta/fai: Add async reader (`fai::AsyncReader`).

### Changed

  * fasta/record/sequence: `Sequence` is now backed by a `Bytes` buffer.

    This allows for zero-copy cloning of the sequence or slices of the
    sequence.

## 0.7.0 - 2022-02-17

### Added

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

## 0.6.0 - 2022-01-27

### Deprecated

  * fasta/record/definition: Deprecate
    `ParseError::MissingReferenceSequenceName`.

    Use `ParseError::MissingName` instead.

## 0.5.2 - 2022-01-13

### Fixed

  * fasta: Sync dependencies.

## 0.5.1 - 2021-12-09

### Fixed

  * fasta: Sync dependencies.

## 0.5.0 - 2021-12-02

### Added

  * fasta/record/definition: Accept `Into<String>` for name.

### Changed

  * fasta/record: Wrap sequence.

    Use `Sequence::as_ref` to get the underlying list.

## 0.4.1 - 2021-11-18

### Fixed

  * fasta: Sync dependencies.

## 0.4.0 - 2021-11-11

### Changed

  * fasta: Update to Rust 2021.

## 0.3.1 - 2021-10-16

### Fixed

  * fasta: Sync dependencies.

## 0.3.0 - 2021-10-01

### Deprecated

  * fasta/fai/record: `Record::reference_sequence_name` is now `Record::name`.

    FASTA records are not necessarily reference sequences.

## 0.2.4 - 2021-09-23

### Fixed

  * fasta: Sync dependencies.

## 0.2.3 - 2021-09-19

### Fixed

  * fasta: Sync dependencies.

## 0.2.2 - 2021-08-19

### Fixed

  * fasta: Sync dependencies.

## 0.2.1 - 2021-08-11

### Fixed

  * fasta: Sync dependencies.

## 0.2.0 - 2021-07-30

### Changed

  * fasta/record: Rename `reference_sequence_name` to `name`.

    FASTA records are not necessarily reference sequences.

## 0.1.1 - 2021-07-21

### Fixed

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

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

## 0.1.0 - 2021-07-14

  * fasta: Initial release.