BioJulia/BioSequences.jl

๐Ÿ› in iscanonical / canonical

TransGirlCodes opened this issue ยท 2 comments

Consider these two codons, both RC of each other:

a = dna"TCA"
b = dna"TGA"

The first one is the canonical, as a < b, as DNA_C < DNA_G

However,

julia> iscanonical(dna"TCA")
true

julia> iscanonical(dna"TGA")
true

And so, canonical will return the input sequence for both of these.

It is rare this sort of edge case would crop up in reality, but we should fix it.

TGA is definitely not canonical so that is clearly a bug