wilkelab / Opfi

A Python package for discovery, annotation, and analysis of gene clusters in genomics or metagenomics data sets.
https://opfi.readthedocs.io/
MIT License
21 stars 5 forks source link

Prevent temp file from being created in source directory #181

Closed jimrybarski closed 3 years ago

jimrybarski commented 3 years ago

Some program we're using creates a bunch of files like _pf85408.f.tmp in the source directory. I'm not sure exactly which one it is, but it either needs to be turned off or we need to clean them up after creation.

jimrybarski commented 3 years ago

It's definitely pilercr, and it only occurs on large files when pilercr is run as a subprocess. However, under normal conditions, it deletes the temporary file. I suspect it's only being left behind when piler crashes. In any event, since the random-seeming number is based on a pid I'd fear introducing a race condition when gene_finder is being run in parallel (in case a pid is recycled - I'm not actually sure how they're assigned, this might be a non-issue). Regardless, this sounds like it's just not worth doing for now.