bbi-0.1.1: Tools for reading Big Binary Indexed files, e.g., bigBed, bigWig

Safe HaskellNone
LanguageHaskell2010

Data.BBI

Synopsis

Documentation

data BbiFile Source #

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.

Constructors

BbiFile 

Fields

Instances
Show BbiFile Source # 
Instance details

Defined in Data.BBI

data BbiFileHeader Source #

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.

Instances
Show BbiFileHeader Source # 
Instance details

Defined in Data.BBI

data FileType Source #

Constructors

BigBed 
BigWig 
Instances
Show FileType Source # 
Instance details

Defined in Data.BBI

overlappingBlocks :: BbiFile -> (ChromID, Int, Int) -> IO [Block] Source #

readBlocks :: BbiFile -> [Block] -> Source IO ByteString Source #

Read Blocks from the file.