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 $page->header("Search the Phenotype Database");
21 #-------------------------------------------------
22 my @populations = CXGN::DB::PhenoPopulation::get_all_populations;
28 $current_pop_id = $pop_id;
29 $current_pop_name = CXGN::DB::PhenoPopulation::get_pop_name_from_pop_id($pop_id);
32 #no population selected, first one in DB is used as default
34 $current_pop_id = $populations[0][0];
35 $current_pop_name = $populations[0][1];
38 my @genotypes = CXGN::DB::PhenoPopulation::get_all_gen_from_pop_id($current_pop_id);
40 for my $i (0..$#genotypes) {
41 push @gen_ids, $genotypes[$i][0];
43 my @prop_info_by_organ = CXGN::DB::PhenoPopulation::get_all_prop_info_by_organ_from_pop_id($current_pop_id);
47 <table summary="" width="100%" cellpadding="0" cellspacing="10" border="0">
50 <table summary="" width="100%" cellpadding="0" cellspacing="0" border="0">
54 <h3><u>Welcome to the Phenotype Database</u></h3>
55 <p>From this page, you can search the phenotype databse for data and images of all plants from all populations.</p>
56 <p>There are two ways to find specific data and images: searching by genotype and phenotype.</p>
60 <tr><td><img src="/documents/img/dot_clear.gif" width="1" alt="" height="10" /></td></tr>
61 <tr><td colspan="1" bgcolor="#cccccc"><img src="/documents/img/dot_clear.gif" alt="" width="1" height="1" /></td></tr>
62 <tr><td><img src="/documents/img/dot_clear.gif" width="1" height="10" alt="" /></td></tr>
65 <center><h3><u>Search the Phenotype Database</u></h3></center>
68 <table summary="" width="100%" cellpadding="0" cellspacing="0" border="0">
72 <form action="#" method="get">
79 print "<b><u>selected POPULATION:</u> $current_pop_name</b>";
83 <tr><td><p>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.</p></td></tr>
84 <tr><td valign="top" align="left">
86 <select name="pop_id">
90 for (0..$#populations) {
91 print "<option value = \"$populations[$_][0]\">$populations[$_][1]</option>";
97 <td valign="top" align="right">
98 <input type="submit" value="Change Population" />
107 <form action="/phenotype/display_plants_from_genotype.pl" method="get">
110 <b><u>Search By GENOTYPES</u></b>
112 <tr><td><p>Below is a list of all <b>genotypes</b> in the selected population above -
113 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:</p></td></tr>
114 <tr><td valign="top" align="left">
119 print "Genotypes in <b>$current_pop_name</b>:";
120 print "<select name=\"gen_id\">";
121 for my $i (0..$#genotypes) {
122 print "<option value = \"$genotypes[$i][0]\"> $genotypes[$i][1]</option>";
125 print "<input type=\"hidden\" name=\"pop_id\" value=\"$current_pop_id\" />";
126 print "<input type=\"hidden\" name=\"pop_name\" value=\"$current_pop_name\" />";
130 <td valign="top" align="right">
131 <input type="submit" value="get Plants by Genotype" />
139 <form action="/phenotype/display_plants_from_property.pl" method="get">
140 <table summary=""><tr><td>
141 <b><u>Search By PROPERTIES</u></b> (<a href="display_prop_list.pl">Property Descriptions</a>)
147 print "<p>Below is a list of all <b>properties</b> measured in the selected population above -
148 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:</p>";
151 print "<tr><td width=\"100%\" valign=\"top\" align=\"left\">";
153 print "Properties in <b>$current_pop_name</b>:";
154 print "<select name=\"prop_id\">";
156 for (0..$#prop_info_by_organ) {
158 $prop_info_by_organ[$i] or next;
159 my $organ_name = $prop_info_by_organ[$i][0][2];
160 print "<optgroup label=\"$organ_name\">";
161 for (0..$#{$prop_info_by_organ[$i]}) {
163 my $prop_id = $prop_info_by_organ[$i][$j][0];
164 my $prop_name = $prop_info_by_organ[$i][$j][1];
165 print "<option value = \"$prop_id\">$prop_name</option>\n";
171 print "<input type=\"hidden\" name=\"pop_id\" value=\"$current_pop_id\" />";
172 print "<input type=\"hidden\" name=\"pop_name\" value=\"$current_pop_name\" />";
177 <td width="100%" valign="top" align="right">
178 <input type="submit" value="get Plants by Property" />
191 <tr><td><img src="/documents/img/dot_clear.gif" width="1" height="10" alt="" /></td></tr>
192 <tr><td bgcolor="#cccccc"><img src="/documents/img/dot_clear.gif" width="1" height="1" alt="" /></td></tr>
193 <tr><td><img src="/documents/img/dot_clear.gif" width="1" height="10" alt="" /></td></tr>
197 <center><h3><u>Terminology</u></h3></center>
199 <table summary="" width="100%" cellpadding="0" cellspacing="0" border="0">
203 <dt><b>Population</b></dt>
204 <dd>all the organisms that constitute a specific group or occur in a specified location.</dd>
205 <dt><br /><b>Genotype</b></dt>
206 <dd>a group of organisms sharing a specific genetic constitution.</dd>
207 <dt><br /><b>Property/Phenotype</b></dt>
208 <dd>the observable physical or biochemical characteristics of an organism, as determined by both genetic makeup and environmental influences.</dd>
220 #--------------------------