package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
#line 10 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"

	use Number::Bytes::Human ();
HTML::Mason::Component::FileBased->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
HTML::Mason::Exception::Params->throw
    ( error =>
      "Odd number of parameters passed to component expecting name/value pairs"
    ) if @_ % 2;
my ( $seq, $highlight_coords, $source, $format_links, $blast_url );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( seq highlight_coords source ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 2 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
    $seq = $_[ $pos{'seq'} ];
#line 3 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
    $highlight_coords = $_[ $pos{'highlight_coords'} ];
#line 4 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
    $source = $_[ $pos{'source'} ];
#line 5 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
     $format_links = exists $pos{'format_links'} ? $_[ $pos{'format_links'} ] :  [];
#line 6 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
     $blast_url = exists $pos{'blast_url'} ? $_[ $pos{'blast_url'} ] :  undef;
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 13 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"

	my $seq_bytes = $seq->length*1.018+length($seq->id)+length($seq->desc)+1;
#line 8 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( '
' );
#line 9 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->comp(   '/page/page_title.mas', title => $seq->id   
); #line 9 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( '
' );
#line 16 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( '<div style="text-align: right; margin: 0 10px 1em 0">
  <b>Whole sequence (' );
#line 17 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print(  Number::Bytes::Human::format_bytes($seq_bytes)  );
#line 17 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( 'B):</b>
  ' );
#line 23 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print(  join ' | ',
     map {
           my ($name,$link) = @$_;
           qq|<a href="$link">$name</a>|
     } @$format_links
   );
#line 23 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( '
</div>

' );
#line 26 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->comp(   '/sequence/highlighted.mas',
   seq    => $seq,
   source => $source,
   highlight_coords      => $highlight_coords,
   highlight_description => 'BLAST matches',
   blast_url => $blast_url,
   
); #line 32 "/home/production/cxgn/sgn/mason/blast/show_seq/html.mas"
$m->print( '
' );
;return;
},
'declared_args' => {
  '$blast_url' => { default => ' undef' },
  '$format_links' => { default => ' []' },
  '$highlight_coords' => { default => undef },
  '$seq' => { default => undef },
  '$source' => { default => undef }
},
'load_time' => 1778161189,

)
;