If there are no extra files then --xapply
should work for you?
Gnu parallel with two input files without all combinations of input sources being generated
-
06-10-2022 - |
Question
I have two files with identical basename that I want to parse using my Ruby script and in a library with just one pair of files this works:
parallel -j 4 "prodigal_pfam_merger.rb {1} {2} > {1}.final.gff" ::: *.gff.parsed ::: *.domtblout.parsed
But given that Parallel will give you all combinations of input sources, this does not work when working with multiple sets of files. What I need is only the combination with shared base filename. What would work is if it is possibile to remove two extensions (2 times {.} or {..}), then I would do:
parallel -j 4 "prodigal_pfam_merger.rb {} {..}.domtblout.parsed > {}.final.gff" ::: *.gff.parsed
and yes Ole Tange, I am looking at you ;-)
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow