BedTool.
random_subset
Return a BedTool containing a random subset.
Example usage:
>>> a = pybedtools.example_bedtool('a.bed') >>> b = a.random_subset(2) >>> len(b) 2
pybedtools
BedTool
BEDTools
pybedtools.contrib