Also, when checking for bgzip, call it with the -h option so that it doesn't hang waiting for input on stdin.
I encountered a bug where pybedtools gives an error message about /tmp/something.gz not existing when trying to tabix a bed file. This turned out to be because bgzip was missing from the path (but tabix was present). This checks for both binaries separately, and results in a more helpful error message.
previously, to_dataframe() on a GFF file with counts appended as a 10th column would only pass the 9 field names to pandas.read_table, which would see 10 fields in the file and assume the chrom column was the index.
… to be checked manually.