annotate structure-923cc9e6aa30/Structure.py @ 0:2c0b270dae70 draft default tip

Uploaded
author ylebrascnrs
date Thu, 14 Sep 2017 08:33:05 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
1 #!/usr/bin/env python
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
2 """
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
3 Structure is a script for model-based clustering method for inferring population structure using genotype data
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
4
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
5 Created by Yvan LE BRAS
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
6 """
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
7 import optparse, os, sys, subprocess, tempfile, glob, shutil
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
8 import zipfile, tarfile, gzip
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
9 from os.path import basename
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
10
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
11 def __main__():
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
12
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
13
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
14 # arguments recuperation
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
15 parser = optparse.OptionParser()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
16 parser.add_option("--input")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
17 parser.add_option("--param")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
18 parser.add_option("--extraparam")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
19 # multifile management
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
20 parser.add_option("--K")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
21 parser.add_option("--k2")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
22 parser.add_option("--k3")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
23 parser.add_option("--k4")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
24 parser.add_option("--k5")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
25 parser.add_option("--k6")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
26 parser.add_option("--k7")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
27 parser.add_option("--k8")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
28 parser.add_option("--k9")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
29 parser.add_option("--k10")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
30 parser.add_option("--t")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
31 parser.add_option("--N")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
32 parser.add_option("--L")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
33 parser.add_option("--D")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
34 # output management
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
35 parser.add_option("--logfile")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
36 parser.add_option("--id")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
37 parser.add_option("--workdir")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
38 parser.add_option("--compress_output")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
39 # additionnal outputs
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
40 parser.add_option("--total_output")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
41 (options, args) = parser.parse_args()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
42
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
43 # create the working dir
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
44 tmp_dir = tempfile.mkdtemp(dir=options.workdir)
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
45 tmp_output_dir = tempfile.mkdtemp(dir=tmp_dir)
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
46
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
47 print tmp_dir
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
48
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
49 # create the structure command input line
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
50 cmd_files=" -m "+options.param+" -e "+options.extraparam+" -i "+options.input+" "
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
51
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
52 # create the structure command line. The idea is to run one job by k value then take all results from tmp_out_putdir
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
53 cmd_options=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
54 cmd_options0=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
55 cmd_options1=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
56 cmd_options2=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
57 cmd_options3=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
58 cmd_options4=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
59 cmd_options5=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
60 cmd_options6=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
61 cmd_options7=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
62 cmd_options8=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
63 cmd_options9=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
64 cmd_options10=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
65 cmd_options11=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
66 cmd_options12=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
67 cmd_options13=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
68 cmd_options14=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
69 cmd_options15=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
70 cmd_options16=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
71 cmd_options17=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
72 cmd_options18=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
73 cmd_options19=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
74 cmd_options20=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
75 cmd_options21=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
76 cmd_options22=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
77 cmd_options23=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
78 cmd_options24=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
79 cmd_options25=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
80 cmd_options26=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
81 cmd_options27=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
82 cmd_options28=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
83 cmd_options29=""
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
84
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
85 if options.N:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
86 cmd_options0+=" -N "+options.N
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
87 if options.L:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
88 cmd_options0+=" -L "+options.L
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
89 if options.D:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
90 cmd_options0+=" -D "+options.D
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
91 if options.K:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
92 cmd_options+=" -K "+options.K+" -o "+tmp_output_dir+"/outfile_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
93 if options.k2:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
94 cmd_options1+=" -K "+options.k2+" -o "+tmp_output_dir+"/outfilesecondk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
95 if options.k3:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
96 cmd_options2+=" -K "+options.k3+" -o "+tmp_output_dir+"/outfilethirdk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
97 if options.k4:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
98 cmd_options3+=" -K "+options.k4+" -o "+tmp_output_dir+"/outfilefourthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
99 if options.k5:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
100 cmd_options4+=" -K "+options.k5+" -o "+tmp_output_dir+"/outfilefifthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
101 if options.k6:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
102 cmd_options5+=" -K "+options.k6+" -o "+tmp_output_dir+"/outfilesixthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
103 if options.k7:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
104 cmd_options6+=" -K "+options.k7+" -o "+tmp_output_dir+"/outfileseventhk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
105 if options.k8:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
106 cmd_options7+=" -K "+options.k8+" -o "+tmp_output_dir+"/outfileeigthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
107 if options.k9:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
108 cmd_options8+=" -K "+options.k9+" -o "+tmp_output_dir+"/outfileninthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
109 if options.k10:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
110 cmd_options9+=" -K "+options.k10+" -o "+tmp_output_dir+"/outfiletenthk_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
111 if options.K and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
112 cmd_options10+=" -K "+options.K+" -o "+tmp_output_dir+"/outfile_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
113 if options.k2 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
114 cmd_options11+=" -K "+options.k2+" -o "+tmp_output_dir+"/outfilesecondk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
115 if options.k3 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
116 cmd_options12+=" -K "+options.k3+" -o "+tmp_output_dir+"/outfilethirdk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
117 if options.k4 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
118 cmd_options13+=" -K "+options.k4+" -o "+tmp_output_dir+"/outfilefourthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
119 if options.k5 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
120 cmd_options14+=" -K "+options.k5+" -o "+tmp_output_dir+"/outfilefifthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
121 if options.k6 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
122 cmd_options15+=" -K "+options.k6+" -o "+tmp_output_dir+"/outfilesixthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
123 if options.k7 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
124 cmd_options16+=" -K "+options.k7+" -o "+tmp_output_dir+"/outfileseventhk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
125 if options.k8 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
126 cmd_options17+=" -K "+options.k8+" -o "+tmp_output_dir+"/outfileeigthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
127 if options.k9 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
128 cmd_options18+=" -K "+options.k9+" -o "+tmp_output_dir+"/outfileninthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
129 if options.k10 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
130 cmd_options19+=" -K "+options.k10+" -o "+tmp_output_dir+"/outfiletenthk_run2_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
131 if options.K and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
132 cmd_options20+=" -K "+options.K+" -o "+tmp_output_dir+"/outfile_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
133 if options.k2 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
134 cmd_options21+=" -K "+options.k2+" -o "+tmp_output_dir+"/outfilesecondk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
135 if options.k3 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
136 cmd_options22+=" -K "+options.k3+" -o "+tmp_output_dir+"/outfilethirdk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
137 if options.k4 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
138 cmd_options23+=" -K "+options.k4+" -o "+tmp_output_dir+"/outfilefourthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
139 if options.k5 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
140 cmd_options24+=" -K "+options.k5+" -o "+tmp_output_dir+"/outfilefifthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
141 if options.k6 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
142 cmd_options25+=" -K "+options.k6+" -o "+tmp_output_dir+"/outfilesixthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
143 if options.k7 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
144 cmd_options26+=" -K "+options.k7+" -o "+tmp_output_dir+"/outfileseventhk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
145 if options.k8 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
146 cmd_options27+=" -K "+options.k8+" -o "+tmp_output_dir+"/outfileeigthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
147 if options.k9 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
148 cmd_options28+=" -K "+options.k9+" -o "+tmp_output_dir+"/outfileninthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
149 if options.k10 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
150 cmd_options29+=" -K "+options.k10+" -o "+tmp_output_dir+"/outfiletenthk_run3_f"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
151
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
152
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
153 if options.t and options.t == 'true' and not options.K:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
154 cmd='structure'+cmd_files+" "+cmd_options0+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
155
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
156 # execute command line
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
157 proc = subprocess.Popen( args=cmd, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
158 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
159
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
160 print "\n[INFO] : "+cmd
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
161
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
162 if options.t and options.t == 'true' and options.K:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
163 cmd1='structure'+cmd_files+" "+cmd_options0+" "+cmd_options+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
164
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
165 # execute command line
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
166 proc = subprocess.Popen( args=cmd1, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
167 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
168
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
169 print "\n[INFO] : "+cmd1
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
170
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
171 #os.system("mv outfile_f outfilefirstk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
172
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
173 if options.k2:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
174 cmd2='structure'+cmd_files+" "+cmd_options0+" "+cmd_options1+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
175
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
176 proc = subprocess.Popen( args=cmd2, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
177 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
178
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
179 #os.system("mv outfile_f outfilesecondk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
180
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
181 if options.k3:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
182 cmd3='structure'+cmd_files+" "+cmd_options0+" "+cmd_options2+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
183
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
184 proc = subprocess.Popen( args=cmd3, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
185 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
186
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
187 #os.system("mv outfile_f outfilethirdk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
188
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
189 if options.k4:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
190 cmd4='structure'+cmd_files+" "+cmd_options0+" "+cmd_options3+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
191
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
192 proc = subprocess.Popen( args=cmd4, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
193 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
194
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
195 #os.system("mv outfile_f outfilefourthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
196
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
197 if options.k5:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
198 cmd5='structure'+cmd_files+" "+cmd_options0+" "+cmd_options4+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
199
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
200 proc = subprocess.Popen( args=cmd5, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
201 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
202
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
203 #os.system("mv outfile_f outfilefifthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
204
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
205 if options.k6:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
206 cmd6='structure'+cmd_files+" "+cmd_options0+" "+cmd_options5+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
207
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
208 proc = subprocess.Popen( args=cmd6, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
209 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
210
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
211 #os.system("mv outfile_f outfilesixthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
212
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
213 if options.k7:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
214 cmd7='structure'+cmd_files+" "+cmd_options0+" "+cmd_options6+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
215
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
216 proc = subprocess.Popen( args=cmd7, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
217 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
218
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
219 #os.system("mv outfile_f outfileseventhk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
220
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
221 if options.k8:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
222 cmd8='structure'+cmd_files+" "+cmd_options0+" "+cmd_options7+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
223
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
224 proc = subprocess.Popen( args=cmd8, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
225 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
226
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
227 #os.system("mv outfile_f outfileeigthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
228
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
229 if options.k9:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
230 cmd9='structure'+cmd_files+" "+cmd_options0+" "+cmd_options8+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
231
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
232 proc = subprocess.Popen( args=cmd9, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
233 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
234
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
235 #os.system("mv outfile_f outfileninthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
236
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
237 if options.k10:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
238 cmd10='structure'+cmd_files+" "+cmd_options0+" "+cmd_options9+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
239
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
240 proc = subprocess.Popen( args=cmd10, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
241 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
242
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
243 if options.K and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
244 cmd11='structure'+cmd_files+" "+cmd_options0+" "+cmd_options10+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
245 cmd21='structure'+cmd_files+" "+cmd_options0+" "+cmd_options20+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
246
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
247 proc = subprocess.Popen( args=cmd11, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
248 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
249 proc = subprocess.Popen( args=cmd21, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
250 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
251
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
252 if options.k2 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
253 cmd12='structure'+cmd_files+" "+cmd_options0+" "+cmd_options11+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
254 cmd22='structure'+cmd_files+" "+cmd_options0+" "+cmd_options21+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
255
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
256 proc = subprocess.Popen( args=cmd12, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
257 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
258 proc = subprocess.Popen( args=cmd22, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
259 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
260
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
261 #os.system("mv outfile_f outfilesecondk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
262
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
263 if options.k3 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
264 cmd13='structure'+cmd_files+" "+cmd_options0+" "+cmd_options12+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
265 cmd23='structure'+cmd_files+" "+cmd_options0+" "+cmd_options22+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
266
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
267 proc = subprocess.Popen( args=cmd13, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
268 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
269 proc = subprocess.Popen( args=cmd23, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
270 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
271
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
272 #os.system("mv outfile_f outfilethirdk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
273
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
274 if options.k4 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
275 cmd14='structure'+cmd_files+" "+cmd_options0+" "+cmd_options13+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
276 cmd24='structure'+cmd_files+" "+cmd_options0+" "+cmd_options23+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
277
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
278 proc = subprocess.Popen( args=cmd14, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
279 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
280 proc = subprocess.Popen( args=cmd24, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
281 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
282
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
283 #os.system("mv outfile_f outfilefourthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
284
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
285 if options.k5 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
286 cmd15='structure'+cmd_files+" "+cmd_options0+" "+cmd_options14+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
287 cmd25='structure'+cmd_files+" "+cmd_options0+" "+cmd_options24+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
288
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
289 proc = subprocess.Popen( args=cmd15, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
290 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
291 proc = subprocess.Popen( args=cmd25, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
292 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
293
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
294 #os.system("mv outfile_f outfilefifthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
295
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
296 if options.k6 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
297 cmd16='structure'+cmd_files+" "+cmd_options0+" "+cmd_options15+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
298 cmd26='structure'+cmd_files+" "+cmd_options0+" "+cmd_options25+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
299
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
300 proc = subprocess.Popen( args=cmd16, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
301 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
302 proc = subprocess.Popen( args=cmd26, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
303 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
304
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
305 #os.system("mv outfile_f outfilesixthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
306
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
307 if options.k7 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
308 cmd17='structure'+cmd_files+" "+cmd_options0+" "+cmd_options16+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
309 cmd27='structure'+cmd_files+" "+cmd_options0+" "+cmd_options26+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
310
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
311 proc = subprocess.Popen( args=cmd17, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
312 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
313 proc = subprocess.Popen( args=cmd27, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
314 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
315
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
316 #os.system("mv outfile_f outfileseventhk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
317
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
318 if options.k8 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
319 cmd18='structure'+cmd_files+" "+cmd_options0+" "+cmd_options17+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
320 cmd28='structure'+cmd_files+" "+cmd_options0+" "+cmd_options27+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
321
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
322 proc = subprocess.Popen( args=cmd18, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
323 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
324 proc = subprocess.Popen( args=cmd28, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
325 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
326
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
327 #os.system("mv outfile_f outfileeigthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
328
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
329 if options.k9 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
330 cmd19='structure'+cmd_files+" "+cmd_options0+" "+cmd_options18+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
331 cmd29='structure'+cmd_files+" "+cmd_options0+" "+cmd_options28+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
332
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
333 proc = subprocess.Popen( args=cmd19, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
334 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
335 proc = subprocess.Popen( args=cmd29, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
336 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
337
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
338 #os.system("mv outfile_f outfileninthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
339
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
340 if options.k10 and options.t and options.t == 'true':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
341 cmd20='structure'+cmd_files+" "+cmd_options0+" "+cmd_options19+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
342 cmd30='structure'+cmd_files+" "+cmd_options0+" "+cmd_options29+" 2>&1"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
343
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
344 proc = subprocess.Popen( args=cmd20, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
345 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
346 proc = subprocess.Popen( args=cmd30, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
347 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
348
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
349 #os.system("mv outfile_f outfiletenthk_f")
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
350
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
351 # postprocesses
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
352 #if os.path.exists(tmp_output_dir+'/outfile_f'):
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
353 # os.system('mv '+tmp_output_dir+'/outfile_f '+options.logfile)
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
354 #else:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
355 # sys.stderr.write('Error in structure execution; Please read the additional output (stdout)\n')
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
356
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
357
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
358 # copy all files inside tmp_dir into workdir
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
359 list_files = glob.glob(tmp_output_dir+'/*')
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
360
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
361
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
362 # if compress output is total
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
363 if options.compress_output == 'total':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
364 mytotalzipfile=zipfile.ZipFile(tmp_output_dir+'/total.zip.temp', 'w')
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
365 os.chdir(tmp_output_dir)
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
366
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
367 for i in list_files:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
368 mytotalzipfile.write(os.path.basename(i))
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
369 #command = "mv "+i+" "+options.workdir+ "/primary_" + options.id + "_" + os.path.basename(i).replace("_", ".") + "_visible_txt"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
370 #proc = subprocess.Popen( args=command, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
371 #returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
372
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
373 # return the unique archive
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
374 os.system("mv "+tmp_output_dir+'/total.zip.temp'+" "+options.total_output)
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
375
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
376 # if compress output is default
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
377 if options.compress_output == 'default':
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
378
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
379 for i in list_files:
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
380 command = "mv "+i+" "+options.workdir+ "/primary_" + options.id + "_" + os.path.basename(i).replace("_", ".") + "_visible_txt"
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
381 proc = subprocess.Popen( args=command, shell=True )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
382 returncode = proc.wait()
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
383
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
384
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
385
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
386 #clean up temp files
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
387 shutil.rmtree( tmp_dir )
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
388
2c0b270dae70 Uploaded
ylebrascnrs
parents:
diff changeset
389 if __name__=="__main__": __main__()