bx.bbi.bbi_file module
Core implementation for reading UCSC “big binary indexed” files.
There isn’t really any specification for the format beyond the code, so this mirrors Jim Kent’s ‘bbiRead.c’ mostly.
- class bx.bbi.bbi_file.BBIFile
Bases:
object
A “big binary indexed” file. Stores blocks of raw data and numeric summaries of that data at different levels of aggregation (“zoom levels”). Generic enough to accommodate both wiggle and bed data.
- level_list
- magic
- open(file, expected_sig, type_name)
Initialize from an existing bbi file, signature (magic) must be passed in since this is generic.
- query(chrom, start, end, summary_size)
Provides a different view of summary for region, a list of dictionaries with keys: mean, max, min, coverage, std_dev
- summarize(chrom, start, end, summary_size)
Gets summary_size data points over the regions chrom:start-end.
- summarize_from_full(chrom, start, end, summary_size)
Gets summary_size data points over the regions chrom:start-end, always using the raw data points
- version
- zoom_levels
- class bx.bbi.bbi_file.SummarizedData
Bases:
object
The result of using SummaryBlocks read from the file to produce a aggregation over a particular range and resolution
- end
- max_val
- min_val
- size
- start
- sum_data
- sum_squares
- valid_count