How to parallel task in bash elegantly?
Are there any elegant way to parallel processing in bash? Something like R packages "parallel" or Python module "multiprocessing"! Thanks!
• 1,358 views
•
link
1 answer
GNU parallel is a very flexible tool for this, e.g.
ls *.fastq | parallel -j 8 'bwa mem ref.fa {} > {.}.sam'
Use 8 jobs, do alignment for each file in *.fastq, output is input without extension (+ .sam).
• 1 views
•
link
Log in to answer this question.
Hello wang.yiguan!
Questions similar to yours can already be found at:
We have closed your question to allow us to keep similar content in the same thread.
If you disagree with this please tell us why in a reply below. We'll be happy to talk about it.
Cheers!
PS: many duplicate on biostars.search for gnu parallel, Makefile , snakemake, cwl, xargs ...