autogenerated name metadata table
[sgn.git] / mason / feature / sequence_download.mas
blob150942036c0d7b111025cb635baddebb36185e66
1 <%args>
2   $feature
3   $region        => undef
4   $length        => undef
5   $download_url  => '/api/v1/sequence/download/single/'.$feature->feature_id
6 </%args>
7 % if( $length > 0 ) {
8 <a href="<% $download_url %>">Download sequence (<% Number::Bytes::Human::format_bytes( $length ) %>b)</a>\
9 % }
10 <%init>
11   $length ||=  $region            ? $region->[1] - $region->[0] :
12                $feature->seqlen   ? $feature->seqlen            :
13                $feature->residues ? length $feature->residues   :
14                                     0;
15 </%init>
16 <%once>
17   use Number::Bytes::Human;
18 </%once>