Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | |||
2 | |||
3 | |||
4 | def chunks(l, n): |
||
5 | """Yield successive n-sized chunks from l.""" |
||
6 | for i in range(0, len(l), n): |
||
7 | yield l[i:i + n] |
||
8 | |||
9 | #main |
||
10 | f = open('pdb_list.txt').read().split() |
||
11 | # 30 = runs * 10 = 300cores |
||
12 | no_of_files = int(round(len(f) / 100)) |
||
13 | c = 0 |
||
14 | for i in chunks(f, no_of_files): |
||
15 | txt = "echo '" |
||
16 | # -g farna_hires.csv |
||
17 | txt += "/home/magnus/mqaprna_env/mqapRNA/main/mqaprna -o FARNA__hires_" + str(c) + " " + " ".join(i) +"'" |
||
18 | txt += " | qsub -N mq" + str(c) + " -V -cwd -pe mpi 1" |
||
19 | print txt |
||
20 | c += 1 |
||
21 | |||
22 |