Merge branch 'master' into topic/ordering_new_feature
[sgn.git] / mason / locus / print_mrna_features.mas
blob2d4dee6c7e8ba06894a2e1dbb5f3e24fdc9b0a72
1 <%args>
2     $feature
3     $blast_url => undef
4 </%args>
5 <%once>
6     use SGN::View::Feature 'mrna_cds_protein_sequence';
7 </%once>
8 <%perl>
9     my @mrnas       = grep $_->type->name eq 'mRNA', $feature->child_features;
10 </%perl>
13 <&| /page/info_section.mas,
14         title       => 'Genomic sequence',
15         subtitle    => 'unprocessed genomic sequence region underlying this gene',
16         empty_message => 'Not available',
17         collapsible => 1,
18         collapsed   => 1,
21    <& /feature/region_sequence.mas,
22        feature   => $feature,
23        blast_url => $blast_url,
24    &>
26 </&>
28 % for my $mrna ( @mrnas ) {
30   <&| /page/info_section.mas,
31           title       => 'mRNA '. $mrna->name,
32           collapsible => 1,
33   &>
35     <&| /page/info_section.mas,
36        title => 'Ontology terms',
37        subtitle => 'terms associated with this mRNA',
38        collapsible => 1,
39        is_subsection => 1,
40     &>
42       <& /feature/feature_cvterms.mas,
43           feature   => $mrna,
44       &>
46     </&>
48 %   my ( $mrna_sequence, $cds_sequence, $protein_sequence ) = @{(mrna_cds_protein_sequence( $mrna ))[0] || [] };
50     <&| /page/info_section.mas,
51             title         => 'cDNA sequence',
52             is_subsection => 1,
53             subtitle      => 'spliced cDNA sequence, including UTRs',
54             empty_message => 'Not available',
55             collapsible   => 1,
56             collapsed     => 1,
57     &>
59 %  if( $mrna_sequence ) {
61      <div style="margin-left: 3em">
62        <& /sequence/with_markup.mas,
63           seq       => $mrna_sequence,
64           width     => 80,
65           subdiv    => 10,
66           blast_url => $blast_url,
67         &>
68      </div>
69      <div style="margin-top: 1em">
70         <& /feature/sequence_download.mas,
71              feature => $mrna,
72          &>
73      </div>
74 % }
76     </&>
78     <&| /page/info_section.mas,
79             title         => 'Protein sequence',
80             is_subsection => 1,
81             subtitle      => 'translated polypeptide sequence',
82             empty_message => 'Not available',
83             collapsible   => 1,
84             collapsed     => 1,
85     &>
87 %  if( $protein_sequence ) {
89      <div style="margin-left: 3em">
90        <& /sequence/with_markup.mas,
91           seq       => $protein_sequence,
92           width     => 80,
93           subdiv    => 10,
94           blast_url => $blast_url,
95         &>
96      </div>
97 %    if( $protein_sequence->can('feature_id') ) {
98      <div style="margin-top: 1em">
99         <& /feature/sequence_download.mas,
100              feature => $protein_sequence,
101          &>
102      </div>
103 %    }
104 %  }
105     </&>
106   </&>