3 #Main Page for Phenotypic Database
7 use CXGN
::DB
::PhenoPopulation
;
10 #get parameters from form on previous page
11 use CatalystX
::GlobalContext
qw( $c );
12 my %params = %{$c->req->params};
13 my $pop_id = $params{pop_id};
15 my $page = CXGN::Page->new('phenotype', 'Adri');
17 print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 transitional//EN\" \"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd\">";
19 #-------------------------------------------------
20 my @populations = CXGN::DB::PhenoPopulation::get_all_populations;
26 $current_pop_id = $pop_id;
27 $current_pop_name = CXGN::DB::PhenoPopulation::get_pop_name_from_pop_id($pop_id);
30 #no population selected, first one in DB is used as default
32 $current_pop_id = $populations[0][0];
33 $current_pop_name = $populations[0][1];
36 my @genotypes = CXGN::DB::PhenoPopulation::get_all_gen_from_pop_id($current_pop_id);
38 for my $i (0..$#genotypes) {
39 push @gen_ids, $genotypes[$i][0];
41 my @prop_info_by_organ = CXGN::DB::PhenoPopulation::get_all_prop_info_by_organ_from_pop_id($current_pop_id);
43 $page->header($current_pop_name." Population");
47 <table summary="" width="100%" cellpadding="0" cellspacing="10" border="0">
50 <center><h2><b><u>$current_pop_name Population</u></b></h2></center>
55 #select box for populations
56 if ($#populations > 0) {
57 print "<tr><td valign=\"top\">";
58 print "<table summary=\"\"><tr><td colspan=\"2\">";
59 print "<form action=\"/phenotype/main_phenotype.pl\" method=\"get\">";
61 print "<b><u>Change Population</u></b>\n<br />";
62 print "Below is the list of population(s) currently in the database. Select a population and click the button to search images and data in another population.";
64 print "<tr><td valign=\"top\" align=\"left\">";
65 print "All Populations: ";
66 print "<select name=\"pop_id\">\n";
67 for my $i (0..$#populations) {
68 print "<option value=\"$populations[$i][0]\"> $populations[$i][1]</option>";
72 print "<td valign=\"top\" align=\"right\">";
73 print "<input type=\"submit\" value=\"Change Population\" />";
76 print "</td></tr></table>";
80 print "<tr><td><img src=\"/documents/img/dot_clear.gif\" width=\"1\" height=\"10\" alt=\"\" /></td></tr>";
81 print "<tr><td colspan=\"1\" bgcolor=\"#cccccc\"><img src=\"/documents/img/dot_clear.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>";
82 print "<tr><td><img src=\"/documents/img/dot_clear.gif\" width=\"1\" height=\"10\" alt=\"\" /></td></tr>";
88 <table summary="" width="100%" cellpadding="0" cellspacing="0" border="0">
92 <form action="/phenotype/display_plants_from_genotype.pl" method="get">
93 <table summary="" width="100%" cellpadding="0" cellspacing="0" border="0">
95 <b><u>Search By GENOTYPES</u></b>
98 Below is a list of all <b>genotypes</b> in the selected population above - selecting a genotype will take you to a page of plants with the selected genotype. This new page will have links to all images and data of these plants:
100 <tr><td valign="top" align="left">
101 Genotypes in <b>$current_pop_name</b>:
102 <select name="gen_id">
107 for my $i (0..$#genotypes) {
108 print "<option value = \"$genotypes[$i][0]\"> $genotypes[$i][1]</option>";
113 <input type="hidden" name="pop_id" value="$current_pop_id" />
114 <input type="hidden" name="pop_name" value="$current_pop_name" />
116 <td valign="top" align="right">
117 <input type="submit" value="get Plants by Genotype" />
125 my $current_pop_name_2 = $current_pop_name;
126 $current_pop_name_2 =~ s/\s/%20/g;
132 <form action="/phenotype/display_plants_from_property.pl" method="get">
135 <b><u>Search By PROPERTIES</u></b> (<a href="display_prop_list.pl?pop_id=$current_pop_id&pop_name=$current_pop_name_2">Property Descriptions</a>)
141 print "<tr><td>Below is a list of all <b>properties</b> measured in the selected population above - selecting a property will take you to a page of plants with the selected property measured. This new page will have links to each plant's sample data and images:</td></tr>";
143 print "<tr><td width=\"100%\" valign=\"top\" align=\"left\">";
144 print "Properties in <b>$current_pop_name</b>:";
145 print "<select name=\"prop_id\">";
147 for my $i (0..$#prop_info_by_organ) {
148 $prop_info_by_organ[$i] or next;
150 my $organ_name = $prop_info_by_organ[$i][0][2];
151 print "<optgroup label=\"$organ_name\">";
152 for my $j (0..$#{$prop_info_by_organ[$i]}) {
153 my $prop_id = $prop_info_by_organ[$i][$j][0];
154 my $prop_name = $prop_info_by_organ[$i][$j][1];
155 print "<option value=\"$prop_id\"> $prop_name</option>";
162 <input type="hidden" name="pop_id" value="$current_pop_id" />
163 <input type="hidden" name="pop_name" value="$current_pop_name" />
165 <td width="100%" valign="top" align="right">
166 <input type="submit" value="get Plants by Property" />
172 <tr><td><img src="/documents/img/dot_clear.gif" width="1" height="10" alt="" /></td></tr>
173 <tr><td colspan="1" bgcolor="#cccccc"><img src="/documents/img/dot_clear.gif" width="1" height="1" alt="" /></td></tr>
174 <tr><td><img src="/documents/img/dot_clear.gif" width="1" height="10" alt="" /></td></tr>
177 <center><h3><u>Terminology</u></h3></center>
181 <dt><b>Population</b></dt>
182 <dd>all the organisms that constitute a specific group or occur in a specified location</dd>
183 <dt><br /><b>Genotype</b></dt>
184 <dd>a group of organisms sharing a specific genetic constitution</dd>
185 <dt><br /><b>Property/Phenotype</b></dt>
186 <dd>the observable physical or biochemical characteristics of an organism, as determined by both genetic makeup and environmental influences</dd>