6 use File::Spec::Functions qw / catfile catdir/;
8 use SGN::Test::WWW::WebDriver;
9 use SGN::Test::Fixture;
10 use SGN::Test::solGSData;
12 my $d = SGN::Test::WWW::WebDriver->new();
13 my $f = SGN::Test::Fixture->new();
15 my $solgs_data = SGN::Test::solGSData->new({'fixture' => $f, 'accessions_list_subset' => 60, 'plots_list_subset' => 60});
17 my $cache_dir = $solgs_data->site_cluster_shared_dir();
18 my $protocol_dir = $solgs_data->default_protocol_dir();
19 my $cluster_dir = catdir($protocol_dir, 'cluster');
20 my $log_dir = catdir($protocol_dir, 'log');
22 my $accessions_list = $solgs_data->load_accessions_list();
23 # my $accessions_list = $solgs_data->get_list_details('accessions');
24 my $accessions_list_name = $accessions_list->{list_name};
25 my $accessions_list_id = 'list_' . $accessions_list->{list_id};
26 print STDERR "\naccessions list: $accessions_list_name -- $accessions_list_id\n";
27 my $plots_list = $solgs_data->load_plots_list();
28 # my $plots_list = $solgs_data->get_list_details('plots');
29 my $plots_list_name = $plots_list->{list_name};
30 my $plots_list_id = 'list_' . $plots_list->{list_id};
32 print STDERR "\nadding trials list '\n";
33 my $trials_list = $solgs_data->load_trials_list();
34 # my $trials_list = $solgs_data->get_list_details('trials');
35 my $trials_list_name = $trials_list->{list_name};
36 my $trials_list_id = 'list_' . $trials_list->{list_id};
37 print STDERR "\nadding trials dataset\n";
38 # my $trials_dt = $solgs_data->get_dataset_details('trials');
39 my $trials_dt = $solgs_data->load_trials_dataset();
40 my $trials_dt_name = $trials_dt->{dataset_name};
41 my $trials_dt_id = 'dataset_' . $trials_dt->{dataset_id};
42 print STDERR "\nadding accessions dataset\n";
43 # my $accessions_dt = $solgs_data->get_dataset_details('accessions');
44 my $accessions_dt = $solgs_data->load_accessions_dataset();
45 my $accessions_dt_name = $accessions_dt->{dataset_name};
46 my $accessions_dt_id = 'dataset_' . $accessions_dt->{dataset_id};
48 print STDERR "\nadding plots dataset\n";
49 # my $plots_dt = $solgs_data->get_dataset_details('plots');
50 my $plots_dt = $solgs_data->load_plots_dataset();
51 my $plots_dt_name = $plots_dt->{dataset_name};
52 my $plots_dt_id = 'dataset_' . $plots_dt->{dataset_id};
54 #$accessions_dt_name = '' . $accessions_dt_name . '';
55 print STDERR "\ntrials dt: $trials_dt_name -- $trials_dt_id\n";
56 print STDERR "\naccessions dt: $accessions_dt_name -- $accessions_dt_id\n";
57 print STDERR "\nplots dt: $plots_dt_name -- $plots_dt_id\n";
59 print STDERR "\ntrials list: $trials_list_name -- $trials_list_id\n";
60 print STDERR "\naccessions list: $accessions_list_name -- $accessions_list_id\n";
61 print STDERR "\nplots list: $plots_list_name -- $plots_list_id\n";
66 $d->while_logged_in_as("submitter", sub {
68 $d->get_ok('/cluster/analysis', 'cluster home page');
70 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'select clones list')->click();
72 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
74 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
76 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
78 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
80 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
83 my $sel_pops = $d->find_element('//*[contains(text(), "Select")]', 'xpath', 'scroll up');
84 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 500);", $sel_pops);
86 $d->find_element_ok('//img[@id="hierarchical-plot-' . $accessions_list_id . '-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
89 $d->driver->refresh();
92 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $plots_list_name . '"]', 'xpath', 'select plots list')->click();
94 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
96 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
98 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Phenotype"]', 'xpath', 'select phenotype')->click();
100 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
102 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
105 my $sel_pops = $d->find_element('//*[contains(text(), "Select a")]', 'xpath', 'scroll up');
106 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 500);", $sel_pops);
108 $d->find_element_ok('//img[@id="hierarchical-plot-' . $plots_list_id . '-phenotype"]', 'xpath', 'check hierarchical plot')->click();
111 $d->driver->refresh();
114 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $trials_list_name . '"]', 'xpath', 'select trials list')->click();
116 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
118 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
120 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
122 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
124 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
127 my $sel_pops = $d->find_element('//*[contains(text(), "Select a")]', 'xpath', 'scroll up');
128 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 600);", $sel_pops);
130 $d->find_element_ok('//img[@id="hierarchical-plot-' . $trials_list_id . '-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
134 $d->driver->refresh();
137 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $trials_list_name . '"]', 'xpath', 'select trials list')->click();
139 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
141 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
143 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Phenotype"]', 'xpath', 'select phenotype')->click();
145 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
147 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
150 my $sel_pops = $d->find_element('//*[contains(text(), "Select a")]', 'xpath', 'scroll up');
151 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 500);", $sel_pops);
152 $d->find_element_ok('//img[@id="hierarchical-plot-' . $trials_list_id . '-phenotype"]', 'xpath', 'check heirarchical plot')->click();
155 $d->driver->refresh();
158 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $trials_dt_name . '"]', 'xpath', 'select trials dataset')->click();
160 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
162 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
164 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
166 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
168 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
171 my $sel_pops = $d->find_element('//*[contains(text(), "Select a")]', 'xpath', 'scroll up');
172 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 500);", $sel_pops);
173 $d->find_element_ok('//img[@id="hierarchical-plot-' . $trials_dt_id . '-genotype-gp-1"]', 'xpath', 'plot displayed')->click();
176 $d->driver->refresh();
179 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $trials_dt_name . '"]', 'xpath', 'select trials dataset')->click();
181 $d->find_element_ok('//input[@value="View"]', 'xpath', 'go btn')->click();
183 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
185 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Phenotype"]', 'xpath', 'select phenotype')->click();
187 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
189 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
192 my $sel_pops = $d->find_element('//*[contains(text(), "Select a")]', 'xpath', 'scroll up');
193 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, 500);", $sel_pops);
195 $d->find_element_ok('//img[@id="hierarchical-plot-' . $trials_dt_id . '-phenotype"]', 'xpath', 'check hierarchical plot')->click();
198 `rm -r /tmp/localhost`;
201 $d->get_ok('/breeders/trial/139', 'trial detail home page');
204 my $analysis_tools = $d->find_element('Analysis Tools', 'partial_link_text', 'toogle analysis tools');
205 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-50);", $analysis_tools);
207 $d->find_element_ok('Analysis Tools', 'partial_link_text', 'toogle analysis tools')->click();
209 $d->find_element_ok('Clustering', 'partial_link_text', 'expand cluster sec')->click();
211 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
213 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Phenotype"]', 'xpath', 'select phenotype')->click();
215 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
217 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
219 $d->find_element_ok('//img[@id="hierarchical-plot-139-phenotype"]', 'xpath', 'plot displayed')->click();
222 $d->driver->refresh();
225 my $analysis_tools = $d->find_element('cluster_canvas', 'id', 'toogle analysis tools');
226 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-50);", $analysis_tools);
228 $d->find_element_ok('Analysis Tools', 'partial_link_text', 'toogle analysis tools')->click();
230 $d->find_element_ok('Clustering', 'partial_link_text', 'expand cluster sec')->click();
232 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
234 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
236 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
238 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
240 $d->find_element_ok('//img[@id="hierarchical-plot-139-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
244 $d->get_ok('/solgs', 'solgs homepage');
247 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
249 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
251 $d->find_element_ok('Kasese', 'partial_link_text', 'create training pop')->click();
253 $d->find_element_ok('queue_job', 'id', 'submit job tr pop')->click();
255 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('Test Kasese Tr pop');
257 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
259 $d->find_element_ok('submit_job', 'id', 'submit')->click();
261 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
264 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
266 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
268 $d->find_element_ok('Kasese', 'partial_link_text', 'create training pop')->click();
271 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
272 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
273 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
275 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
277 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('Test DMCP-FRW modeling Kasese');
279 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
281 $d->find_element_ok('submit_job', 'id', 'submit')->click();
283 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
286 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
287 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
288 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
291 # # ###############################################################
292 # $d->get_ok('solgs/traits/all/population/139/traits/1971973596/gp/1', 'models page');
294 # # ######################################################################
296 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 NaCRRI');
298 $d->find_element_ok('search_selection_pop', 'id', 'search for selection pop')->click();
300 $d->find_element_ok('//table[@id="selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click training pop')->click();
302 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
304 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('Test DMCP-FRW selection pred nacrri');
306 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
308 $d->find_element_ok('submit_job', 'id', 'submit')->click();
310 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
313 $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'accessions list sl pop')->click();
315 $d->find_element_ok('//input[@value="View"]', 'xpath', 'select list sel pop')->click();
317 $d->find_element_ok('//table[@id="list_type_selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click list sel pred')->click();
319 $d->find_element_ok('queue_job', 'id', 'accessions list sl pop job queueing')->click();
321 $d->find_element_ok('analysis_name', 'id', 'accessions list sl pop analysis name')->send_keys('clones list dmc-frw sel pred');
323 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
325 $d->find_element_ok('submit_job', 'id', 'submit')->click();
327 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
331 $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select list sl pop')->click();
333 $d->find_element_ok('//input[@value="View"]', 'xpath', 'select dataset sel pop')->click();
335 $d->find_element_ok('//table[@id="list_type_selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'list sel pred')->click();
337 $d->find_element_ok('queue_job', 'id', 'dataset accessions job queueing')->click();
339 $d->find_element_ok('analysis_name', 'id', 'dataset accessions job analysis name')->send_keys('dataset clones sel pred');
341 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
343 $d->find_element_ok('submit_job', 'id', 'submit')->click();
345 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
350 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
351 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -200);", $sel_pops);
353 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
355 $d->find_element_ok('list_type_selection_pops_select', 'id', 'select clones list menu')->click();
357 my $list = $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'select list sel pop');
361 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
362 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -100);", $sel_pops);
363 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
366 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
367 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
369 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
371 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'select list sel pop')->click();
373 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
375 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
377 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
379 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
381 $d->find_element_ok('//img[@id="hierarchical-plot-139-' . $accessions_list_id . '-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
384 $d->driver->refresh();
387 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
388 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -600);", $sel_pops);
390 $d->find_element_ok('list_type_selection_pops_select', 'id', 'select clones list menu')->click();
393 my $dataset = $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop');
396 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'GO select dataset sel popp')->click();
398 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
399 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
401 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
403 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop')->click();
405 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
407 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
409 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
411 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
414 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
415 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
417 $d->find_element_ok('//img[@id="hierarchical-plot-139-' . $accessions_dt_id . '-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
420 $d->driver->refresh();
423 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
424 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -600);", $sel_pops);
426 $d->find_element_ok('list_type_selection_pops_select', 'id', 'select clones list menu')->click();
428 my $dataset = $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop');
431 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
434 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
435 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
437 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
439 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop')->click();
441 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
443 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
445 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
447 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
449 $d->find_element_ok('//img[@id="hierarchical-plot-139-' . $accessions_dt_id . '-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
452 $d->driver->refresh();
455 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
456 my $elem = $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
458 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
460 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial tr pop')->click();
462 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
464 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="Phenotype"]', 'xpath', 'select ghenotype')->click();
466 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
468 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
470 $d->find_element_ok('//img[@id="hierarchical-plot-139-traits-1971973596-phenotype"]', 'xpath', 'check hierarchical plot')->click();
473 $d->driver->refresh();
476 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
477 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
479 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
481 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial tr pop')->click();
483 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
485 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
487 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
489 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
491 $d->find_element_ok('//img[@id="hierarchical-plot-139-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
494 $d->driver->refresh();
497 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
498 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
500 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
502 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial tr pop')->click();
504 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
506 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
508 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
510 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
512 $d->find_element_ok('//img[@id="hierarchical-plot-139-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
514 $d->driver->refresh();
517 my $cor = $d->find_element('Genetic correlation', 'partial_link_text', 'scroll up');
518 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $cor);
520 $d->find_element_ok('si_pops_select', 'id', 'select list sl pop')->click();
522 $d->find_element_ok('//select[@id="si_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial type tr pop')->click();
524 $d->find_element_ok('DMCP', 'id', 'rel wt 1st')->send_keys(3);
526 $d->find_element_ok('FRW', 'id', 'rel wt 2st')->send_keys(5);
528 $d->find_element_ok('calculate_si', 'id', 'calc selection index')->click();
531 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
532 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
534 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
536 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="139-DMCP-3-FRW-5"]', 'xpath', 'select sel index pop')->click();
538 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
540 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
542 $d->find_element_ok('//*[starts-with(@id, "selection_proportion_input")]', 'xpath', 'fill in sel prop')->send_keys('15');
544 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
546 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
548 $d->find_element_ok('//img[@id="hierarchical-plot-139-139-DMCP-3-FRW-5-genotype-gp-1-sp-15"]', 'xpath', 'plot')->click();
551 $d->driver->refresh();
554 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
555 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
557 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
559 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
561 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
563 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
565 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
567 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
569 $d->find_element_ok('//img[@id="hierarchical-plot-139-141-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
572 $d->driver->refresh();
575 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
576 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
578 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
580 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
582 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
584 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
586 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
588 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
590 $d->find_element_ok('//img[@id="hierarchical-plot-139-141-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
593 $d->driver->refresh();
596 `rm -r $cluster_dir`;
601 # $d->get_ok('solgs/traits/all/population/139/traits/1971973596/gp/1', 'models page');
604 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
605 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
607 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
609 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
611 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
613 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
615 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
617 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
619 $d->find_element_ok('analysis_name', 'id', 'geno hierarchical job')->send_keys('Nacrri sel pop geno clustering');
621 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
623 $d->find_element_ok('submit_job', 'id', 'submit')->click();
625 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
628 $d->driver->refresh();
631 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
632 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
634 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
636 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
638 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
640 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
642 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
644 $d->find_element_ok('//img[@id="hierarchical-plot-139-141-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
647 $d->driver->refresh();
650 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
651 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
653 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
655 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
657 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
659 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
661 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
663 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
665 $d->find_element_ok('analysis_name', 'id', 'geno hierarchical job')->send_keys('Nacrri sel pop gebv clustering');
667 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
669 $d->find_element_ok('submit_job', 'id', 'submit')->click();
671 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
674 $d->driver->refresh();
677 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
678 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
680 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
682 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
684 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
686 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
688 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
690 $d->find_element_ok('//img[@id="hierarchical-plot-139-141-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
693 $d->driver->refresh();
696 my $cor = $d->find_element('Genetic correlation', 'partial_link_text', 'scroll up');
697 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $cor);
699 $d->find_element_ok('si_pops_select', 'id', 'select list sl pop')->click();
701 $d->find_element_ok('//select[@id="si_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial type tr pop')->click();
703 $d->find_element_ok('DMCP', 'id', 'rel wt 1st')->send_keys(3);
705 $d->find_element_ok('FRW', 'id', 'rel wt 2st')->send_keys(5);
707 $d->find_element_ok('calculate_si', 'id', 'calc selection index')->click();
710 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
711 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
713 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
715 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="139-DMCP-3-FRW-5"]', 'xpath', 'select sel index pop')->click();
717 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
719 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
721 $d->find_element_ok('//*[starts-with(@id, "selection_proportion_input")]', 'xpath', 'fill in sel prop')->send_keys('15');
723 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
725 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
727 $d->find_element_ok('analysis_name', 'id', 'geno hierarchical job')->send_keys('Nacrri sel pop sindex clustering');
729 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
731 $d->find_element_ok('submit_job', 'id', 'submit')->click();
733 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
737 my $cor = $d->find_element('Genetic correlation', 'partial_link_text', 'scroll up');
738 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $cor);
740 $d->find_element_ok('si_pops_select', 'id', 'select list sl pop')->click();
742 $d->find_element_ok('//select[@id="si_pops_select"]/option[text()="Kasese solgs trial"]', 'xpath', 'select trial type tr pop')->click();
744 $d->find_element_ok('DMCP', 'id', 'rel wt 1st')->send_keys(3);
746 $d->find_element_ok('FRW', 'id', 'rel wt 2st')->send_keys(5);
748 $d->find_element_ok('calculate_si', 'id', 'calc selection index')->click();
751 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
752 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
754 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
756 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="139-DMCP-3-FRW-5"]', 'xpath', 'select sel index pop')->click();
758 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
760 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
762 $d->find_element_ok('//*[starts-with(@id, "selection_proportion_input")]', 'xpath', 'fill in sel prop')->send_keys('15');
764 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
766 $d->find_element_ok('//img[@id="hierarchical-plot-139-139-DMCP-3-FRW-5-genotype-gp-1-sp-15"]', 'xpath', 'plot')->click();
769 $d->driver->refresh();
772 `rm -r $cluster_dir`;
777 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
778 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
780 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
782 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
784 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
786 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
788 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
790 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
792 $d->find_element_ok('//img[@id="hierarchical-plot-139-141-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
795 $d->driver->refresh();
799 # # $d->get_ok('/solgs/trait/70666/population/139/gp/1', 'open model page');
803 my $clustering = $d->find_element('Models summary', 'partial_link_text', 'scroll up');
804 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
806 $d->find_element_ok('//table[@id="model_summary"]//*[contains(text(), "FRW")]', 'xpath', 'click training pop')->click();
810 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
811 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
813 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
815 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
817 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
819 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
821 $d->find_element_ok('//img[@id="hierarchical-plot-139-70666-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
824 # #$d->get_ok('/solgs/model/combined/populations/2804608595/trait/70741/gp/1', 'open combined trials model page');
828 $d->get_ok('/solgs', 'solgs home page');
830 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
832 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
834 $d->find_element_ok('trial_search_box', 'id', 'population search form')->clear();
836 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 nacrri');
838 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
841 $d->find_element_ok('//table[@id="searched_trials_table"]//input[@value="139"]', 'xpath', 'select trial kasese')->click();
843 $d->find_element_ok('//table[@id="searched_trials_table"]//input[@value="141"]', 'xpath', 'select trial nacrri')->click();
845 $d->find_element_ok('select_trials_btn', 'id', 'done selecting')->click();
847 $d->find_element_ok('combine_trait_trials', 'id', 'combine trials')->click();
849 $d->find_element_ok('queue_job', 'id', 'submit job tr pop')->click();
851 $d->find_element_ok('analysis_name', 'id', 'job queueing')->send_keys('combined trials');
853 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
855 $d->find_element_ok('submit_job', 'id', 'submit')->click();
857 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
860 # #$d->get('/solgs/populations/combined/2804608595/gp/1', 'combo trials tr pop page');
864 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('Kasese solgs trial');
866 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
868 $d->find_element_ok('trial_search_box', 'id', 'population search form')->clear();
870 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 nacrri');
872 $d->find_element_ok('search_trial', 'id', 'search for training pop')->click();
875 $d->find_element_ok('//table[@id="searched_trials_table"]//input[@value="139"]', 'xpath', 'select trial kasese')->click();
877 $d->find_element_ok('//table[@id="searched_trials_table"]//input[@value="141"]', 'xpath', 'select trial nacrri')->click();
879 $d->find_element_ok('select_trials_btn', 'id', 'done selecting')->click();
881 $d->find_element_ok('combine_trait_trials', 'id', 'combine trials')->click();
884 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
886 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
888 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
890 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
892 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('Test DMCP-FRW modeling combo trials');
894 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
896 $d->find_element_ok('submit_job', 'id', 'submit')->click();
898 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
902 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[1]/td/input', 'xpath', 'select 1st trait')->click();
904 $d->find_element_ok('//table[@id="population_traits_list"]/tbody/tr[2]/td/input', 'xpath', 'select 2nd trait')->click();
906 $d->find_element_ok('runGS', 'id', 'build multi models')->click();
909 ## $d->get_ok('/solgs/models/combined/trials/2804608595/traits/1971973596/gp/1', 'combined trials models summary page');
912 $d->find_element_ok('trial_search_box', 'id', 'population search form')->send_keys('trial2 NaCRRI');
914 $d->find_element_ok('search_selection_pop', 'id', 'search for selection pop')->click();
916 $d->find_element_ok('//table[@id="selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click training pop')->click();
918 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
920 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('combo DMCP-FRW selection pred nacrri');
922 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
924 $d->find_element_ok('submit_job', 'id', 'submit')->click();
926 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
929 $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'list sl pop')->click();
931 $d->find_element_ok('//input[@value="View"]', 'xpath', 'select list sel pop')->click();
933 $d->find_element_ok('//table[@id="list_type_selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click list sel pred')->click();
935 $d->find_element_ok('queue_job', 'id', 'no job queueing')->click();
937 $d->find_element_ok('analysis_name', 'id', 'no job queueing')->send_keys('combo clones list dmc-frw sel pred');
939 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
941 $d->find_element_ok('submit_job', 'id', 'submit')->click();
943 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
947 #$d->get_ok('/solgs/models/combined/trials/2804608595/traits/1971973596/gp/1', 'combined trials models summary page');
951 $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select list sl pop')->click();
953 $d->find_element_ok('//input[@value="View"]', 'xpath', 'select dataset sel pop')->click();
955 $d->find_element_ok('//table[@id="list_type_selection_pops_table"]//*[contains(text(), "Predict")]', 'xpath', 'click list sel pred')->click();
957 $d->find_element_ok('queue_job', 'id', 'accessions dataset queue')->click();
959 $d->find_element_ok('analysis_name', 'id', 'accessions dataset analysis name')->send_keys('combo dataset clones sel pred');
961 $d->find_element_ok('user_email', 'id', 'user email')->send_keys('email@email.com');
963 $d->find_element_ok('submit_job', 'id', 'submit')->click();
965 $d->find_element_ok('Go back', 'partial_link_text', 'go back')->click();
968 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
969 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
971 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
973 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Training population 2804608595"]', 'xpath', 'select list sel pop')->click();
975 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
977 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Phenotype"]', 'xpath', 'select phenotype')->click();
979 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
981 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
983 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-traits-1971973596-phenotype"]', 'xpath', 'check hierarchical plot')->click();
986 $d->driver->refresh();
989 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
990 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
992 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
994 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Training population 2804608595"]', 'xpath', 'select list sel pop')->click();
996 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
998 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select phenotype')->click();
1000 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1002 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1004 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
1007 $d->driver->refresh();
1010 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1011 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
1013 $d->find_element_ok('cluster_pops_select', 'id', 'click cluster pops')->click();
1015 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="Training population 2804608595"]', 'xpath', 'select tr pop')->click();
1017 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1019 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
1021 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1023 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1025 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-traits-1971973596-genotype-gp-1"]', 'xpath', 'plot')->click();
1028 $d->driver->refresh();
1031 my $cor = $d->find_element('Genetic correlation', 'partial_link_text', 'scroll up');
1032 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $cor);
1034 $d->find_element_ok('si_pops_select', 'id', 'select list sl pop')->click();
1036 $d->find_element_ok('//select[@id="si_pops_select"]/option[text()="Training population 2804608595"]', 'xpath', 'select combo pop')->click();
1038 $d->find_element_ok('DMCP', 'id', 'rel wt 1st')->send_keys(3);
1040 $d->find_element_ok('FRW', 'id', 'rel wt 2st')->send_keys(5);
1042 $d->find_element_ok('calculate_si', 'id', 'calc selection index')->click();
1045 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1046 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
1048 $d->find_element_ok('cluster_pops_select', 'id', 'click cluster pops')->click();
1050 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="2804608595-DMCP-3-FRW-5"]', 'xpath', 'si')->click();
1052 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1054 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="Genotype"]', 'xpath', 'genotype')->click();
1056 $d->find_element_ok('//*[starts-with(@id, "selection_proportion_input")]', 'xpath', 'fill in sel prop')->send_keys('15');
1058 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1060 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1062 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-2804608595-DMCP-3-FRW-5-genotype-gp-1-sp-15"]', 'xpath', 'plot')->click();
1065 $d->driver->refresh();
1068 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
1069 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -600);", $sel_pops);
1071 $d->find_element_ok('list_type_selection_pops_select', 'id', 'select clones list menu')->click();
1073 my $dataset = $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop');
1076 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
1080 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1081 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
1083 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
1085 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_dt_name . '"]', 'xpath', 'select dataset sel pop')->click();
1087 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1089 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
1091 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1093 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1095 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-' . $accessions_dt_id . '-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
1098 $d->driver->refresh();
1101 my $sel_pops = $d->find_element('Predict', 'partial_link_text', 'scroll up');
1102 my $elem =$d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0, -200);", $sel_pops);
1104 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
1106 $d->find_element_ok('list_type_selection_pops_select', 'id', 'select clones list menu')->click();
1108 my $list = $d->find_element_ok('//select[@id="list_type_selection_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'select list sel pop');
1111 $d->find_element_ok('//div[ @id="list_type_selection_pop_go_btn"]/input[@value="View"]', 'xpath', 'select list sel pop')->click();
1114 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1115 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
1117 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
1119 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="' . $accessions_list_name . '"]', 'xpath', 'select list sel pop')->click();
1121 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1123 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
1125 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1127 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1129 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-' . $accessions_list_id . '-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
1132 $d->driver->refresh();
1135 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1136 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
1138 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
1140 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
1142 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1144 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
1146 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1148 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1150 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-141-traits-1971973596-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
1153 $d->driver->refresh();
1156 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1157 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
1159 $d->find_element_ok('cluster_pops_select', 'id', 'select list sl pop')->click();
1161 $d->find_element_ok('//select[@id="cluster_pops_select"]/option[text()="trial2 NaCRRI"]', 'xpath', 'select trial sel pop')->click();
1163 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1165 $d->find_element_ok('//select[@id="cluster_data_type_select"]/option[text()="GEBV"]', 'xpath', 'select gebv')->click();
1167 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1169 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1171 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-141-traits-1971973596-gebv"]', 'xpath', 'check hierarchical plot')->click();
1174 $d->driver->refresh();
1177 my $clustering = $d->find_element('Models summary', 'partial_link_text', 'scroll up');
1178 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-100);", $clustering);
1180 $d->find_element_ok('//table[@id="model_summary"]//*[contains(text(), "DMCP")]', 'xpath', 'click training pop')->click();
1183 my $clustering = $d->find_element('Clustering', 'partial_link_text', 'scroll up');
1184 $d->driver->execute_script( "arguments[0].scrollIntoView(true);window.scrollBy(0,-200);", $clustering);
1187 $d->find_element_ok('//*[starts-with(@id, "cluster_type_select")]', 'xpath', 'select hierarchical')->send_keys('Hierarchical');
1189 $d->find_element_ok('//*[starts-with(@id, "cluster_data_type_select")]/option[text()="Genotype"]', 'xpath', 'select genotype')->click();
1191 $d->find_element_ok('//*[starts-with(@id, "run_cluster")]', 'xpath', 'run cluster')->click();
1193 $d->find_element_ok('no_queue', 'id', 'no job queueing')->click();
1195 $d->find_element_ok('//img[@id="hierarchical-plot-2804608595-70741-genotype-gp-1"]', 'xpath', 'check hierarchical plot')->click();
1199 foreach my $list_id ($trials_list_id, $accessions_list_id, $plots_list_id) {
1200 $list_id =~ s/\w+_//g;
1201 $solgs_data->delete_list($list_id);
1204 foreach my $dataset_id ($trials_dt_id, $accessions_dt_id, $plots_dt_id) {
1205 $dataset_id =~ s/\w+_//g;
1206 $solgs_data->delete_dataset($dataset_id);