pybedtools.bedtool.BedTool.random_subset

BedTool.random_subset(*args, **kwargs)[source]

Return a BedTool containing a random subset.

NOTE: using n will be slower and use more memory than using f.

Parameters:
nint

Number of features to return. Only one of n or f can be provided.

ffloat, 0 <= f <= 1

Fraction of features to return. Cannot be provided with n.

seedfloat or int

Set random.seed