Merge pull request #4106 from solgenomics/topic/wishlist
[sgn.git] / mason / solgs / population / summary.mas
blobefdcea86e39e492ae3f1007d5dd6a90c08a9f69e
1 <%doc>
3 =head1 NAME
5 /population/summary.mas - displays project metadata.
7 =AUTHOR
9 Isaak Y Tecle (iyt2@cornell.edu)
11 =cut
13 </%doc>
15 <%args>
17 $training_pop_id => ''
18 $training_pop_name => ''
19 $training_pop_desc => ''
21 $selection_pop_id => ''
22 $selection_pop_name => ''
23 $selection_pop_desc => ''
25 $model_page_url =>''
26 $training_pop_url =>''
27 $stocks_no
28 $markers_no
29 $traits_no
30 $trait_name => ''
31 $protocol_url
32 $list_reference => ''
33 $owner => ''
34 $combined_populations => ''
36 </%args>
38 <%perl>
40 $owner = 'NA' if !$owner;
41 $traits_no = 'NA' if !$traits_no;
43 $training_pop_url = $training_pop_name if !$training_pop_url;
44 my $pop_desc = $selection_pop_desc ? $selection_pop_desc : $training_pop_desc;
45 my $pop_name = $selection_pop_name ? $selection_pop_name : $training_pop_url;
46 my @data_c1 = (['Name', $pop_name],  ['Description', $pop_desc], ['Owner', $owner]);
47 my @data_c2 = (['No. of lines', $stocks_no],  ['No. of markers', $markers_no], ['Genotyping version', $protocol_url]);
49 push @data_c2,  ['No. of traits', $traits_no] if $traits_no > 1;
50 push @data_c2,  ['Training model', $model_page_url] if $model_page_url;
52 </%perl>
54 <table class="table">
55   <tr>
56     <td>
57       <& /page/columnar_table.mas,
58          data         => \@data_c1,
59          __alt_freq   => 0,
60          __align      => "l",
62         &>
63     </td>
64     <td>
65       <& /page/columnar_table.mas,
66          data       =>\@data_c2,
67         __alt_freq  => 1,
68         __align     => "l",
70         &>
71     </td>
72   </tr>
73 </table>