--output_file does not work properly
Specifying an output directory with a relative path causes errors, e.g. this fails:
$ mkdir genovi $ genovi -o genovi/blah ...
Parsing path input with Pathlib Path(args.outfile).absolute() or os.path.abspath(args.outfile) would fix this.
Hello @marade.
Thanks for pointing this out.
Could you please share the error log with me to have a better idea of how to fix this?
sequence.gb is a file downloaded from GenBank today:
$ genovi -o genovi/blah -i sequence.gb -s complete
[Errno 2] No such file or directory: 'genovi/blah-temp/contig_1-genovi/blah.faa'
Error when transforming gbk to faa.
/home/ubuntu/miniconda3/envs/genovi/lib/python3.7/site-packages/Bio/GenBank/Scanner.py:1219: BiopythonParserWarning: Premature end of file in sequence data
"Premature end of file in sequence data", BiopythonParserWarning
Traceback (most recent call last):
File "/home/ubuntu/miniconda3/envs/genovi/bin/genovi", line 8, in
Hi @marade. I apologize for the delay in replying.
I have committed an update related to the handling of relative paths. It is not yet included in the installable version of GenoVi, but you can find it in the Github repo. It will soon be added to a new version which will include other improvements.
Please do let us know if you have further quesitons.
Sounds good @arodel21. Thanks!
I tried using GenoVi again and found that relative paths still don't work. I see there's a commit related to this here:
https://github.com/robotoD/GenoVi/commit/fdd3c5dc7d2a61ebaed15b31892c83fa3b5d32e6
The code for this commit is not nearly sufficient to address the problem. I'd like to emphasize that GenoVi is fundamentally broken when it comes to handling paths. I'll recommend again extensive use of Pathlib Path().absolute() or os.path.abspath() so that you can handle relative paths correctly.