hotdogee / gff3-py Goto Github PK
View Code? Open in Web Editor NEWManipulate genomic features and validate the syntax and reference sequence of your GFF3 files
License: ISC License
Manipulate genomic features and validate the syntax and reference sequence of your GFF3 files
License: ISC License
Nice features, validation is good too.
Is there an option planned to be able to create correct CDS features
-where they go beyond exon features
-or if no CDS exist, create CDS features for every exon in the GFF3.
These would be useful.
Thanks, Colin
Phase was checked successfully in many of the features in a current GFF3, but are incorrect phases corrected?
Thanks.
Hi there,
I just discovered your nice gff3 tool during my search for a tool adding the phase to the CDS's in a gff file ( (phases are missing for all CDS, I have the corresponding genomic.fa from an insect). However, I have troubles with checking the phase of the CDS as it throws an error about unknown format code. Do you have any idea how to mitigate this? Any help would be greatly appreciated!
my command
python /opt/scripts/gff_fix.py --gff_file edit.1.0.annotations.formatted.gff --fasta_file Edil.fa --allowed_num_of_n 0 --check_n_feature_types CDS --report_file Edil.1.0.gff.validation_report.txt
output:
INFO Checking GFF3 file (edit.1.0.annotations.formatted.gff)...
INFO Checking syntax and formatting...
INFO Checking reference seqid, bounds and N count...
INFO Checking parent boundaries...
Traceback (most recent call last):
File "/opt/scripts/gff_fix.py", line 139, in
gff3.check_phase()
File "/usr/local/lib/python2.7/dist-packages/gff3/gff3.py", line 213, in check_phase
self.add_line_error(line, {'message': 'Wrong phase {0:d}, should be {1:d}'.format(line['phase'], phase), 'error_type': 'PHASE'})
ValueError: Unknown format code 'd' for object of type 'str'
when trying to use .parse on a normal gff file under Python 3.5 I get this:
gff.parse(gff_file)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-6-3986eab23c03> in <module>()
----> 1 gff.parse(gff_file)
/home/ilya/miniconda2/envs/stdsci/lib/python3.5/site-packages/gff3/gff3.py in parse(self, gff_file, strict)
441 if line_strip != line_raw[:len(line_strip)]:
442 self.add_line_error(line_data, {'message': 'White chars not allowed at the start of a line', 'error_type': 'FORMAT', 'location': ''})
--> 443 if current_line_num == 1 and not line_strip.startswith('##gff-version'):
444 self.add_line_error(line_data, {'message': '"##gff-version" missing from the first line', 'error_type': 'FORMAT', 'location': ''})
445 if len(line_strip) == 0:
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
On Ubuntu there's a problem with installation
$ sudo pip3 install gff3==1.0.0
Collecting gff3==1.0.0
ERROR: Could not find a version that satisfies the requirement gff3==1.0.0 (from versions: 1.0.0.macosx-10.14-x86_64, 0.1.0, 0.2.0, 0.3.0)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.