BedTool.
head
Prints the first n lines or returns them if as_string is True
>>> a = pybedtools.example_bedtool('a.bed') >>> a.head(2) chr1 1 100 feature1 0 + chr1 100 200 feature2 0 +
pybedtools