Skip to content
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

BioSequences.RE.RegexMatch behaves nothing like Base.RegexMatch #45

Open
estragon0 opened this issue Sep 7, 2018 · 1 comment
Open

Comments

@estragon0
Copy link

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)
@bicycle1885
Copy link
Member

Thanks. I may need to reconsider the design of these tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants