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

Export schema wrongly fails on gene names starting with 'nuc' due to lookahead #1433

Closed
charlynebuerki opened this issue Mar 7, 2024 · 0 comments · Fixed by #1434
Closed
Labels
bug Something isn't working

Comments

@charlynebuerki
Copy link

Current Behavior

Augur export fails at validation when a gene name for which mutations are included starts with 'nuc', for example if there's a gene named 'nucleocapsid'.

Expected behavior

Gene names can start with 'nuc'

How to reproduce

Look at the export schema:

"^(?!nuc)[a-zA-Z0-9*_-]+$": {

The regex for additional patterns was rewritten and a negative lookahead (?!nuc) was added 6 months ago:
8209dad

Possible solution

Include a $ at the end of the lookahead to only match exactly, not just a prefix of nuc.

Your environment: if running Nextstrain locally

  • Version (e.g. auspice 2.7.0): augur 24.2.3

Additional context

Discovered together with @corneliusroemer

It would have made debugging easier if #1426 was implemented! So plus 1 on that issue!

@charlynebuerki charlynebuerki added the bug Something isn't working label Mar 7, 2024
corneliusroemer added a commit that referenced this issue Mar 7, 2024
corneliusroemer added a commit that referenced this issue Mar 14, 2024
…ong as not equal to `nuc` (#1434)

* fix(export): In export schema, allow cds name with `nuc` prefix, as long as not equal to `nuc`

Fixes #1433

* chore(CHANGES): Add changelog entry

* fix(export): use correct schema for meta.genome_annotations

Co-authored-by: james hadfield <hadfield.james@gmail.com>

---------

Co-authored-by: james hadfield <hadfield.james@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant