Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BbiFile = BbiFile {
- _filehandle :: Handle
- _header :: !BbiFileHeader
- _chromTree :: !(Map Chromosome (ChromID, ChromSize))
- _rtree :: !RTreeHeader
- data BbiFileHeader = BbiFileHeader {
- _filetype :: !FileType
- _endian :: !Endianness
- _version :: !Int
- _zoomlevels :: !Int
- _chrTreeOffset :: !Int
- _fullDataOffset :: !Int
- _fullIndexOffset :: !Int
- _filedCount :: !Int
- _definedFiledCount :: !Int
- _autoSqlOffset :: !Int
- _totalSummaryOffset :: !Int
- _uncompressBufSize :: !Int
- _reserved :: !Int
- data FileType
- openBbiFile :: FilePath -> IO BbiFile
- closeBbiFile :: BbiFile -> IO ()
- getBbiFileHeader :: Handle -> IO BbiFileHeader
- getChromId :: BbiFile -> ByteString -> Maybe ChromID
- overlappingBlocks :: BbiFile -> (ChromID, Int, Int) -> IO [Block]
- readBlocks :: BbiFile -> [Block] -> Source IO ByteString
Documentation
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.
BbiFile | |
|
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.
BbiFileHeader | |
|
Instances
Show BbiFileHeader Source # | |
Defined in Data.BBI showsPrec :: Int -> BbiFileHeader -> ShowS # show :: BbiFileHeader -> String # showList :: [BbiFileHeader] -> ShowS # |
closeBbiFile :: BbiFile -> IO () Source #
getBbiFileHeader :: Handle -> IO BbiFileHeader Source #
getChromId :: BbiFile -> ByteString -> Maybe ChromID Source #
readBlocks :: BbiFile -> [Block] -> Source IO ByteString Source #
Read Blocks from the file.