Comments (6)
Hmm. Are you able to run other tools, or is this specific to genome_coverage
? For example, does this work:
a.intersect(a)
from pybedtools.
Same for a.intersect(a)
NotImplementedError Traceback (most recent call last)
/home/sinclair/<ipython-input-4-bbdb221e5a4c> in <module>()
----> 1 a.intersect(a)
/usr/local/lib/python2.7/dist-packages/pybedtools-0.6.2-py2.7-linux-x86_64.egg/pybedtools/bedtool.pyc in decorated(self, *args, **kwargs)
621 # this calls the actual method in the first place; *result* is
622 # whatever you get back
--> 623 result = method(self, *args, **kwargs)
624
625 # add appropriate tags
/usr/local/lib/python2.7/dist-packages/pybedtools-0.6.2-py2.7-linux-x86_64.egg/pybedtools/bedtool.pyc in not_implemented_func(*args, **kwargs)
139 if not_implemented:
140 def not_implemented_func(*args, **kwargs):
--> 141 raise NotImplementedError(help_str)
142 return not_implemented_func
143
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.
from pybedtools.
Ah, it looks like the bedtools package you get through apt-get is an old version (2.14.3-1). Not sure who is maintaining that package, but there have been a lot of improvements and bug fixes since then. The calling syntax for BEDTools programs changed in 2.15, and pybedtools only supports the new version in part to prevent users from using out-of-date versions of BEDTools . . .
I would strongly suggest installing the latest version (see http://bedtools.readthedocs.org/en/latest/content/installation.html). After installing the latest (currently 2.17.0), do you still get this problem?
from pybedtools.
So it was indeed the version that was too old. However the error message did not suggest this at all. I would advise that if your library doesn't work with the current ubuntu distribution; you should check for it and instruct the user.
However, the example still doesn't work:
In [6]: a.genome_coverage()
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/home/sinclair/OD1/raw/<ipython-input-6-bfb19364e87a> in <module>()
----> 1 a.genome_coverage()
/usr/local/lib/python2.7/dist-packages/pybedtools-0.6.2-py2.7-linux-x86_64.egg/pybedtools/bedtool.pyc in decorated(self, *args, **kwargs)
621 # this calls the actual method in the first place; *result* is
622 # whatever you get back
--> 623 result = method(self, *args, **kwargs)
624
625 # add appropriate tags
/usr/local/lib/python2.7/dist-packages/pybedtools-0.6.2-py2.7-linux-x86_64.egg/pybedtools/bedtool.pyc in wrapped(self, *args, **kwargs)
174 check_for_genome = True
175 if check_for_genome:
--> 176 kwargs = self.check_genome(**kwargs)
177
178 # Add the implicit values to kwargs. If the current BedTool is
/usr/local/lib/python2.7/dist-packages/pybedtools-0.6.2-py2.7-linux-x86_64.egg/pybedtools/bedtool.pyc in check_genome(self, **kwargs)
1176 kwargs['g'] = self.chromsizes
1177 else:
-> 1178 raise ValueError('No genome specified. Use the "g" or '
1179 '"genome" kwargs, or use the '
1180 '.set_chromsizes() method')
If you use a BED file you need to specify a genome, but this is not the case for a BAM file. See http://bedtools.readthedocs.org/en/latest/content/tools/genomecov.html
from pybedtools.
Thanks for pointing this out. As of 79dd4dc, I re-added support for older versions, including the 2.14.3 from Ubuntu repository. After thinking about this, I decided it's not nice for pybedtools to force a user into any particular BEDTools version, and I'm sure you're not the only one using the outdated Ubuntu package.
I also fixed genome_coverage
(and associated tests) so that a genome is not required for BAM file input.
Can you confirm that this works?
from pybedtools.
Nice, it works like a charm now. There I was with my snarky comments about how your library didn't work on my first try and you fixed it in a day. Props to you !
from pybedtools.
Related Issues (20)
- 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. HOT 7
- numpy.int64 has no attribute isdigit HOT 4
- Handling of wide pseudo-bed files (pseudo-bed files interpreted as .sam)? HOT 2
- Customized header HOT 2
- `IndexError: list index out of range` with narrowPeak file HOT 1
- pipenv install trouble HOT 3
- Bed identified as SAM HOT 1
- pybedtools from conda use version 2.26 not 2.3 HOT 3
- Cannot pass argument to pybedtools.sort() HOT 1
- setup.py needs updating for License change
- Missing arm64 MacOS wheel packages HOT 4
- Support for Polars Dataframe needed HOT 2
- 'generator raised StopIteration' error when running 'randomstats' with multiple processes HOT 4
- IndexError with groupby HOT 1
- Could NOT find Arrow (missing: ARROW_INCLUDE_DIR ARROW_LIB_DIR HOT 2
- pybedtools.bedtool.BedTool.save_seqs leaves open .tmp files
- Support Python 3.10 and 3.11 HOT 1
- "python setup.py bdist_wheel did not run successfully" when pip installing with python v3.11 HOT 8
- to_dataframe() creates 0th row with generic names in nucleotide_content HOT 2
- build failure under python 3.11 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybedtools.