Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report_gff3_statistics.py, 'Gene' object has no attribute 'length' #16

Closed
pezhmansafdari opened this issue Jun 13, 2014 · 2 comments
Closed
Labels

Comments

@pezhmansafdari
Copy link

Hi,
When I am trying to run "report_gff3_statistics.py" script for a file which looks like what I have pasted below, I get this error:
Traceback (most recent call last):
File "report_gff_stat.py", line 113, in
main()
File "report_gff_stat.py", line 56, in main
type_lengths['gene'] += gene.length
AttributeError: 'Gene' object has no attribute 'length'
T
he gff3 file:
28 scaffold_936 phytozome9_0 gene 5553 6897 . - . ID=gene4;Name=Aquca_936_00001
29 scaffold_936 phytozome9_0 mRNA 5553 6897 . - . ID=mRNA4;Parent=gene4;Name=Aquca_936_00001.1;pacid=22051342;longest=1
30 scaffold_936 phytozome9_0 three_prime_UTR 5553 5787 . - . Parent=mRNA4;pacid=22051342
31 scaffold_936 phytozome9_0 exon 5553 5897 . - . Parent=mRNA4;pacid=22051342
32 scaffold_936 phytozome9_0 CDS 5788 5897 . - 2 Parent=mRNA4;pacid=22051342
33 scaffold_936 . intron 5898 6021 . - . Parent=mRNA4
34 scaffold_936 phytozome9_0 exon 6022 6086 . - . Parent=mRNA4;pacid=22051342
35 scaffold_936 phytozome9_0 CDS 6022 6086 . - 1 Parent=mRNA4;pacid=22051342
36 scaffold_936 . intron 6087 6219 . - . Parent=mRNA4
37 scaffold_936 phytozome9_0 exon 6220 6305 . - . Parent=mRNA4;pacid=22051342
38 scaffold_936 phytozome9_0 CDS 6220 6305 . - 0 Parent=mRNA4;pacid=22051342
39 scaffold_936 . intron 6306 6802 . - . Parent=mRNA4
40 scaffold_936 phytozome9_0 CDS 6803 6895 . - 0 Parent=mRNA4;pacid=22051342
41 scaffold_936 phytozome9_0 exon 6803 6897 . - . Parent=mRNA4;pacid=22051342
42 scaffold_936 phytozome9_0 five_prime_UTR 6896 6897 . - . Parent=mRNA4;pacid=22051342

Thanks,

Pezhman

@jorvis
Copy link
Owner

jorvis commented Jun 13, 2014

The only issue I see there that makes your GFF non-standard is that it lacks IDs on the exon and CDS features, but I'm not sure that should cause this particular script to fail. Do you think you could mail the whole GFF to me or make it available somewhere for me to test against?

@jorvis jorvis added the bug label Jun 13, 2014
@jorvis
Copy link
Owner

jorvis commented Jul 17, 2014

Closing due to lack of response. Please re-open if you can post an example file somewhere that reproduces this issue.

@jorvis jorvis closed this as completed Jul 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants