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

Disallow record construction from anything #46

Closed jakobnissen closed 2 years ago

jakobnissen commented 3 years ago

I just discovered this little gem:

julia> record = FASTA.Record("header", nothing)
FASTX.FASTA.Record:
   identifier: header
  description: <missing>
     sequence: nothing

julia> FASTA.sequence(record)
7aa Amino Acid Sequence:
NOTHING

This PR restricts the sequence to be of type Union{BioSequence, AbstractString}. I guess this is a breaking change, so maybe wait till a future release.

codecov[bot] commented 3 years ago

Codecov Report

Merging #46 (1c10a2f) into master (7d98cbc) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #46   +/-   ##
=======================================
  Coverage   83.57%   83.57%           
=======================================
  Files          11       11           
  Lines         615      615           
=======================================
  Hits          514      514           
  Misses        101      101           
Flag Coverage Δ
unittests 83.57% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/fasta/record.jl 80.29% <100.00%> (ø)
src/fastq/record.jl 83.45% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7d98cbc...1c10a2f. Read the comment docs.