By index you mean creating a .fai file ? I don’t think that’s possible with FASTX (see https://github.com/BioJulia/FASTX.jl/blob/be4082269bff2a797afe54dd3cd94051ca6affce/src/fasta/index.jl).
If you already have an index however you can pass it to Reader
:
FASTA.Reader(input::IO; index = nothing)
Not sure how you use it though, or if it works with fastqs.
If you just want to read a Record you can just do :
record = FASTA.Record()
read!(reader, record)
See the docs: biojulia.net