It's kind of cool that all it needs is a sequence of elements that implements convert(T, x) to the right type. But when displaying the sequence, it does not recognize that DNA_A == 'A'.
We should also think about how to handle alignments of distinct sequence types. For example, how do you align to RNA sequences to each other? There is no substitution model, though obviously the DNA models could work. But since Strings are allowed to be used, we have an inconsistency: pairalign(LocalAlignment(), "AUA", dna"AAA", model) errors, but pairalign(LocalAlignment(), rna"AUA", dna"AAA", model) works, simply because convert(DNA, 'U') is an error, whereas convert(DNA, RNA_U) isn't.
So I was surprised to find you can align Strings to each other:
It's kind of cool that all it needs is a sequence of elements that implements
convert(T, x)
to the right type. But when displaying the sequence, it does not recognize that DNA_A == 'A'.We should also think about how to handle alignments of distinct sequence types. For example, how do you align to RNA sequences to each other? There is no substitution model, though obviously the DNA models could work. But since
Strings
are allowed to be used, we have an inconsistency:pairalign(LocalAlignment(), "AUA", dna"AAA", model)
errors, butpairalign(LocalAlignment(), rna"AUA", dna"AAA", model)
works, simply becauseconvert(DNA, 'U')
is an error, whereasconvert(DNA, RNA_U)
isn't.