linnarsson-lab / loom-viewer

Tool for sharing, browsing and visualizing single-cell data stored in the Loom file format
BSD 2-Clause "Simplified" License
35 stars 6 forks source link

Change gene fetching architecture #109

Closed JobLeonard closed 7 years ago

JobLeonard commented 7 years ago

We have a very specific bug: if we colour by a gene in scatterplot, then filter out a specific value (say, the zeros), then refresh, the app will send infinite incorrect row requests. The reason it does this has to do with the gene not being fetched yet at the time of filtering.

I can write a hack that works around this, but I think is solved best by changing how we fetch genes, because this will also make it easier to change functionality in the future and prevent future bugs.

In simple terms, right now fetching genes is done explicitly, but what would work better if it happens implicitly whenever a gene is selected in some view's state and the gene is not present yet. This will remove the need to think about fetching data, and on the view side we only have to check if a gene/attribute is not null (which we're doing already anyway).