The fasta implementation was a little tricky since there are multiple relevant readers upstream in noodles: fasta::Reader, fasta::IndexedReader, and fasta::fai::Reader. The core records_to_ipc function relies on the query method supplied by the fasta::Reader, so the fasta::Reader was turned into a FastaReader struct field. Since the query method also relies on the fasta index, index was made into a FastaReader struct field and is now read through a separate fasta::fai::Reader instead of using the fasta::IndexedReader, which has access to the index, but ~lacks the query method~. (EDIT: yes it does have a query method)
Filelike object compatability was also implemented in line with the other readers, and generics have been sprinkled about accordingly.
Also now provides a proper error message when a .fai index file can't be found instead of providing a generic "file not found" error which a user may attribute to the fasta file and not the index file.
The fasta implementation was a little tricky since there are multiple relevant readers upstream in noodles:
fasta::Reader
,fasta::IndexedReader
, andfasta::fai::Reader
. The corerecords_to_ipc
function relies on thequery
method supplied by thefasta::Reader
, so thefasta::Reader
was turned into aFastaReader
struct field. Since thequery
method also relies on the fasta index,index
was made into aFastaReader
struct field and is now read through a separatefasta::fai::Reader
instead of using thefasta::IndexedReader
, which has access to the index, but ~lacks thequery
method~. (EDIT: yes it does have aquery
method)Filelike object compatability was also implemented in line with the other readers, and generics have been sprinkled about accordingly.
Also now provides a proper error message when a
.fai
index file can't be found instead of providing a generic "file not found" error which a user may attribute to the fasta file and not the index file.