I need to create a loop to make 2 variables (numerical) increase, one according to the other and all related to a job I have to send to a cluster.
Basically I have to create various groups, and these groups are defined by these 2 variables; for instance 1st group goes from 1 to 10 (1 would be the 1st variable, 10 the 2nd), the 2nd group 11-20 and so on...
I'm creating 169 groups because I have 1690 individuals, and I'm running a script for Chromopainter 169 times (one per each of these groups).
I want to tell my script:
given the initial variables 1 and 10, do the script, increment of 10 for each of the variable and do again the script (loop). I know that to increment the variables I can do this:
for i in {0..159..10}
for j in {10..169..10}
But I can't manage to apply it to the entire thing. This is what I wrote so far:
for count in {1..169}
do
sbatch -J estimate.chr1 -o estimate.chr1.out -e estimate.chr1.error --wrap="module load ChromoPainter/2;
ChromoPainterv2 -g filename.chr1.phase -r fil.recombfile -t IDFILE_FORMAT.txt -o filename.chr1._ChPestimate.$count -a $i $j -i 15 -in -iM"
done
If I want to send the script singularly, for the first group it would work like this:
ChromoPainterv2 -g filename.chr1.phase -r fil.recombfile -t IDFILE_FORMAT.txt -o filename.chr1._ChPestimate.$count -a 1 10 -i 15 -in -iM
Any idea? Thank you in advance