jorvis / biocode

Bioinformatics code libraries and scripts
MIT License
504 stars 247 forks source link

convert_gff3_to_gbk.py template error #45

Closed BenjaminSchwessinger closed 7 years ago

BenjaminSchwessinger commented 7 years ago

I am getting the following error after a pip install of biocode when running convert_gff3_to_gbk.py. raise TemplateNotFound(template) jinja2.exceptions.TemplateNotFound: genbank_flat_file_header.template

jorvis commented 7 years ago

Looking at this - can you verify that you were using python3 (and so pip3?) It would be helpful to paste the command you used to run the convert_gff3_to_gbk.py script.

BenjaminSchwessinger commented 7 years ago

So I ran this in an anaconda python3 environment convert_gff3_to_gbk.py -i ../../032017_assembly/Pst_104E_v12_h_ctg.anno.gff3 -g ../../032017_assembly/Pst_104E_v12_h_ctg.fa -seq -o Pst_104E_v12_h_ctg.gbk

The issue was that convert_gff3_to_gbk.py is in my bin and looks for the data folder like this TEMPLATE_ENVIRONMENT = Environment( autoescape=False, loader=FileSystemLoader(os.path.join(PATH, '../data')), trim_blocks=False) . The data folder was not copied to this location. I simply pulled the data folder from git and put it in the right location so all is working now.

jorvis commented 7 years ago

Thanks for tracking that issue down. It reminded me that when doing an installation via PyPi (rather than GitHub clone) that I wasn't handling the data/*.templates files. I've made a series of commits yesterday and today in order to fix this, and commit faee877733f6005aaf94476521d342430158b2e6 was the one where the actual conversion script was changed.. This will be available in the 0.2.0 release of biocode since both the python script and entire installer had to be updated.

jorvis commented 7 years ago

Release 0.2.0 made, and tested within the docker image.