Improve tables
In the "Top Hits" table, give users the option: (1) to hide/unhide columns (2) to sort columns
Also, add the following columns: (1) add OR/BETA column
How should column hiding/unhiding work? Would you have a drop-down where you can select (with checkmarks) which columns to show?
beta/sebeta: easy. Adding odds ratio should be easy but who knows.
Column sorting: I should use a different table library. Encore uses jquery.datatables.
column hiding/unhiding: it's implemented in jquery.datatables https://datatables.net/examples/api/show_hide.html
beta/sebeta: start with this; and then we can tackle OR
Column sorting: jquery.datatables looks like a good solution.
@pjvandehaar
Switch the Top Hits table to use jquery.datatables (to allow for sorting and filtering), and add the following columns:
- Beta (discussed above)
- "VT" SNP or Indel
- "GENO" 0=imputed; 1=genotyped
- VEP Impact
To the Tooltip add:
- "R2" Imputation quality (or genotyped)
- VEP Consequence
Eventually, when the user filters the table, the Manhattan plot filters too.
Summary
For top_hits, pheno, and variant page tables:
-
[ ] Make some columns only available if there is data for them (eg,
beta)- make a header-template that takes a {variant: true, beta_sebeta: true, ...}
- likewise for row-template
- put these two into a {%block%} for {%extends%}ing them
- probably iteratively build these templates together, appending one column at a time.
if (v.beta) { header_template += ... ; row_template += ... }
-
[ ] Make columns sortable. (eg,
variant)- done by jquery.datatables
-
[ ] Allow users to choose which columns to show. (eg,
R2)- done by jquery.datatables
-
[ ] Later: make the tables below PheWAS and Manhattan filterable, and those filters would affect the plot.