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

Update file metadata cache if folder name changes #156

Closed JobLeonard closed 6 years ago

JobLeonard commented 6 years ago

Title says it all.

Steps to reproduce:

Expected:

What happens instead:

{
  "project": "Buggy",
  "filename": "Hindbrain_neurons.loom",
  "dataset": "Hindbrain_neurons.loom",
  "title": "Hindbrain_neurons.loom",
  "description": "",
  "url": "",
  "doi": "",
  "creationDate": "2018/03/06 17:04:06",
  "lastModified": "2018/03/06 17:04:06",
  "totalCells": 1944,
  "totalGenes": 27998
}

Note that there is also a potential bug with loom file renaming - currently this is not an issue, because the server detects the loom file first, then searches for matching cached metadata. However, depending on this behaviour seems like a bad idea, in case we change caching strategies later, and it is a very simple check to perform.

Fixes

Other thoughts

When iterating over a project folder, it might be prudent to delete any extracted metadata without a matching loom file.

Verdict: should be implemented (also for other cached metadata), but this feature is a separate, low-priority issue.