Merge pull request #4106 from solgenomics/topic/wishlist
[sgn.git] / mason / solgs / population / combined / select_traits.mas
blobe545d1737f4d9516bc620a98bbfd9b3c6917fe65
1 <%doc>
3 =head1 NAME
5 /solgs/population/combined/select_traits.mas - lists traits to select for GS analysis
7 =AUTHOR
9 Isaak Y Tecle (iyt2@cornell.edu)
11 =cut
13 </%doc>
15 <%args>
18 $traits_form => ''
19 $combo_pops_id
20 $all_traits_file
21 $genotyping_protocol_id
23 </%args>
25 <%perl>
27  open FH, "<", $all_traits_file or die "Can't open $all_traits_file: $!\n";
28  my $headers = <FH>;
29  my $trait_rows;
31  while (<FH>)
32  {
33  my ($id, $trait, $acronym) = split (/\t/);
34     my $trait_link   = qq | <a href="/solgs/model/combined/trials/$combo_pops_id/trait/$id/gp/$genotyping_protocol_id" onclick="solGS.waitPage(this.href); return false;">$trait</a> |;
35     my $row          = <<ROW;
36      <tr>
37       <td>
38         <input type  = "checkbox"
39                name  = "trait_id"
40                class = "trait_id"
41                value = $id > $trait_link
42       </td>
43      </tr>
44 ROW
46     $trait_rows .=  $row;
48  }
51 </%perl>
53 <div id="traits_selection_div">
55   <table class="table-condensed" id="population_traits_list">
56    <% $trait_rows %>
57      <tr>
58        <td>
59          <input class   = "button"
60                 type    = "submit"
61                         id      = "runGS"
62                 value   = "Build model"
63                 name    = "runGS"
64                 >
65        </td>
66      </tr>
67    </table>
69 </div>