JetBrains-Research / big

BigWIG, BigBED and TDF for the JVM
MIT License
13 stars 2 forks source link

Pre-computed zoom levels #13

Closed superbobry closed 9 years ago

superbobry commented 9 years ago

The current version of big provides read-only access to zoom levels, i.e. all files are created with no pre-computed zoom levels. However, it seems we can re-use #summarise to construct zoom-levels in writing almost zero new code!

I see two ways of implementing this:

  1. Choose the number of zoom levels (say Z) and then do Z calls #summarise. After each call save the computed zoom level to the file and update the header accordingly.
  2. Do Z calls to #summarise and save the computed zoom level on each call. Update the file header only after the last zoom levle is processed.
superbobry commented 9 years ago

The current implementation is somewhat slow due to #summarise generating a lot of zero-valued summaries, but it's not an issue for now. Closing.