oxbow.read_bcf#
- oxbow.read_bcf(src, region=None, index=None, fields=None, info_fields=None, genotype_fields=None, genotype_by=None, samples=None, samples_nested=False, compressed=True)#
Return Arrow IPC format from a BCF file.
- Parameters:
src (str or file-like) – The path to the BCF file or a file-like object.
region (str, optional) – Genomic region in the format “chr:start-end”.
index (path or file-like, optional) – The index file to use for querying the region.
fields (list[str], optional) – Names of the fixed fields to project.
info_fields (list[str], optional) – Names of the INFO fields to project.
genotype_fields (list[str], optional) – Names of the sample-specific genotype fields to project.
genotype_by (Literal["sample", "field"], optional [default: "sample"]) – How to project the genotype fields. If “sample”, the columns correspond to the samples. If “field”, the columns correspond to the genotype fields.
samples (list[str], optional) – Names of the samples to include in the genotype fields.
samples_nested (bool, optional [default: False]) – Whether to nest the sample-specific genotype fields under a “samples” struct column.
compressed (bool, optional [default: True]) – Whether the source is BGZF-compressed.
- Returns:
Arrow IPC
- Return type:
bytes