eweitz / ideogram

Chromosome visualization for the web
https://eweitz.github.io/ideogram
Other
288 stars 72 forks source link

Instantly fetch paralogs #300

Closed eweitz closed 2 years ago

eweitz commented 2 years ago

This improves the speed of finding paralogous genes in the related genes kit.

Building on the technical approach introduced in https://github.com/eweitz/ideogram/pull/294, this replaces queries to the homology/symbol Ensembl REST API endpoint with a one-time query to a CDN cache of equivalent data. Subsequent paralog requests get data from a local web cache.

Such requests are now > 200x faster, taking 15 ms instead of 1000-6000 ms. Using web cache also improves the reliability of this feature by mitigating upstream Ensembl outages. More technical details are available in https://github.com/cachome/ensembl-paralogs/pull/1.

This also fixes a latent gene rank regression from #299, and adds Drosophila melanogaster to the related genes example. It also temporarily hides a new "pathway genes" search (#297) until it can be refined.

Note how long it takes to load paralogs -- the pink genes -- in the old version:

https://user-images.githubusercontent.com/1334561/162950705-b0bcf69c-6713-419d-a1f5-fd828816e1cc.mov

Loading paralogs (pink genes) is now much faster:

https://user-images.githubusercontent.com/1334561/162951023-ee1c97f8-f2ae-4340-9f4b-1531748505da.mov

As seen above, what before took 6 seconds now takes 12 milliseconds -- a noticeable improvement.

coveralls commented 2 years ago

Coverage Status

Coverage decreased (-1.0%) to 87.69% when pulling 90524f78283dc7e4bee37775cbe15afe6d4e65e1 on cache-paralogs into 04b6ccbbfb9e05648efcb55358355fab2bf48571 on master.