griffithlab / pVACtools

http://www.pvactools.org
BSD 3-Clause Clear License
131 stars 58 forks source link

Write DeepImmuno outputs to unique file locations #1078

Closed susannasiebert closed 4 months ago

susannasiebert commented 4 months ago

This PR fixes the error described in #1075. That error occurs when restarting a run that previously errored out with FileNotFoundError: [Errno 2] No such file or directory: '/path/to/MHC_Class_I/tmp/deepimmuno-cnn-result.txt'. That error occurs in multithreaded mode because the DeepImmuno output file from multiple prediction calls would be written to the same location and then deleted by one of the threads. This PR updates the DeepImmuno calls to write to a unique file path.

The error described in #1075 (ValueError: dict contains fields not in fieldnames: 'DeepImmuno WT IC50 Score', 'DeepImmuno MT IC50 Score') occurs because under the above circumstances a DeepImmuno output file would be created for the failed thread that only contains the header line; not containing any actual predictions. The file would be processed during reruns and lead to this error.

Closes #1075