jorvis/ergatis — pull request #1 by jonathancrabtree (2014-07-03 19:08:21+00:00)
Title: Fix for silent bug/race condition in genbank2bsml.

genbank2bsml creates .CDS.fsa and .polypeptide.fsa files associated with each GenBank file it converts to BSML. The filenames are prefixed with the input sequence id and these files are created in the _same_ output directory as the output BSML file. The problem arises when running genbank2bsml on multiple input GenBank files using the Ergatis genbank2bsml component, IF any two of the input GenBank with the same LOCUS id (or no id at all, in some older versions of genbank2bsml.pl) happen to get processed in the same Ergatis group (meaning that their output goes into the same directory) then whichever one runs last (in that same directory) will overwrite the .CDS.fsa and .polypeptide.fsa files that are already there. Ergatis reports the genbank2bsml run as successful but then when you try to do something that uses the Seq-data-imports (like running a comparative pipeline) then you'll get failures due to the missing/overwritten polypeptide files. This change makes genbank2bsml exit with an error when it detects that it is about to overwrite the sequence files created by a previous (or concurrent) genbank2bsml run.