funannotate: Funannotate remote fails with OSError in singularity container
Hi Jon,
I try to solve a weird problem which occurs when I run funannotate remote inside my funannotate singularity container. The command runs fine, output is correctly generated but the command fails at the step where the logfile is moved into the logdir. This is the output I get:
-------------------------------------------------------
[10:33 AM]: OS: linux2, 32 cores, ~ 197 GB RAM. Python: 2.7.17
[10:33 AM]: Running 1.7.2
[10:33 AM]: Output directory testgteu already exists
[10:33 AM]: Checking GenBank file for annotation
[10:37 AM]: Predicting secreted and transmembrane proteins using Phobius
[10:37 AM]: Remote searches complete
Traceback (most recent call last):
File "/usr/local/bin/funannotate", line 657, in <module>
main()
File "/usr/local/bin/funannotate", line 647, in main
mod.main(arguments)
File "/usr/local/lib/python2.7/dist-packages/funannotate/remote.py", line 300, in main
os.rename(log_name, os.path.join(outputdir, 'logfiles', log_name))
OSError: [Errno 16] Device or resource busy
The strange thing is that the logfile is created correctly but it can not be moved. I cannot figure out why exactly this happens. Running the same command in the same container in Docker works just fine. Also other funannotate commands don’t produce this error. From what I know, the error can occur when trying to move an open file. But I am not sure if this is the case here. Do you have an idea what could be the problem? As a quick workaround, I am thinking of commenting out line 300 in remote.py when the container is built, but I don’t want to tinker with the internals of funannotate too much, because the behavior of funannotate should be the same regardless of how it is used.
If you have any idea how to fix this I would be very happy to hear it.
Thank you for your time!
all the best,
Philipp
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (17 by maintainers)
@euduca – if everything else is installed (except ete3), all of the tests in
funannotate test -t all --cpus Xshould all pass (I can’t remember off top of my head if the compare test has--run_dndsenabled or not). Infunannotate compareit should only look forete3if you pass--run_dndsoption, thus it should run properly under default settings even ifete3isn’t installed.ete3is literally only used infunannotate compareif you use the--run_dndsoption. So I’m thinking the easiest short term fix to make installation easier on more systems is to removeete3from the conda recipe. Users that want to run dN/dS in compare can still do it, they just need to install ete3 manually.Would that work for you guys?