annotate STACKS_population.py @ 2:c9e10e0d6c10

fix discard file
author cmonjeau
date Mon, 24 Aug 2015 15:39:12 +0000
parents d6ba40f6c824
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
1 #!/usr/bin/python
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
2 # -*- coding: utf-8 -*-
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
3
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
4 import sys
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
5 import re
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
6 import os
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
7 import tempfile
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
8 import shutil
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
9 import subprocess
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
10 import glob
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
11 import argparse
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
12 from os.path import basename
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
13 import zipfile
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
14 import tarfile
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
15 import gzip
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
16 from galaxy.datatypes.checkers import *
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
17 from stacks import *
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
18
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
19
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
20 def __main__():
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
21
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
22 # arguments recuperation
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
23
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
24 parser = argparse.ArgumentParser()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
25 parser.add_argument('-P')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
26 parser.add_argument('-M')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
27 parser.add_argument('-b')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
28 parser.add_argument('--vcf', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
29 parser.add_argument('--genepop', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
30 parser.add_argument('--structure', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
31 parser.add_argument('-e')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
32 parser.add_argument('--genomic', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
33 parser.add_argument('--fasta', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
34 parser.add_argument('--phase', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
35 parser.add_argument('--beagle', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
36 parser.add_argument('--plink', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
37 parser.add_argument('--phylip', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
38 parser.add_argument('--phylip_var', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
39 parser.add_argument('--write_single_snp', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
40 parser.add_argument('-k', action='store_true')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
41
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
42 # advanced options
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
43 parser.add_argument('--advanced_options_activate')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
44 parser.add_argument('-B')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
45 parser.add_argument('-W')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
46 parser.add_argument('-r')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
47 parser.add_argument('-p')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
48 parser.add_argument('-m')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
49 parser.add_argument('-a')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
50 parser.add_argument('-f')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
51 parser.add_argument('--p_value_cutoff')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
52 parser.add_argument('--window_size')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
53 parser.add_argument('--bootstrap')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
54 parser.add_argument('--bootstrap_reps')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
55
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
56 # multifile management
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
57 parser.add_argument('--logfile')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
58
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
59 # outputs
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
60 parser.add_argument('--ss')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
61 parser.add_argument('--s')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
62
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
63 # optional outputs
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
64 parser.add_argument('--ov')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
65 parser.add_argument('--op')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
66 parser.add_argument('--ol')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
67 parser.add_argument('--of')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
68 parser.add_argument('--os')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
69 parser.add_argument('--oe')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
70 parser.add_argument('--om')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
71 parser.add_argument('--og')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
72
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
73 parser.add_argument('--unphased_output')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
74 parser.add_argument('--markers_output')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
75 parser.add_argument('--phase_output')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
76 parser.add_argument('--fst_output')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
77
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
78 options = parser.parse_args()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
79
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
80 # create the working dir
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
81 os.mkdir('job_outputs')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
82 os.mkdir('galaxy_outputs')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
83
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
84 os.chdir('job_outputs')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
85
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
86 # STACKS_archive
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
87 # check if zipped files are into the tab
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
88 extract_compress_files(options.P, os.getcwd())
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
89
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
90 # create the populations command input line
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
91 cmd_line=['populations']
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
92 cmd_line.extend(['-b', options.b, '-P', os.getcwd(), '-M', options.M])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
93
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
94 if options.e:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
95 cmd_line.extend(['-e', options.e, options.genomic])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
96
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
97 # output options
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
98 if options.vcf:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
99 cmd_line.append('--vcf')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
100 if options.genepop:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
101 cmd_line.append('--genepop')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
102 if options.structure:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
103 cmd_line.append('--structure')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
104 if options.fasta:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
105 cmd_line.append('--fasta')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
106 if options.phase:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
107 cmd_line.append('--phase')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
108 if options.beagle:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
109 cmd_line.append('--beagle')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
110 if options.plink:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
111 cmd_line.append('--plink')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
112 if options.phylip:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
113 cmd_line.append('--phylip')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
114 if options.phylip_var and options.phylip:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
115 cmd_line.append('--phylip_var')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
116 if options.write_single_snp and (options.genepop or options.structure):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
117 cmd_line.append('--write_single_snp')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
118
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
119 if options.k:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
120 cmd_line.extend(['-k', '--window_size', options.window_size])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
121
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
122 if options.advanced_options_activate == 'true':
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
123 if options.B:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
124 cmd_line.extend(['-B', options.B])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
125 if options.W:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
126 cmd_line.extend(['-W', options.W])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
127
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
128 cmd_line.extend(['-r', options.r])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
129 cmd_line.extend(['-p', options.p])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
130 cmd_line.extend(['-m', options.m])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
131 cmd_line.extend(['-a', options.a])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
132
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
133 if options.f:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
134 cmd_line.extend(['-f', options.f, '--p_value_cutoff', options.p_value_cutoff])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
135 if options.bootstrap:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
136 cmd_line.extend(['--bootstrap', options.bootstrap, '--bootstrap_reps', options.bootstrap_reps])
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
137
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
138 print "[CMD]:"+' '.join(cmd_line)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
139 subprocess.call(cmd_line)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
140
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
141 # postprocesses
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
142 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
143 shutil.copy('batch_1.populations.log', options.logfile)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
144 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
145 sys.stderr.write('Error in population execution; Please read the additional output (stdout)\n')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
146 sys.exit(1)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
147
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
148 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
149 shutil.move(glob.glob('*.sumstats_summary.tsv')[0], options.ss)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
150 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
151 print "No sumstats summary file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
152
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
153 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
154 shutil.move(glob.glob('*.sumstats.tsv')[0], options.s)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
155 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
156 print "No sumstats file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
157
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
158 # move additionnal output files
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
159 if options.vcf:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
160 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
161 shutil.move(glob.glob('*.vcf')[0], options.ov)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
162 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
163 print "No VCF files"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
164
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
165 if options.phylip:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
166 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
167 shutil.move(glob.glob('*.phylip')[0], options.op)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
168 shutil.move(glob.glob('*.phylip.log')[0], options.ol)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
169 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
170 print "No phylip file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
171
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
172 if options.fasta:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
173 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
174 shutil.move(glob.glob('*.fa')[0], options.of)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
175 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
176 print "No fasta files"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
177
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
178 if options.structure:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
179 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
180 shutil.move(glob.glob('*.structure.tsv')[0], options.os)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
181 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
182 print "No structure file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
183
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
184 if options.plink :
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
185 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
186 shutil.move(glob.glob('*.ped')[0], options.oe)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
187 shutil.move(glob.glob('*.map')[0], options.om)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
188 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
189 print "No ped and map file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
190
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
191 if options.genepop :
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
192 try:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
193 shutil.move(glob.glob('*.genepop')[0], options.og)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
194 except:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
195 print "No genepop file"
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
196
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
197 # copy all files inside tmp_dir into workdir or into an archive....
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
198 list_files = glob.glob('*')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
199
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
200 markerszip = zipfile.ZipFile('markers.zip.temp', 'w',
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
201 allowZip64=True)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
202 phasezip = zipfile.ZipFile('phase.zip.temp', 'w', allowZip64=True)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
203 unphasedzip = zipfile.ZipFile('unphased.zip.temp', 'w',
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
204 allowZip64=True)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
205 fstzip = zipfile.ZipFile('fst.zip.temp', 'w', allowZip64=True)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
206
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
207 for i in list_files:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
208 # for each type of files
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
209 if re.search("\.markers$", i):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
210 markerszip.write(i)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
211 elif re.search("phase\.inp$", i):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
212 phasezip.write(i)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
213 elif re.search("unphased\.bgl$", i):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
214 unphasedzip.write(i)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
215 elif re.search('fst', i):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
216 fstzip.write(i)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
217 else:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
218 # else return original files
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
219 if re.search('^batch', os.path.basename(i)) \
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
220 and not re.search("\.tsv$", os.path.basename(i)) \
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
221 or re.search(".*_[0-9]*\.tsv$", os.path.basename(i)):
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
222 shutil.move(i, '../galaxy_outputs')
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
223
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
224 # close zip files
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
225 markerszip.close()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
226 phasezip.close()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
227 unphasedzip.close()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
228 fstzip.close()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
229
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
230 # return archives
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
231 shutil.move('fst.zip.temp', options.fst_output)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
232 if options.beagle:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
233 shutil.move('markers.zip.temp', options.markers_output)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
234 shutil.move('unphased.zip.temp', options.unphased_output)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
235 if options.phase:
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
236 shutil.move('phase.zip.temp', options.phase_output)
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
237
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
238
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
239 if __name__ == '__main__':
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
240 __main__()
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
241
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
242
d6ba40f6c824 first commit
cmonjeau
parents:
diff changeset
243