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 a pandas DataFrame

  • n (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

blockify.downsampling.downsample_from_command_line(args)[source]

Wrapper function for the command line function blockify downsample

Parameters

args (argparse.Namespace object) – Input from command line

Returns

downsampled_file – Downsampled command line data

Return type

BedTool