pybedtools.BedTool.intersect not working, install problem
1
1
Entering edit mode
9.6 years ago
juncheng ▴ 220

I just installed pybedtools on my mac (10.9) as follow:

sudo pip install pybedtools

pybedtools==0.6.7

Then I test the script as recommended for test installing:

import pybedtools
a = pybedtools.example_bedtool('a.bed')
b = pybedtools.example_bedtool('b.bed')
print a.intersect(b)

The last step do not work.

NotImplementedError: "intersectBed" does not appear to be installed or on the path, so this method is disabled.  Please install a more recent version of BEDTools and re-import to use this method.

I didn't find someone with the same problem on pybedtools. Does anyone knows the problem?

Thanks,
Jun

pybedtools • 8.0k views
ADD COMMENT
4
Entering edit mode
9.6 years ago
Ryan Dale 5.0k

Since pybedtools wraps and extends BEDTools, it needs to have BEDTools installed and on the path. BEDTools can't be found on your system, so you're getting this error message.

The bedtools installation docs show multiple methods for installing, including Homebrew and MacPorts.

ADD COMMENT
0
Entering edit mode

Since pybedtools wraps and extends BEDTools, it needs to have BEDTools installed and on the path

That is, even more simply put, copy paste the BEDTools binary file to the same directory as the pybedtools binary file.

ADD REPLY
0
Entering edit mode

There is no guarantee that this works. It will depend on how the tool calls bedtools. The PATH solution is more generic and reliable.

ADD REPLY

Login before adding your answer.

Traffic: 3195 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6