oxbow.from_bigbed

Contents

oxbow.from_bigbed#

oxbow.from_bigbed(source: str | Path | Callable[[], IO[bytes] | str], schema: str = 'bed3+', *, fields: list[str] | None = None, regions: str | list[str] | None = None, batch_size: int = 131072) BigBedFile#

Create a BigBed file data source.

Parameters:
  • source (str, pathlib.Path, or Callable) – The URI or path to the BigBed file, or a callable that opens the file as a file-like object.

  • bed_schema (str, optional [default: "bed3+"]) – Schema for intepreting the BED fields. The default is “bed3+”, which includes the first three standard fields (chrom, start, end) and any additional data is lumped into a single “rest” column. If the BigBed file contains an AutoSql definition of its fields, pass “autosql” to use it.

  • fields (list[str], optional) – Specific fields to project as columns. By default, all available fields are included.

  • regions (list[str], optional) – One or more genomic regions to query. Only applicable if an associated index file is available.

  • batch_size (int, optional [default: 131072]) – The number of records to read in each batch.

Returns:

A data source object representing the BigBed file.

Return type:

BigBedFile

See also

from_bed

Create a BED file data source.

from_bigwig

Create a BigWig file data source.

bbi.BigBedFile.zoom()

Create a data source for a zoom level.