Assuming you have more than one core, and each invocation can run independently from the rest, you will gain quite a speedup with parallel runs.
A relatively simple way to do this is via the -P
parameter of xargs
- for example, if you have 4 cores:
echo xyz{1..5025} | \
xargs -n 1 -P 4 -I{} /path/to/transeq xyz{} xyz{}.faa -table 11
The -n 1
tells xargs
to pick only one argument out of the list for each invocation (by default it would pass plenty), and the -P 4
tells it to spawn 4 processes at the same time - when one dies, a new one is spawned.
IMHO, you don't need to install GNU parallel for this simple case - xargs
suffices.