5 basic_expdesign_info.mas
6 Mason component to show the basic information for experimental design web page.
18 Mason component to show the basic information for experimental design web page.
20 - Mason root page = experimental_design_detail.mas
21 - Perl controller = experimental_design.pl
27 Aureliano Bombarely (ab782@cornell.edu)
43 use CXGN::GEM::Schema;
44 use CXGN::Page::FormattingHelpers qw/ info_section_html info_table_html columnar_table_html page_title_html html_break_string /;
46 my $basic_info_content;
47 my $expdesign_accession;
49 my $default_message = '<i><font color="gray">data not available</font></i>';
51 ## If there aren't any experiment_row that comes from experimental_design_detail.mas, it will return a message.
53 if (defined $expdesign->get_experimental_design_id()) {
55 my $schema = $expdesign->get_schema();
57 my $expdesign_name = $expdesign->get_experimental_design_name();
58 $expdesign_accession = $expdesign_name;
60 my $expdesign_type = $expdesign->get_design_type();
61 my $description = $expdesign->get_description();
63 ## Get the external links
65 my @dbxref_list_id = $expdesign->get_dbxref_list();
66 my @dbxref_html_list = ();
68 foreach my $dbxref_id (@dbxref_list_id) {
69 my ($dbxref_row) = $schema->resultset('General::Dbxref')
70 ->search({ dbxref_id => $dbxref_id });
72 if (defined $dbxref_row) {
73 my ($db_row) = $schema->resultset('General::Db')
74 ->search({ db_id => $dbxref_row->get_column('db_id') });
76 my $dbxref_link = $db_row->get_column('urlprefix') .
77 $db_row->get_column('url') .
78 $dbxref_row->get_column('accession');
80 my $dbxref_html = $db_row->get_column('name') .
81 ": <a href=$dbxref_link>" .
82 $dbxref_row->get_column('accession')."</a>";
84 push @dbxref_html_list, $dbxref_html;
88 my $dbxref_html_list = join('<br>', @dbxref_html_list) || $default_message;
90 ## Create the HTML table
92 $basic_info_content = <<HTML;
95 <tr> <td width="25%"> <b>Experimental design name:</b> </td> <td> $expdesign_name </td></tr>
96 <tr> <td width="25%"> <b>Experimental design type:</b> </td> <td> $expdesign_type </td></tr>
97 <tr> <td width="25%"> <b>Description:</b> </td> <td> $description </td></tr>
98 <tr> <td width="25%"> <b>Experimental design links:</b> </td> <td> $dbxref_html_list </td></tr>
104 $basic_info_content = "<big>There aren't any experimental design data for the specified parameters.</big>";
108 if (defined $expdesign_accession) {
109 $basic_info_html = "<center><big><b>Expression Experimental Design: $expdesign_accession</b></big></center><br>";
112 $basic_info_html .= info_section_html( title => "Experimental Design Basic Information", contents => $basic_info_content );
116 <% $basic_info_html %>
119 /util/import_javascript.mas,
120 classes => 'CXGN.Effects'