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

Generalized advanced queries #1041

Open
2 tasks
chaoran-chen opened this issue Jan 4, 2025 · 0 comments
Open
2 tasks

Generalized advanced queries #1041

chaoran-chen opened this issue Jan 4, 2025 · 0 comments
Labels
epic Collection of multiple issues for a larger feature

Comments

@chaoran-chen
Copy link
Member

chaoran-chen commented Jan 4, 2025

For SARS-CoV-2, we have advanced variant queries (see #130 and docs). We should implement a generlized version.

The query format may but does not need to be exactly the same as for SARS-CoV-2. It is only important that, if they are not consistent, the existing SARS-CoV-2 implementation continues to exist and does not cause breaking changes to CoV-Spectrum.

The query format (of CoV-Spectrum) has three main components

  • The logic operators: for SC2, it's: &, |, !, n-of and exactly-n-of
  • The mutation selectors: for SC2, it's just the mutations in our usual syntax.
    • A mutation can be wrapped in a maybe().
  • The metadata selectors:
    • For SC2, we have a quite special implementation, where Pango lineages are just written as is (e.g., B.1.1.7). Pango lineages called by Nextclade are prefixed (e.g., nextcladePangoLineage:B.1.1.7) as are Nextstrain clades (e.g., nextstrainClade:22B). There is no support for other metadata columns. Sub-lineages of Pango lineages can be queried (e.g., nextcladePangoLineage:B.1.1.7*)
    • For the new version, it would be nice to be able to support any metadata column.

Subtasks:

@chaoran-chen chaoran-chen added the epic Collection of multiple issues for a larger feature label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Collection of multiple issues for a larger feature
Projects
None yet
Development

No branches or pull requests

1 participant