Closed cjprybol closed 1 year ago
The idea behind using a generator in has_interface
was to explicitly test that it was constructable from an arbitrary iterable of the right biosymbol, in particular this line from the extended docstring of BioSequence
:
- T must be able to be constructed from any iterable with
length
defined and with a known, compatible element type.
I think this should just be added to Kmers.jl.
I've tranferred this issue to Kmers.jl, since it's a bug in Kmers, not BioSequences
The problematic line is https://github.com/BioJulia/BioSequences.jl/blob/8d015fd44ce1e27fb8dbf5ec9b0f37dcece3d0cc/src/biosequence/biosequence.jl#L62
Because we hit the method error, we go to https://github.com/BioJulia/BioSequences.jl/blob/8d015fd44ce1e27fb8dbf5ec9b0f37dcece3d0cc/src/biosequence/biosequence.jl#L76 and return
false
Based on the above, it seems that there are 2 options for how to resolve this:
has_interface
line to use pre-collected(syms)
rather than putting them back into a generator/iterator((i for i in syms))
I guess the key question is whether being able to construct a
BioSequence
from an iterator/generator is part of the interface specification and this is the intended result of the test or whether the test condition could/should be loosenedThoughts?