package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
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 ( $marker );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( marker ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 29 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
    $marker = $_[ $pos{'marker'} ];
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
#line 27 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
#line 31 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
#line 32 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"


my $marker_id = $marker->marker_id();
my $html='';

my $unigene_matches = $marker->primer_unigene_matches(); #$dbh->selectcol_arrayref("SELECT DISTINCT unigene_id FROM primer_unigene_match WHERE marker_id=$marker_id");

foreach my $ug (@$unigene_matches){
  
  $html .= qq{<a href="/search/unigene.pl?unigene_id=SGN-U$ug">SGN-U$ug</a><br>};
  
}

# don't show anything if there is no data...
#
if (!$html) { return; }

#line 50 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
#line 51 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->comp( { content => sub {
#line 51 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
  ' );
#line 52 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print(  $html  );
#line 52 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
#line 53 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
} }, '/page/info_section.mas', title=>'Unigene blast matches for primers'
 );
#line 53 "/home/production/cxgn/sgn/mason/markers/unigene_match.mas"
$m->print( '
' );
;return;
},
'declared_args' => {
  '$marker' => { default => undef }
},
'load_time' => 1763079527,

)
;