Skip to content

Remove (c)bgen dependency for unpack_variables? #1331

@jpfeuffer

Description

@jpfeuffer

Hi!
Thanks for creating sgkit. Very useful package.
We are using it for performing calculations on a dataset that was converted from bgen.

For reading, our code uses something like this:

    ds_region = ds.isel(variants=region_indices, samples=sample_indices)
    ds_region = bgen.bgen_reader.unpack_variables(ds_region)

However due to the import of the bgen module, this pulls in the whole (btw. conda-incompatible) (c)bgen stack, although this function seems to be working perfectly fine without that dependency.

a) Are we using unpack_variables correctly or are we missing something?
b) If so, would you be fine with refactoring such that this function (and potentially others that do not actually depend on cbgen) can be used without that additional dependency?

I might be able to do a PR unless you have some plans for that module already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions