gnu parallel - How do I denote that arguments are related? -
i have following arguments chr1 chr2 chr3
, + -
, 2 3
.
for every chr
want have +
, 2
once , -
, 3
once, this:
parallel --whatflags-to-use?? echo {} {} {} ::: + - ::: 2 3 ::: chr1 chr2 chr3 + 2 chr1 + 2 chr2 + 2 chr3 - 3 chr1 - 3 chr2 - 3 chr3
the closest have gotten this:
parallel --xapply echo {} {} {} ::: + - ::: 2 3 ::: chr1 chr2 chr3 + 2 chr1 + 2 chr3 - 3 chr2
how do this? not see how in brilliant tutorial, perhaps not possible...
parallel echo {} ::: '+ 2' '- 3' ::: chr1 chr2 chr3
if need arguments split, bit harder: want 1 argument depend on another:
parallel echo strand='{=1 $_=$_==2?"+":"-"=}' read={1} chrom={2} ::: 2 3 ::: chr1 chr2 chr3
alternatively:
parallel --xapply echo str={1} read={2} chrom={3} ::: + - ::: 2 3 ::: chr{1,1,2,2,3,3} parallel --colsep ' ' echo str={1} read={2} chrom={3} ::: '+ 2' '- 3' ::: chr{1..3}