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 :
Dataset
Dataset
Genotype call dataset.
- size :
int
int
The window size (number of variants).
- step :
int
int
The distance (number of variants) between start positions of windows.
- merge :
bool
bool
(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.
- ds :
- Return type
- Returns
A dataset containing the following variables:
sgkit.variables.window_start_spec
(windows): The index values of window start positions.sgkit.variables.window_stop_spec
(windows): The index values of window stop positions.