diff --git a/docs/api.rst b/docs/api.rst index 113a0658e..512a3ccda 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -23,6 +23,10 @@ BGEN PLINK ----- +.. deprecated:: 0.11.0 + Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + .. currentmodule:: sgkit.io.plink .. autosummary:: :toctree: generated/ diff --git a/docs/changelog.rst b/docs/changelog.rst index ec104cbbf..ea57b00ff 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,8 +14,12 @@ Changelog .. Breaking changes .. ~~~~~~~~~~~~~~~~ -.. Deprecations -.. ~~~~~~~~~~~~ +Deprecations +~~~~~~~~~~~~ + +- Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + (:user:`tomwhite`, :pr:`1324`, :issue:`1318`) .. Improvements .. ~~~~~~~~~~~~ diff --git a/sgkit/io/plink/__init__.py b/sgkit/io/plink/__init__.py index ea42b16ca..7e63c7ce1 100644 --- a/sgkit/io/plink/__init__.py +++ b/sgkit/io/plink/__init__.py @@ -1,3 +1,11 @@ +import warnings + +warnings.warn( + "Functions for reading and writing plink are deprecated, please use the bio2zarr and vcztools packages.", + DeprecationWarning, + stacklevel=2, +) + try: from .plink_reader import plink_to_zarr, read_plink from .plink_writer import write_plink, zarr_to_plink diff --git a/sgkit/io/plink/plink_reader.py b/sgkit/io/plink/plink_reader.py index 274d3208c..b6da1c012 100644 --- a/sgkit/io/plink/plink_reader.py +++ b/sgkit/io/plink/plink_reader.py @@ -147,6 +147,10 @@ def read_plink( Loads a single PLINK dataset as dask arrays within a Dataset from bed, bim, and fam files. + .. deprecated:: 0.11.0 + Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + Parameters ---------- path @@ -328,6 +332,10 @@ def plink_to_zarr( Refer to :func:`read_plink` for details and limitations. + .. deprecated:: 0.11.0 + Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + Parameters ---------- path diff --git a/sgkit/io/plink/plink_writer.py b/sgkit/io/plink/plink_writer.py index 4b5bc9bed..42939b492 100644 --- a/sgkit/io/plink/plink_writer.py +++ b/sgkit/io/plink/plink_writer.py @@ -49,6 +49,10 @@ def write_plink( - ``sample_phenotype``: Phenotype code equal to 1 for control, 2 for case, and -1 for missing + .. deprecated:: 0.11.0 + Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + Parameters ---------- ds @@ -146,6 +150,10 @@ def zarr_to_plink( Refer to :func:`write_plink` for details and limitations. + .. deprecated:: 0.11.0 + Functions for reading and writing plink are deprecated, please use the `bio2zarr `_ + and `vcztools `_ packages. + Parameters ---------- input