Closed nick-youngblut closed 1 year ago
More generally, using python functions instead of os.system()
for system level tasks, such as:
os.system('rm -rf '+kmer_sets_l2+'/Colinear_Block')
is generally more robust, since python-level errors are easier to detect and debug (e.g., you get a trackback).
So, the code above could be re-written as:
import os
import shutil
shutil.rmtree(os.path.join(kmer_sets_l2, 'Colinear_Block'))
Hi, Thanks a lot for your suggestions and contributions to StrainScan! The codes have been tested & debugged by me and updated based on the codes you provided. Now, StrainScan_build has a better code style. :)
It appears that system calls (eg., calling dashing) are not done in a way that returns the stderr if the child job fails. For example:
Switching
os.system
toPopen
would be helpful. For instance: