4 /phenome/allele.mas - a component for printing the alleles section
15 arrayref of CXGN::Phenome::Allele objects
19 logged in sp_person_id
23 boolean. Is the logged user a curator?
29 Naama Menda <nm249@cornell.edu>
42 use CXGN::Page::FormattingHelpers qw / columnar_table_html /;
47 foreach my $a (@$alleles) {
49 my $allele_id = $a->{allele_id};
51 my @allele_aliases = $a->get_allele_aliases();
52 foreach my $a_synonym (@allele_aliases) {
53 $allele_synonyms .= $a_synonym->get_allele_alias() . " ";
55 if ( !$allele_synonyms ) { $allele_synonyms = "[add new]"; }
56 my $allele_synonym_link =
57 qq |<a href= "/phenome/allele_synonym.pl?allele_id=$allele_id&action=new">$allele_synonyms</a> |;
59 my $a_person_id = $a->get_sp_person_id;
60 my $allele_edit_link =
61 ( $a_person_id && $user_id && ( $a_person_id == $user_id ) || ( $curator ) )
62 ? "<a href=\"/phenome/allele.pl?action=edit&allele_id=$allele_id\">[Edit]</a>"
63 : '<span class="ghosted">[Edit]</span> ';
65 my $phenotype = $a->get_allele_phenotype();
66 my $stock_ids = $a->get_stock_ids();
67 my $stock_count = scalar(@$stock_ids);
68 my $stock_link = qq|<a href="/phenome/allele.pl?action=view&allele_id=$allele_id">$stock_count </a>|;
72 "<i>" . $a->get_allele_symbol . "</i>",
75 qq|<div align="left"><a href="/phenome/allele.pl?action=view&allele_id=$allele_id"> |
84 $data = columnar_table_html(
86 'Allele symbol', 'Allele name',
87 'Synonyms', 'Phenotype',
90 data => \@allele_data,