jennahamlin / mashwrapper

MIT License
5 stars 1 forks source link

Convert system commands in logfile from python list to single string #5

Closed chrisgulvik closed 2 years ago

chrisgulvik commented 2 years ago

Description of feature

Converting the python list format into a single string will increase readability and allow for advanced users to run that cmd in isolation if need be with a simple copy/paste.

Example Commands:

module purge && ml nextflow
nextflow run $HOME/mashwrapper/main.nf -profile testUse,singularity --custom_config_base $HOME/mashwrapper/conf
grep -B 1 "'mash'" results/resultsByIsolate/subERR125190_run.log

Current Log Output:

06/14/2022 04:15:20 PM - This is the command...
 ['mash', 'dist', 'myMashDatabase.msh', '-r', 'myCatFile', '-p', '2', '-S', '42']
--
06/14/2022 04:15:24 PM - This is the command...
 ['mash', 'dist', '-r', '-m', '2', 'myMashDatabase.msh', 'myCatFile', '-p', '2', '-S', '123456']

Proposed Log Output:

06/14/2022 04:15:20 PM - This is the command...
% mash dist myMashDatabase.msh -r myCatFile -p 2 -S 42
--
06/14/2022 04:15:24 PM - This is the command...
% mash dist -r -m 2 myMashDatabase.msh myCatFile -p 2 -S 123456
jennahamlin commented 2 years ago

Changed the output from list to just printed commands. See https://github.com/jennahamlin/mashwrapper/commit/0deadcb62c82a744a722d5b2feb9535197236e34