Code Monkey home page Code Monkey logo

gff3-py's People

Contributors

hotdogee avatar hsiaoyi0504 avatar timeu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gff3-py's Issues

Correct CDS

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 correction?

Phase was checked successfully in many of the features in a current GFF3, but are incorrect phases corrected?

Thanks.

CDS phase checkup: "ValueError: Unknown format code 'd' for object of type 'str'"

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'

Error under Python 3.5

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

Pip install in Ubuntu

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.