pyBigWig can let you write a bigwig file with a header but no actual records. They end up not containing any r-trees for data. @jmschrei has encountered this in practice. Example file attached.
pybigtools and pybbi can open such files and read the chromosome info, but error on any access to data. pyBigWig handles this more "gracefully" by returning empty results.
It's not clear to me whether such a file is in an undefined state and some kind of empty data tree is needed to make it a proper "empty" bigwig. If the correct behavior is to raise an error, perhaps could it be more informative than Invalid magic (likely a bug)..
Thoughts, @jackh726 ?
SRR19619952.-.bw.zip
pyBigWig can let you write a bigwig file with a header but no actual records. They end up not containing any r-trees for data. @jmschrei has encountered this in practice. Example file attached.
pybigtools and pybbi can open such files and read the chromosome info, but error on any access to data. pyBigWig handles this more "gracefully" by returning empty results.
It's not clear to me whether such a file is in an undefined state and some kind of empty data tree is needed to make it a proper "empty" bigwig. If the correct behavior is to raise an error, perhaps could it be more informative than
Invalid magic (likely a bug)..Thoughts, @jackh726 ?
SRR19619952.-.bw.zip