我想pybedtools
在我正在编译成可执行文件的 python 程序中使用pyinstaller
. 目的是该可执行文件将包含运行程序所需的所有文件,包括BEDtools
作为二进制文件发送。但是,当我尝试使用下面的代码运行 pybedtools 时,我得到一个 NotImplementedError,这意味着 pybedtools 不适用于这种方法。是否可以运行 pybedtools 包装这样的二进制文件?是set_bedtools_path
不是适合这个问题的工具?
示例代码:
import os
import pybedtools
pybedtools.helpers.set_bedtools_path(os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'bedtools.static.binary'))
a = pybedtools.example_bedtool('a.bed')
b = pybedtools.example_bedtool('b.bed')
print(a.intersect(b))