Open sverhoeven opened 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.
To fix:
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.
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.