6 Mason component to show preceding unigenes.
18 <& '/transcript/unigene/preceding_unigenes.mas', dbh => $dbh, unigene => $unigene &>
20 where: $dbh is a database connection object
21 $unigene is CXGN::Transcript::Unigene object
27 This is a mason code get the preceding unigene data from the database.
28 If it find precedding unigenes, it will print it as section.
34 Aureliano Bombarely (ab782@cornell.edu)
52 use CXGN::Transcript::Unigene;
53 use CXGN::Transcript::UnigeneBuild;
54 use CXGN::Page::FormattingHelpers qw/ info_section_html info_table_html columnar_table_html page_title_html html_break_string /;
56 my $preceding_unigene_content;
57 my @preceding_unigenes = ();
59 ## If there aren't any unigene that comes from unigene_detail.mas, it will not return a message because it will returned by the basic
62 if (defined $ARGS{'unigene'}) {
64 my $preceding_build_name = "";
65 my $preceding_build_nr = "";
67 my @preceding_unigene_ids = $unigene->get_preceding_unigene_ids();
69 if (@preceding_unigene_ids) {
70 foreach my $uid (@preceding_unigene_ids){
72 my $preceding_u = CXGN::Transcript::Unigene->new($dbh, $uid);
73 my $preceding_build = CXGN::Transcript::UnigeneBuild->new($dbh, $preceding_u->get_build_id());
74 $preceding_build_name = $preceding_build->get_organism_group_name();
75 my $preceding_build_nr = $preceding_build->get_build_nr();
76 my $unigene_link = "<a href=\"unigene.pl?unigene_id=SGN-U$uid\">SGN-U$uid</a>";
78 push(@preceding_unigenes, [$unigene_link, "$preceding_build_name #$preceding_build_nr"]);
82 $preceding_unigene_content = columnar_table_html(headings => ['Unigene', 'Build'], data=> \@preceding_unigenes);
85 $preceding_unigene_content = "";
90 my $p_count = scalar(@preceding_unigenes);
91 my $preceding_html = info_section_html( title => "Preceding Unigenes (" . $p_count .")",
92 contents => $preceding_unigene_content,