úÎ!C ?î;      !"#$%&'()*+,-./0123456789:NoneA  NoneSX_9—bbiÿ¤Big index file format. Here are the Byte-by-byte details: -------------- ------ ----------------------------------------------------- Name Size Description -------------- ------ ----------------------------------------------------- bbiHeader 64 Contains high-level information about file and offsets to various parts of file. zoomHeaders N*24 One for each level of zoom built into file. autoSql Varies Zero-terminated string in autoSql format describing formats. Optional, not used in BigWig. totalSummary 40 Statistical summary of entire file. chromosomeTree Varies B+ tree-formatted index of chromosomes, their sizes, and a unique ID for each. dataCount 4 Number of records in data. For BigWig this corresponds to the number of sections, not the number of floating point values. data Varies Possibly compressed data in format specific for file type. index Varies R tree index of data. zoomInfo Varies One for each zoom level.;bbiÿ”R tree index header. Name Size Type Description magic 4 uint 0x2468ACE0. If byte-swapped all numbers in index are byte-swapped. blockSize 4 uint Number of children per block (not byte size of block). itemCount 8 uint The number of chromosomes/contigs. startChromIx 4 uint ID of first chromosome in index. startBase 4 uint Position of first base in index. endChromIx 4 uint ID of last chromosome in index. endBase 4 uint Position of last base in index. endFileOffset 8 uint Position in file where data being indexed ends. itemsPerSlot 4 uint Number of items pointed to by leaves of index. Reserved 4 uint Reserved for future expansion. Currently 0.bbiÿ£The header for big index file. Here are the Byte-by-byte details: -------------------- ---- ---- ------------------------------------------- Name Size Type Description -------------------- ---- ---- ------------------------------------------- magic 4 uint 0x888FFC26 for BigWig, 0x8789F2EB for BigBed. If byte-swapped, all numbers in file are byte-swapped. version 2 uint Currently 3. zoomLevels 2 uint Number of different zoom summary resolutions. chromosomeTreeOffset 8 uint Offset in file to chromosome B+ tree index. fullDataOffset 8 uint Offset to main (unzoomed) data. Points specifically to the dataCount. fullIndexOffset 8 uint Offset to R tree index of items. fieldCount 2 uint Number of fields in BED file. (0 for BigWig) definedFieldCount 2 uint Number of fields that are predefined BED fields. autoSqlOffset 8 uint Offset to zero-terminated string with .as spec. totalSummaryOffset 8 uint Offset to overall file summary data block. uncompressBufSize 4 uint Maximum size of decompression buffer needed (nonzero on compressed files). reserved 8 uint Reserved for future expansion. Currently 0.<bbiGet the file type.,bbiRead Blocks from the file. =bbi&Location of R Tree header in the file.>bbiLocation !"#$%&'()*+, !"#$%&()'*+,None<¿?bbiwig section type4bbithe query should be 0-indexed@bbiCconvert bytestring to wig style record, but the output is 0-indexed12341234None?Ê:bbiGFind all regions that are overlapped with the query in the bigbed file.Abbi%Whether two intervals are overlapped.BbbiDecode blocks in BigBed.:bbi(Chr, start, end)789:789:C      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF bbi-0.1.1-LHSCUV5mCTZ4uJjVYgHwBRData.BBI.UtilsData.BBIData.BBI.BigWigData.BBI.BigBed EndiannessLEBE hReadBool readInt64 hReadInt64 readInt32 hReadInt32 readInt16 hReadInt16 hReadInt8readInt8 readFloat32 fromRight$fShowEndiannessBbiFile _filehandle_header _chromTree_rtree BbiFileHeader _filetype_endian_version _zoomlevels_chrTreeOffset_fullDataOffset_fullIndexOffset _filedCount_definedFiledCount_autoSqlOffset_totalSummaryOffset_uncompressBufSize _reservedFileTypeBigBedBigWiggetBbiFileHeader openBbiFile closeBbiFile getChromIdoverlappingBlocks readBlocks$fShowFileType$fShowBbiFileHeader$fShowRTreeHeader $fShowBbiFileBWFile openBWFile closeBWFile queryBWFile$fShowSectionType$fShowWigHeaderBBedFile openBBedFile closeBBedFilequery RTreeHeader getFileTypegetRTreeHeadergetChromTreeAsList SectionType toWigRecords isOverlapped decodeBlock