API: downsampling¶
-
blockify.downsampling.
downsample
(input_file, n, seed=None, naive=False)[source]¶ Core downsampling method
- Parameters
input_file (
pandas
DataFrame) – Input data (e.g. BED, qBED, CCF) as apandas
DataFramen (int) – Number of entries to sample
seed (int) – Seed for random number generator
naive (bool) – Choose whether to sample each entry with equal probability (True) or weighted by the value in the fourth column (if supplied)
- Returns
downsampled_file – Input file after downsampling
- Return type
BedTool object