Closed marco-mariotti closed 3 years ago
That's a very good idea @marco-mariotti. Have you encountered such incomplete index files before?
@marco-mariotti I implemented your suggestion and released v0.6.0 to PyPI. Thanks again.
Terrific, thanks! And thanks for developing this awesome package.
Hi, I noticed that upon calling Fasta(filename), pyfaidx starts building the index directly in filename+'.fai'. The problem is that if the process is stopped before finishing for whatever reason, the resulting file will be recognized as a valid file even if basically empty (e.g. try with Ctrl-C). Since the path to the index file is hardcoded, it is hard to circumvent this. I recommend building the index to a temporary file ('.fai.tmp', for example) and move it to its final location only after the index is correctly built.
Thanks,