-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Allow zero-length kmers #17
Comments
Hmm - but I think of a Kmer as closer to |
I guess it depends on whether you consider Kmers as just LongSequences - i.e. ordered containers of BioSymbols - just optimised for a specific purpose. Or almost more of a BioSymbol itself, indeed you can consider a LongSequence as a container of kmers, as well as nucleotides. I think of them kinda as both, to be honest. As for the iterating over 0-length kmers, I wonder if we can take inspiration from the julia ecosystem - patterns of iterating over substrings or views of an array or similar? |
Actually, maybe the best comparison with the string ecosystem is a regular expression rather than a
I suppose this would argue in favor of 0-mers 🤷, but I don't really like it. I would have thought |
I definitely see My analogy is that Or, if you will, it corresponds to That is, the different sequence types are only different due to computer-sciency implementation details like whether they are stack-allocated or not, IMO they should not be "biologically" different, and, when possible, they should try to behave identically with each other, such that one can make generic code that takes If kmers were |
I definitely disagree with myself from 3 days ago about the
|
Currently, one can't make 0-length kmers:
I'm not sure I get the rationale for that. Sure, length 0 kmers are a little weird, but in general, containers in Julia can be length 0, That is, we have length 0 LongSequence, LongSubSeq, Vector, Set, Tuple etc etc.
I think it would be nicer to just allow it.
The text was updated successfully, but these errors were encountered: