6 Mason component to show gene family data associated to an unigene
18 <& '/transcript/unigene/gene_family_info.mas', unigene => $unigene &>
20 where $unigene is CXGN::Transcript::Unigene object
26 Another piece of mason code get the unigene data (gene family info) from the database and show it
28 This code was taken from unigene.pl (originally added by Chenwei, 08/2005, slightly refactored, Lukas 9/2007)
34 Aureliano Bombarely (ab782@cornell.edu)
51 use CXGN::Page::FormattingHelpers qw/ info_section_html info_table_html columnar_table_html page_title_html html_break_string /;
53 my ($library_content, $library_html, @library_table);
57 my $id = $unigene->get_unigene_id();
59 ## If there aren't any unigene that comes from unigene_detail.mas, it will not do anything because the error message is given for the
60 ## basic_detail.mas script
62 my $gene_family_html_content;
66 my @families = $unigene->get_families();
68 my $gene_family_content;
70 if (scalar(@families) > 0) {
71 for my $family (@families) {
72 my ($fam_id, $ivalue, $annotation, $count) = @{$family};
74 $annotation =~ s/;/<br>/g;
75 $annotation =~ s/,/<br>/g;
76 $annotation =~ s/Molecular Function/ - Molecular Function/g;
77 $annotation =~ s/Cellular Component/ - Cellular Component/g;
78 $annotation =~ s/Biological Process/ - Biological Process/g;
80 my $family_link = '<a href="family.pl?family_id='.$fam_id.'">'.$fam_id."</a>";
81 push @family_info, [$ivalue, $family_link, $annotation, $count];
83 $gene_family_content = columnar_table_html( headings => ['Family Build <br>(I value*)','Family ID', 'Annotation**','# Members'],
84 data => \@family_info,
85 __align => ['c', 'c', 'l', 'c'],
88 $gene_family_content .= '<br> *i value: controls inflation, a process to dissipate family clusters. ';
89 $gene_family_content .= 'At high i value, genes tend to be separated into different families.<br>';
90 $gene_family_content .= '**Annotation: the most common InterPro annotation(s) of the Arabidopsis members in the family.<br>';
94 my $gf_count = scalar(@families);
95 $gene_family_html_content = info_section_html( title => "Gene Family (" . $gf_count . ")",
96 contents => $gene_family_content,
104 <% $gene_family_html_content %>