BioJulia / FASTX.jl

Parse and process FASTA and FASTQ formatted files of biological sequences.
https://biojulia.dev
MIT License
61 stars 20 forks source link

Have accesor functions return views? #56

Closed jakobnissen closed 2 years ago

jakobnissen commented 3 years ago

FASTQ.Record and FASTA.Record stores its data as Vector{UInt8}. Accessing the data, like identifier, quality etc, however, copy the data and return new heap-allocation structs.

I think it would be nicer if all these functions returned views into the original data by default:

For strings, we can use the StringView package. For quality and sequences, we can have lazy iterator functions.

We might also want to do this for XAM.jl.

jakobnissen commented 2 years ago

Implemented by #62