Comments (11)
Weird, they work fine on my machine (and in the test suite). What command/code exactly are you running ? And what version of DnaFeatureViewer ? Did you install from pip or github ? (although both should work)
from dnafeaturesviewer.
When I run python tests/test_basics.py
, there is no error, but also no output.
when I run python examples/from_genbank.py
, I get the error posted above.
from dnafeaturesviewer.
For the tests, it is normal that there is mno output.
For the examples, that may be because you need to be in the "examples" to run them.
cd examples
python from_genbank.py
from dnafeaturesviewer.
I still get the same error
from dnafeaturesviewer.
After a second look at your error I get the problem, it seems to be a Matplotlib/Mac issue, the Matplotlib canvas should have a "get_renderer" attribute that your graphic backend (called "FigureCanvasMac") doesn't have. What version of matplotlib do you have ?
python -c "import matplotlib; print matplotlib.__version__"
from dnafeaturesviewer.
1.3.1
from dnafeaturesviewer.
That version if from 4 years ago, we may have something there. Can you try upgrading it ? This should install matplotlib 2.x (which as far as i know is retro-compatible so you shouldn't have trouble with other projects):
sudo pip install --upgrade matplotlib
from dnafeaturesviewer.
upgrading matplotlib helped running by_hand.py
and with_plot.py
, but from_genbank.py
still produces following error:
Traceback (most recent call last):
File "from_genbank.py", line 3, in <module>
graphic_record = BiopythonTranslator().translate_record("example_sequence.gb")
File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 468, in translate_record
return grecord_class(sequence_length=len(record.seq), features=[
AttributeError: 'str' object has no attribute 'seq'
Tobiass-Air:examples Tobias$ python from_genbank.py
Traceback (most recent call last):
File "from_genbank.py", line 3, in <module>
graphic_record = BiopythonTranslator().translate_record("example_sequence.gb")
File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 468, in translate_record
return grecord_class(sequence_length=len(record.seq), features=[
AttributeError: 'str' object has no attribute 'seq'`
and running plot_with_bokeh.py
that on:
Traceback (most recent call last):
File "from_genbank.py", line 3, in <module>
graphic_record = BiopythonTranslator().translate_record("example_sequence.gb")
File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 468, in translate_record
return grecord_class(sequence_length=len(record.seq), features=[
AttributeError: 'str' object has no attribute 'seq'
Tobiass-Air:examples Tobias$ python plot_with_bokeh.py
Traceback (most recent call last):
File "plot_with_bokeh.py", line 8, in <module>
record = BiopythonTranslator().translate_record(record="example_sequence.gb")
File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 468, in translate_record
return grecord_class(sequence_length=len(record.seq), features=[
AttributeError: 'str' object has no attribute 'seq'`
from dnafeaturesviewer.
Definitely weird. I just pushed the Github master on PyPI, can you try to upgrade you DnaFeaturesViewer to the latest version, just to be sure ?
sudo pip install --upgrade dna_features_viewer
from dnafeaturesviewer.
it gets even weirder: after updating DnaFeaturesViewer (although the latest version was installed), all the scripts are working. Maybe has to do with first updating Matplotlib and then DnaFeaturesViewer (?)
anyway everything works now. thanks again for your help!
from dnafeaturesviewer.
What this means is that the latest changes and fixes on Github had not been pushed on PyPI, so that was an actual bug. Thanks for the report !
from dnafeaturesviewer.
Related Issues (20)
- Change shape of feature arrows HOT 2
- Cannot apply sequence translation on plot_on_multiple_lines or plot_on_multiple_pages HOT 2
- BiopythonTranslator: SeqFeatures with location_operator='join' get wrong position
- Labels overlap whan sharing axis HOT 2
- Feature request: x_lim best-fit HOT 6
- Enhanced Bokeh support for multiple plots HOT 2
- Linking exon annotations with intron lines, and other things. HOT 5
- Add an example which plots sequence features not starting from 0 HOT 5
- truncated scaffolds from gff files HOT 4
- figure is not coming
- type hints support HOT 1
- Error on BioPython v1.8.0 HOT 9
- type error for global variable related to BioPython update HOT 2
- sequences display from 1 not 0 ? HOT 1
- How to solve the memory problem of batch plotting? HOT 3
- Overlapping arrows in circular DNA HOT 1
- CircularGraphicRecord does not work. Unable to make circular graphs HOT 1
- UndefinedSequenceError with gff files and BioPython 1.81
- Oval or diamond/octagon in addition to arrows for displayed features? HOT 1
- 'Seq' object has no attribute 'defined' HOT 2
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 dnafeaturesviewer.