File "/usr/local/tools/_conda/envs/__staramr@0.7.2/lib/python3.7/site-packages/staramr/blast/JobHandler.py", line 289, in _make_blast_db
err_msg = re.findall('REF\|(.*?)\'', err_msg)[0]
IndexError: list index out of range
Cause
While we weren't able to reproduce the issue, the error itself is triggered because we are parsing the output of makeblastdb and searching for particular patterns to extract an appropriate error message (re.findall('REF\|(.*?)\''). Perhaps either STDERR of makeblastdb was empty for the above issue, or different versions of blast print different messages. See below code
Fix for #155
Error message
Cause
While we weren't able to reproduce the issue, the error itself is triggered because we are parsing the output of
makeblastdb
and searching for particular patterns to extract an appropriate error message (re.findall('REF\|(.*?)\''
). Perhaps either STDERR ofmakeblastdb
was empty for the above issue, or different versions of blast print different messages. See below codehttps://github.com/phac-nml/staramr/blob/6e8ded8a150f01bcd2fa0c6e3b116bf5c567c1dd/staramr/blast/JobHandler.py#L287-L290
Solution
The fix works by defaulting to just printing the full STDERR of
makeblastdb
if we can't pull out a more specific error message (rather than crashing).