annotate dpmix.py @ 31:a631c2f6d913

Update to Miller Lab devshed revision 3c4110ffacc3
author Richard Burhans <burhans@bx.psu.edu>
date Fri, 20 Sep 2013 13:25:27 -0400
parents 8997f2ca8c7a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
1 #!/usr/bin/env python
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
2
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
3 import gd_util
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
4 import sys
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
5 import os
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
6 from Population import Population
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
7 import gd_composite
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
8 from dpmix_plot import make_dpmix_plot
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
9 from LocationFile import LocationFile
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
10
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
11 def load_and_check_pop(name, file, total_pop):
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
12 p = Population(name=name)
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
13 p.from_population_file(file)
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
14 if not total_pop.is_superset(p):
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
15 gd_util.die('There is an individual in {0} that is not in the SNP table'.format(name))
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
16 return p
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
17
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
18 def append_pop_tags(the_list, p, input_type, number):
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
19 for tag in p.tag_list():
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
20 column, name = tag.split(':')
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
21 if input_type == 'gd_genotype':
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
22 column = int(column) - 2
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
23 the_list.append('{0}:{1}:{2}'.format(column, number, name))
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
24
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
25 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
26
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
27 if len(sys.argv) != 22:
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
28 print "usage"
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
29 sys.exit(1)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
30
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
31 input, input_type, data_source, switch_penalty, ap1_input, ap1_name, ap2_input, ap2_name, ap3_input, ap3_name, p_input, output, output2, output2_dir, dbkey, ref_column, galaxy_data_index_dir, heterochromatin_loc_file, ind_arg, het_arg, add_logs = sys.argv[1:]
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
32
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
33 if ap1_input == '/dev/null':
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
34 use_reference = True
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
35 else:
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
36 use_reference = False
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
37
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
38 if ap3_input == '/dev/null':
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
39 populations = 2
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
40 else:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
41 populations = 3
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
42
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
43 chrom = 'all'
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
44
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
45 if het_arg == 'use_installed':
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
46 loc_path = os.path.join(galaxy_data_index_dir, heterochromatin_loc_file)
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
47 location_file = LocationFile(loc_path)
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
48 heterochrom_path = location_file.get_values_if_exists(dbkey)
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
49 if heterochrom_path is None:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
50 heterochrom_path = '/dev/null'
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
51 elif het_arg == 'use_none':
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
52 heterochrom_path = '/dev/null'
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
53 else:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
54 heterochrom_path = het_arg
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
55
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
56 population_list = []
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
57
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
58 p_total = Population()
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
59 p_total.from_wrapped_dict(ind_arg)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
60
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
61 if not use_reference:
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
62 ap1 = load_and_check_pop('Ancestral population 1', ap1_input, p_total)
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
63 population_list.append(ap1)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
64
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
65 ap2 = load_and_check_pop('Ancestral population 2', ap2_input, p_total)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
66 population_list.append(ap2)
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
67
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
68 if populations == 3:
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
69 ap3 = load_and_check_pop('Ancestral population 3', ap3_input, p_total)
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
70 population_list.append(ap3)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
71
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
72 p = load_and_check_pop('Potentially admixed', p_input, p_total)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
73 population_list.append(p)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
74
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
75 gd_util.mkdir_p(output2_dir)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
76
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
77 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
78 # Create tabular file
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
79 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
80
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
81 misc_file = os.path.join(output2_dir, 'summary.txt')
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
82
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
83 prog = 'dpmix'
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
84
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
85 args = [ prog ]
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
86 args.append(input)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
87 args.append(ref_column)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
88 args.append(chrom)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
89 args.append(data_source)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
90 args.append(add_logs)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
91 args.append(switch_penalty)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
92 args.append(heterochrom_path)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
93 args.append(misc_file)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
94
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
95 if use_reference:
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
96 args.append('0:1:reference')
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
97 else:
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
98 append_pop_tags(args, ap1, input_type, 1)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
99
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
100 append_pop_tags(args, ap2, input_type, 2)
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
101
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
102 if populations == 3:
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
103 append_pop_tags(args, ap3, input_type, 3)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
104
31
a631c2f6d913 Update to Miller Lab devshed revision 3c4110ffacc3
Richard Burhans <burhans@bx.psu.edu>
parents: 27
diff changeset
105 append_pop_tags(args, p, input_type, 0)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
106
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
107 with open(output, 'w') as fh:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
108 gd_util.run_program(prog, args, stdout=fh)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
109
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
110 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
111 # Create pdf file
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
112 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
113
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
114 if populations == 3:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
115 state2name = {
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
116 0:'heterochromatin',
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
117 1:ap1_name,
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
118 2:ap2_name,
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
119 3:ap3_name
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
120 }
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
121 else:
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
122 state2name = {
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
123 0:'heterochromatin',
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
124 1:ap1_name,
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
125 2:ap2_name
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
126 }
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
127
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
128 pdf_file = os.path.join(output2_dir, 'picture.pdf')
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
129 make_dpmix_plot(dbkey, output, pdf_file, galaxy_data_index_dir, state2name=state2name, populations=populations)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
130
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
131 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
132 # Create html
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
133 ################################################################################
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
134
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
135 info_page = gd_composite.InfoPage()
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
136 info_page.set_title('dpmix Galaxy Composite Dataset')
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
137
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
138 display_file = gd_composite.DisplayFile()
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
139 display_value = gd_composite.DisplayValue()
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
140
27
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
141 out_pdf = gd_composite.Parameter(name='picture.pdf', value='picture.pdf', display_type=display_file)
8997f2ca8c7a Update to Miller Lab devshed revision bae0d3306d3b
Richard Burhans <burhans@bx.psu.edu>
parents: 24
diff changeset
142 out_misc = gd_composite.Parameter(name='summary.txt', value='summary.txt', display_type=display_file)
12
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
143
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
144 info_page.add_output_parameter(out_pdf)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
145 info_page.add_output_parameter(out_misc)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
146
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
147 if data_source == '0':
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
148 data_source_value = 'sequence coverage'
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
149 elif data_source == '1':
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
150 data_source_value = 'estimated genotype'
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
151
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
152 in_data_source = gd_composite.Parameter(description='Data source', value=data_source_value, display_type=display_value)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
153 in_switch_penalty = gd_composite.Parameter(description='Switch penalty', value=switch_penalty, display_type=display_value)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
154
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
155 info_page.add_input_parameter(in_data_source)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
156 info_page.add_input_parameter(in_switch_penalty)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
157
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
158 misc_populations = gd_composite.Parameter(name='Populations', value=population_list, display_type=gd_composite.DisplayPopulationList())
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
159
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
160 info_page.add_misc(misc_populations)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
161
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
162 with open(output2, 'w') as ofh:
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
163 print >> ofh, info_page.render()
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
164
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
165 sys.exit(0)
4b6590dd7250 Uploaded
miller-lab
parents:
diff changeset
166