Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Deprecations
- Functions for reading and writing plink are deprecated, please use the `bio2zarr <https://github.com/sgkit-dev/bio2zarr>`_
and `vcztools <https://github.com/sgkit-dev/vcztools>`_ packages.
(:user:`tomwhite`, :pr:`1324`, :issue:`1318`)
- Using rechunker for rechunking in sgkit is deprecated, please use the the
`Xarray chunk <https://docs.xarray.dev/en/stable/generated/xarray.Dataset.chunk.html#xarray.Dataset.chunk>`_
function directly.
(:user:`tomwhite`, :pr:`1325`)

.. Improvements
.. ~~~~~~~~~~~~
Expand Down
12 changes: 12 additions & 0 deletions sgkit/io/bgen/bgen_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import tempfile
import time
import warnings
from pathlib import Path
from typing import (
Any,
Expand Down Expand Up @@ -446,6 +447,11 @@ def rechunk_bgen(
will run inline so calls to it may be slow. The resulting Dataset is
generated based on the final, serialized Zarr data.

.. deprecated:: 0.11.0
Using rechunker for rechunking in sgkit is deprecated, please use the the
`Xarray chunk <https://docs.xarray.dev/en/stable/generated/xarray.Dataset.chunk.html#xarray.Dataset.chunk>`_
function directly.

Parameters
----------
ds
Expand Down Expand Up @@ -486,6 +492,12 @@ def rechunk_bgen(
Dataset
The rechunked dataset.
"""
warnings.warn(
"Using rechunker for rechunking in sgkit is deprecated, please use the the Xarray 'chunk' function directly.",
DeprecationWarning,
stacklevel=2,
)

if isinstance(output, Path):
output = str(output)

Expand Down
Loading