pybedtools.bedtool.BedTool.head¶
- BedTool.head(n=10, as_string=False)[source]¶
Prints the first n lines or returns them if as_string is True
Note that this only opens the underlying file (gzipped or not), so it does not check to see if the file is a valid BED file.
>>> a = pybedtools.example_bedtool('a.bed') >>> a.head(2) chr1 1 100 feature1 0 + chr1 100 200 feature2 0 +