sgkit.window

sgkit.window(ds, size, step, merge=True)

Add fixed-size windowing information to a dataset.

Windows are defined over the variants dimension, and are used by some downstream functions to calculate statistics for each window.

Parameters
ds : DatasetDataset

Genotype call dataset.

size : intint

The window size (number of variants).

step : intint

The distance (number of variants) between start positions of windows.

merge : boolbool (default: True)

If True (the default), merge the input dataset and the computed output variables into a single dataset, otherwise return only the computed output variables. See Dataset merge behavior for more details.

Return type

DatasetDataset

Returns

A dataset containing the following variables: