BioSequences.jl
BioSequences.jl copied to clipboard
BioSequences.RE.RegexMatch behaves nothing like Base.RegexMatch
BioSequences.RE.RegexMatch lacks the "match" and "offset" fields of Base.RegexMatch, which not only makes it considerably less useful, but is somewhat difficult to debug because their print() representation is identical.
Code:
string_seq = "ARNDCEQG"
aa_seq = aa"ARNDCEQG"
string_match = match(r"DCE", string_seq)
aa_match = match(biore"DCE"aa, aa_seq)
println(string_match)
println(aa_match)
println(fieldnames(typeof(string_match)))
println(fieldnames(typeof(aa_match)))
Result:
RegexMatch("DCE")
RegexMatch("DCE")
(:match, :captures, :offset, :offsets, :regex)
(:seq, :captured)
Thanks. I may need to reconsider the design of these tools.