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

[VQL] Add $selected features #423

Open
dridk opened this issue May 3, 2022 · 6 comments
Open

[VQL] Add $selected features #423

dridk opened this issue May 3, 2022 · 6 comments
Assignees
Labels
core Cutevariant core enhancement New feature or request high-priority

Comments

@dridk
Copy link
Member

dridk commented May 3, 2022

Create a new keywords $selected in VQL language

# WIl select expand genotype fields 
SELECT samples[$selected].gt  FROM variants 
 
SELECT samples[$selected].gt  FROM variants samples[$selected].gt > 1 

usage :

  • Create a sample selection ( sample1,sample2 ) from sample plugin widget ( for instance .. Or from VQL ? )
  • Execute query ...

See #422

@dridk dridk added the enhancement New feature or request label May 3, 2022
@dridk dridk added this to the Rosalind Franklin 0.4.x milestone May 3, 2022
@dridk
Copy link
Member Author

dridk commented May 3, 2022

image

@antonylebechec
Copy link
Collaborator

in PR #422 (fix selected samples as state for query list #421), 2 state variables are created in "Samples" plugin:

  • "samples_current" which consider all samples selected in the "basket"
  • "samples_selected" which consider selected samples within the basket (to show in "Variants View" plugin)
    Thus, 2 keywords can be created:
  • for current samples:
SELECT samples[$current].gt  FROM variants samples[$current].gt > 1 
  • for selected samples:
SELECT samples[$selected].gt  FROM variants samples[$selected].gt > 1 

@antonylebechec
Copy link
Collaborator

Cela permettra de créer des requêtes (notamment avec "Query List") avec le keyword "$current", et ensuite une navigation entre les samples "selected" avec le keyword "$selected" (un peu à l'instar du Quick Search").

Dans les faits, on pourra alors :
1 - créer un set de samples (e.g. un "run", les samples par encore validé...) et y appliquer par défaut les queries :

SELECT chr,pos,ref,alt FROM variants samples[$current].gt > 1

2 - se focaliser/zoomer sur certains samples (e.g. un "trio", un sample en particulier) :

SELECT chr,pos,ref,alt,samples[$selected].gt FROM variants samples[$current].gt > 1 AND samples[$selected].gt

ou aussi (mais ça pose un problème si les colonnes ne sont pas regroupées par sample) :

SELECT chr,pos,ref,alt,samples[$selected].gt,samples[$selected].vaf FROM variants samples[$current].gt > 1 AND samples[$selected].gt

On peut aussi garder la flexibilité (comme avec "Quick Search") et ajouter "à la volée" les fields et firlters pour la partie "selected" (comme déjà dans le PR #422) :

SELECT chr,pos,ref,alt,samples["sample1"].gt,samples["sample2"].gt FROM variants samples[$current].gt > 1 AND (samples["sample1"].gt >1 OR samples["sample2"].gt >1)

@dridk
Copy link
Member Author

dridk commented May 4, 2022

C'est quoi la difference entre $current et $selected ?

@antonylebechec
Copy link
Collaborator

antonylebechec commented May 4, 2022

  • Current : ce qu'il y a d'affiché dans le plugin "Samples" (le basket", une fois les filtres réalisés)
  • Selected : ce qui est sélectionné, aujourd'hui par un double-click, et qui permet de voir afficher les GT dans Variants View.

On peut discuter de ces deux notions.

Pour faire simple :

  • Current (samples) = Filters (Variants) = Presets/Set
  • Selected (Samples) = Quick Search (Variants) = Exploration rapide

@antonylebechec
Copy link
Collaborator

Partially solved using source "current_samples".
$selected still usefull

@antonylebechec antonylebechec added the core Cutevariant core label May 10, 2023
SamuelNicaise added a commit that referenced this issue Nov 15, 2023
- Add 'selected_samples' state to prevent Genotype based queries from failing due to too many SQLite clause terms
- Pass it to querybuilder
- Log message instead of letting the unrecoverable error occur
- Fix group by widget related issues
- Fix report related issues
- Update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Cutevariant core enhancement New feature or request high-priority
Projects
None yet
Development

No branches or pull requests

3 participants