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

Gene fetching sometimes breaks because of row out-of-bounds errors #112

Closed JobLeonard closed 7 years ago

JobLeonard commented 7 years ago

I am not entirely sure what causes this yet, but I'll figure it out.

Sometimes the returned gene data has an index that is out of bounds for the number of rows. For example, for the cortex.loom dataset (4998 rows) one gene is returned with row index 5057:

image

For now I'll add a check for these out of bounds errors in the client, but there is something broken on the server side too if this happens.

JobLeonard commented 7 years ago

I identified the out-of-bounds gene in the above example as Col1a1

image

Which is gene row 4994.

image

4994 + 63 = 5057.

image

Found the bug...

What I'm somewhat surprised by is that j should be out of scope, so no longer 63. Anyway, easy enough to fix in code, but it has some nasty consequences: we need to re-expand all datasets, because the last 64 rows (well, technically, the last (total rows modulo 64) rows) have this bug.

I hate myself.

I"ll write a special fix-script that only re-expands these last rows, so that we won't have to wait two, three days again...

JobLeonard commented 7 years ago

Fixed, server files have been updated too.