Closed DongzeHE closed 1 year ago
The log /should does print the command being run. For example, I recently had one terminate with:
[2022-12-23T02:27:02Z INFO simpleaf] cmd : "alevin-fry" "quant" "-i" "data/af_quant" "-o" "data/af_quant" "-t" "24" "-m" "t2g_3col.tsv" "-r" "cr-like"
Error: quant failed with exit status ExitStatus(unix_wait_status(512))
The problem is --- WTH is unix_wait_status(512)
? It turns out the path to the t2g_3col.tsv
was wrong. I think some of that can be avoided by better input and output validation between steps (e.g. check all provided input files exist, and when step i
executes, ensure that all expected files for step i+1
exist when it finishes (and print an informative message otherwise).
Right, I also got weird error messages like this. Is there a way to copy and paste the error message returned by salmon and alevin-fry when quitting with errors?
It depends how they report the error, they may not report a message. The standard way to do this would be to capture the standard error buffer and dump that as well. However, these errors (e.g. wait status 512) are usually due to missing files. From that perspective, I think defensive checks for files being where the user expected they were would cover like 80% of the problems.
Basic input file checking has been implemented as of 034d5314467092349407deff7e79a48c15bf3f59. It can still be improved (e.g. to make sure that things expected to be files are files and things expected to be directories are directories). Also, we can (if we choose) explicitly check for the expected files inside of directory arguments. However, I'll consider what we currently have to be a decent solution, or at least the start of one.
One suggestion: when running simpleaf, if we encounter an error, can we print the command being run? I had some path issues when running simpleaf quant. It just told me that mapping failed. To debug it, I had to go to
quant_info.json
and find the mapping command and remove all quotes between arguments and run thesalmon alevin
command.