broadinstitute/dig-diabetes-portal

Add auto suggest for variant lookup

Opened this issue · 0 comments

When a user begins to type in a gene name we provide them with an "auto suggest" feature, telling them all the possible matches to the first part of the string method typed in. For variants, unfortunately, we offer them no help at all. Why not? Could we add an auto suggest feature to the variant field? Since these names often seem like obscure sequences of digits (at least to me) this approach would help users to avoid typos. Furthermore the auto suggest approach would make quite clear the distinction between when we have data and when we don't for a particular variant.

Note: if we are going to do this right we need to implement the lookup on the REST API, and NOT on the Web server (where the information currently resides for the gene lookup). There is definitely precedent for doing this sort of an auto suggest over the network -- I've done it in previous projects and performance was not a problem. Note that the list of variants is going to be much longer than the list of genes (and will change more frequently as well) which is another reason that we definitely want to pull these data from the backend database, and not from some file-based storage held on the Web server.