KwanLab / Autometa

Autometa: Automated Extraction of Genomes from Shotgun Metagenomes
https://autometa.readthedocs.io
Other
40 stars 15 forks source link

Print commands run in context in autometa.sh script #274

Closed kirstengott closed 2 years ago

kirstengott commented 2 years ago

Hello,

I think it would be really nice if the commands ran in autometa.sh would be printed to a log file or the screen. For example, the first part of the pipeline script runs

# script:
autometa-length-filter \
    --assembly $assembly \
    --cutoff $length_cutoff \
    --output-fasta $filtered_assembly \
    --output-gc-content $gc_content

And it would be awesome to see the command run by the script with the paths to input files and variables. It would make it easier for me to run steps individually while troubleshooting a failed run. Something like:

# script:
autometa-length-filter \
    --assembly /path/to/assembly \
    --cutoff 3000 \
    --output-fasta /path/to/filtered_assembly \
    --output-gc-content /path/to/gc_content.tsv

Thank you for considering.

Kirsten

Sidduppal commented 2 years ago

@kirstengott Thanks for the suggestion. You can use set -x at the beginning of the bash workflow. This will print all the commands that are being executed on the screen.

kirstengott commented 2 years ago

Thanks, I'll give that a try!