Skip to content

docs(lapis-docs): add documentation for interaction between 'maybe' and 'not'#1591

Open
fhennig wants to merge 2 commits intomainfrom
maybe-not-docs
Open

docs(lapis-docs): add documentation for interaction between 'maybe' and 'not'#1591
fhennig wants to merge 2 commits intomainfrom
maybe-not-docs

Conversation

@fhennig
Copy link
Contributor

@fhennig fhennig commented Mar 10, 2026

resolves #1554

PR Checklist

  • All necessary documentation has been adapted.
  • All necessary changes are explained in the llms.txt.
  • The implemented feature is covered by an appropriate test.

@fhennig fhennig self-assigned this Mar 10, 2026
@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lapis Ready Ready Preview, Comment Mar 11, 2026 10:28am

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds clarification to LAPIS documentation about how ambiguous symbols interact with negation, addressing confusion raised in issue #1554 (e.g., why NOT A134C/!A134C can match sequences with ambiguous/unknown bases at that position).

Changes:

  • Extend the “Ambiguous symbols” concept doc with a new section explaining MAYBE vs negation.
  • Provide a small example demonstrating the difference between !3G and !MAYBE(3G).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +36 to +39
### `MAYBE` and `NOT`

Ambiguous symbols and negation (`not` or `!`) can sometimes seem a bit unintuitive.
When querying for sequences that do _not_ have - for example - a G at position 3, should that include ambiguous sequences or not?
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this doc page the query language is described as (variant) query syntax, where negation is written as !. Referring to negation as not here can be confusing because not isn't part of the variant-query grammar; consider referencing NOT (advanced query keyword) and/or explicitly stating which of NOT/! applies to which query language.

Suggested change
### `MAYBE` and `NOT`
Ambiguous symbols and negation (`not` or `!`) can sometimes seem a bit unintuitive.
When querying for sequences that do _not_ have - for example - a G at position 3, should that include ambiguous sequences or not?
### `MAYBE` and negation
Ambiguous symbols and negation (written as `!` in variant queries) can sometimes seem a bit unintuitive. (In the advanced query language, the equivalent keyword is `NOT`.)
When querying for sequences that do not contain—for examplea G at position 3, should that include ambiguous sequences or not?

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Did I just mix up variant and advanced queries, @fengelniederhammer ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think you are correct. IMO we don't need to document variant queries that much, because they are for Covid only.

But we should somehow say "in advanced queries", because "not" only exists there. The normal mutation filters allow maybe, but not not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And yes, I think not does not exist in variant queries. But that's neglectable.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

Improve documentation: advanced query "NOT A134C" matches sequences where 134 is N

3 participants