Comments (4)
According to https://docs.python.org/2/library/textwrap.html the TextWrapper
class used from the Python library will by default break at hyphens.
Adding break_long_words=False
might be helpful here? That gives:
FT /product="2-amino-4-hydroxy-6-hydroxymethyldihydropteridine
FT pyrophosphokinase"
This passes the ENA validation tool, although it isn't quite as strict as the Prokka Genbank wrapping. Pull request to follow...
from gff3toembl.
Could you reopen this issue as discussed on #68 please?
from gff3toembl.
It seems that break_long_words=False
in Python's textwrap
considers hyphenated terms as a single word, and thus will try to avoid breaking them.
That's generally fine, but we have a problem if the hyphenated term itself is about 60+ characters, meaning even when put on a line on its own once the 21 character FT
indent is added it exceeds the 80 character limit.
The "about" is because things are much tighter if this is the first word as you also have the prefix /product="
to consider, while for the final word there is the extra "
to include.
Sadly if we stick with the default of break_long_words=True
, then Python does not seem to take advantage of hyphens when deciding where to line-break in this corner case - Python bug filed: http://bugs.python.org/issue28660
from gff3toembl.
Thanks for filing the python bug. This format is a royal pain in the modern age.
from gff3toembl.
Related Issues (20)
- v1.0.0 vs v1.0 HOT 3
- Failure to install on Biolinux HOT 29
- Python 3 support HOT 1
- Non-standard indentation of Python code HOT 1
- Document versions of Python supported HOT 5
- self.assertItemsEqual is Python 2.7 only HOT 2
- Format for listing authors not defined HOT 1
- Long author lists break instead of line wrapping HOT 3
- Should unescape %2C in GFF column 9 as comma in EMBL HOT 2
- Can we pip install this? HOT 2
- I have added this to my brew repo (updated to 1.0.9) HOT 2
- linuxbrew recipe needs updating HOT 1
- mac brew install does not work. HOT 1
- Change PROKKA to Prokka in repo description HOT 1
- Sequence header SQ line can exceed 80 characters HOT 5
- How to prepare a novel strain/isolate of a bacteria? HOT 11
- Installation and running problems HOT 3
- No module named 'gt' from bioconda install
- Cannot open *.gff_fixed.gff: No such file or directory
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 gff3toembl.