pybedtools intersect using additional options
1
1
Entering edit mode
6.1 years ago
samuel ▴ 260

Hi, I'm trying to learn pybedtools using the intersect and am very new to it.

I want to use the -wb option but can't quite work out how to do this with pybedtools.

At the moment I have:

import pybedtools

a = pybedtools.BedTool(en.bed)
b = pybedtools.BedTool('annot.bed')


a.intersect(b)

If I do:

a.intersect(b, -wb )

I get the error

'NameError: name 'wb' is not defined'

pybedtools • 4.7k views
ADD COMMENT
0
Entering edit mode

I guess it must be :

a.intersect(b, '-wb')

Take care of the quotation marks, otherwise python interpret wb as a variable.

fin swimmer

ADD REPLY
1
Entering edit mode
6.0 years ago
samuel ▴ 260

I got an answer from the developer https://github.com/daler/pybedtools/issues/266

ADD COMMENT

Login before adding your answer.

Traffic: 1898 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