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

Document "maybe" operator for covspectrum advanced queries #832

Open
corneliusroemer opened this issue Jul 20, 2023 · 1 comment
Open

Document "maybe" operator for covspectrum advanced queries #832

corneliusroemer opened this issue Jul 20, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@corneliusroemer
Copy link
Collaborator

corneliusroemer commented Jul 20, 2023

Erik Boehm had a question that would be perfectly answered by covSpectrum's maybe query:

I was wondering if you had any insight on why the % of the S:371 mutation is so "low" (91-3%) in the World and European data, while it is >99% in the Swiss data

However I couldn't find any documentation on how to use the maybe operator, even what it is. But I very well remember talking to @chaoran-chen about this operator and found it in the code:
https://github.com/GenSpectrum/LAPIS-SILO/blob/164ccd0571d0987f007c412b429fe12935a95b91/include/silo/query_engine/filter_expressions/maybe.h#L21
https://github.com/GenSpectrum/LAPIS/blob/0c6e7ad46569e37a90c3a0f6018355585cdca791/server/src/main/java/ch/ethz/lapis/api/query/Maybe.java#L9

Is maybe just syntactic sugar for !(S:371.)?
image
https://cov-spectrum.org/explore/World/AllSamples/Past6M/variants?variantQuery=%21%28S%3A371.%29&

@chaoran-chen
Copy link
Member

You're right, we have quite a bit of a documentation backlog at the moment. We'll try to catch up after LAPIS v2. At the moment, the only mention of it is in the LAPIS paper. There is a "“Maybe” queries" section: https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-023-05364-3#Sec2

Do I understand right that you are interested in the number of sequences that potentially have a mutation at S:371? Then, !S:371. indeed does exactly that. Maybe is most useful if you would like to know the sequences that maybe have a very specific nucleotide mutation because nucleotides have all the different ambiguity codes like M, R, etc.

@chaoran-chen chaoran-chen added the documentation Improvements or additions to documentation label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants