tweak formatting of genomic links on marker pages
[sgn.git] / mason / markers / genome.mas
blob16a0eb104b014ee6d724f6e70eab1d4a922a480c
1 <%args>
2 $marker
3 </%args>
4 <%init>
6 # look up gbrowse cross-refs for this marker, if any
7 my @xrefs = map {
9     $_->xrefs({
10         -types   => ['match'],
11         -name    => 'SGN-M'.$marker->marker_id,
12         -aliases => 1,
13     })
15 } $c->enabled_feature('gbrowse2');
17 </%init>
19 <&| /page/info_section.mas, title => "Genomic locations" &>
20 % if( @xrefs ) {
21 % my @locations =
22   <& /page/columnar_table.mas,
23             headings=>["Genome Annotation", "Position(s)"],
24             data=> [ map [ $_->data_source->description,
25                            '<a href="'.$_->url.'">'
26                            .join( ', ', (
27                                map $_->seq_id.':'.$_->start.'..'.$_->end, @{$_->seqfeatures}
28                                   )
29                              )
30                            .'</a>',
31                           ],
32                      @xrefs
33                    ],
34             __alt_freq   =>2,
35             __alt_width  => 1,
36             __alt_offset => 3,
37             __align=> 'l'
38   &>
39 % }
40 </&>