nlesc-ave / ave-app

Allelic Variation Explorer application
Apache License 2.0
2 stars 0 forks source link

Bigbed with more than 256 chromosomes does not render #37

Open sverhoeven opened 6 years ago

sverhoeven commented 6 years ago

At https://github.com/hammerlab/pileup.js/blob/master/src/main/data/BigBed.js#L35-L36 it is assumed the chromosomeTree is flat.

The default -blocksize for bedToBigBed is 256.

The pileup code assumes the all the chromosomes fit in a single block. When you have more than 256 chromosomes it is stored in multiple blocks then pileup only saves the first block.

sverhoeven commented 6 years ago

The first 64k of a bigbed is parsed for it's header, but when there are >2000 chromosomes then not all chromosomes will be listed in the first 64k so additional chunks must be downloaded.

sverhoeven commented 6 years ago

To fix:

sverhoeven commented 6 years ago

A simple pileup.js example should be made with http://bioviz.org/quickload/A_lyrata_Apr_2011/ which has 695 scaffolds/chromosomes. Then a bug can be opened at https://github.com/hammerlab/pileup.js/issues and it can be fixed there.