Entering edit mode
6.8 years ago
arsilan324
▴
90
I am trying to run convert_gff3_to_ncbi_tbl.py script but getting this error.
ubt80:EMBLmyGFF3 arslan$ python3 convert_gff3_to_ncbi_tbl.py -i juncus.fasta.transdecoder.refined.gff3 -o arslan.tbl -ln TEST -nap JE -gf juncus-rp.fasta
INFO: splitting mRNA off gene Transcript_138016|g.186294
Traceback (most recent call last):
File "convert_gff3_to_ncbi_tbl.py", line 89, in <module>
main()
File "convert_gff3_to_ncbi_tbl.py", line 82, in main
tbl.print_tbl_from_assemblies(assemblies=assemblies, ofh=ofh, go_obo=args.go_obo, lab_name=args.lab_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/biocode/tbl.py", line 86, in print_tbl_from_assemblies
print_biogene(gene=new_gene, fh=ofh, obo_dict=go_idx, lab_name=lab_name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/biocode/tbl.py", line 117, in print_biogene
gene_coords = utils.interbase0_to_humancoords(gene_loc.fmin, gene_loc.fmax, gene_loc.strand)
NameError: name 'utils' is not defined
Can you please comment how can I fix it? Thanks
Did you install biocode? The script is trying to import some biocode stuff (module / function / class? I don't know how python call them) and failing, hence the error. What happens if you start the python interpreter and try to import biocode?
Yes, I did install it using pip. What do you mean by?
Issue
python3
, the inteactive interpreter will open, then issueimport biocode
.You could try installing biocode with virtualenv + pip.
P.S.: did you use
pip
orpip3
?The biocode libraries were all written with Python3, so installation is needed using pip3. (I'm the author) Here it looks like you might be trying to run it using a GitHub checkout instead. That's fine too, but you'd need to add the biocode/lib dir to your PYTHONPATH if you do it that way. This is all in the README.
https://github.com/jorvis/biocode/blob/master/README.rst