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 ( $dbh, $chr_nr, $map_id, $map_version_id, $cM, $clicked, $zoom, $show_offsets, $show_physical, $show_ruler, $show_IL, $show_zoomed, $comp_map_id, $comp_map_version_id, $comp_chr, $color_model, $marker_type, $force, $map_chr_select, $size, $hilite, $cM_start, $cM_end, $confidence, $default_map_id, $cview_db_backend );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( dbh chr_nr ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 53 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
    $dbh = $_[ $pos{'dbh'} ];
#line 54 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
    $chr_nr = $_[ $pos{'chr_nr'} ];
#line 55 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $map_id = exists $pos{'map_id'} ? $_[ $pos{'map_id'} ] :  undef;
#line 56 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $map_version_id = exists $pos{'map_version_id'} ? $_[ $pos{'map_version_id'} ] :  undef;
#line 57 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $cM = exists $pos{'cM'} ? $_[ $pos{'cM'} ] :  0;
#line 58 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $clicked = exists $pos{'clicked'} ? $_[ $pos{'clicked'} ] :  0;
#line 59 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $zoom = exists $pos{'zoom'} ? $_[ $pos{'zoom'} ] :  0;
#line 60 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $show_offsets = exists $pos{'show_offsets'} ? $_[ $pos{'show_offsets'} ] :  0;
#line 61 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $show_physical = exists $pos{'show_physical'} ? $_[ $pos{'show_physical'} ] :  0;
#line 62 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $show_ruler = exists $pos{'show_ruler'} ? $_[ $pos{'show_ruler'} ] :  0;
#line 63 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $show_IL = exists $pos{'show_IL'} ? $_[ $pos{'show_IL'} ] :  0;
#line 64 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $show_zoomed = exists $pos{'show_zoomed'} ? $_[ $pos{'show_zoomed'} ] :  undef;
#line 65 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $comp_map_id = exists $pos{'comp_map_id'} ? $_[ $pos{'comp_map_id'} ] :  undef;
#line 66 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $comp_map_version_id = exists $pos{'comp_map_version_id'} ? $_[ $pos{'comp_map_version_id'} ] :  undef;
#line 67 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $comp_chr = exists $pos{'comp_chr'} ? $_[ $pos{'comp_chr'} ] :  undef;
#line 68 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $color_model = exists $pos{'color_model'} ? $_[ $pos{'color_model'} ] :  undef;
#line 69 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $marker_type = exists $pos{'marker_type'} ? $_[ $pos{'marker_type'} ] :  undef;
#line 70 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $force = exists $pos{'force'} ? $_[ $pos{'force'} ] :  0;
#line 71 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $map_chr_select = exists $pos{'map_chr_select'} ? $_[ $pos{'map_chr_select'} ] :  '';
#line 72 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $size = exists $pos{'size'} ? $_[ $pos{'size'} ] :  undef;
#line 73 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $hilite = exists $pos{'hilite'} ? $_[ $pos{'hilite'} ] :  undef;
#line 74 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $cM_start = exists $pos{'cM_start'} ? $_[ $pos{'cM_start'} ] :  undef;
#line 75 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $cM_end = exists $pos{'cM_end'} ? $_[ $pos{'cM_end'} ] :  undef;
#line 76 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $confidence = exists $pos{'confidence'} ? $_[ $pos{'confidence'} ] :  undef;
#line 77 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $default_map_id = exists $pos{'default_map_id'} ? $_[ $pos{'default_map_id'} ] :  undef;
#line 78 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
     $cview_db_backend = exists $pos{'cview_db_backend'} ? $_[ $pos{'cview_db_backend'} ] :  'cxgn';
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
$m->print( '
' );
#line 51 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
$m->print( '
' );
#line 80 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"
$m->print( '
' );
#line 81 "/home/production/cxgn/sgn/mason/cview/chr/index.mas"


use CXGN::Cview::ChromosomeViewer;

my $viewer = CXGN::Cview::ChromosomeViewer -> new($dbh);

$viewer -> set_temp_dir(File::Spec->catfile($c->get_conf('tempfiles_subdir'), "cview"));
$viewer -> set_basedir($c->get_conf('basepath'));

$viewer -> set_show_offsets($show_offsets);
$viewer -> set_map_id($map_id);
$viewer -> set_map_version_id($map_version_id);
$viewer -> set_ref_chr($chr_nr);
$viewer -> set_cM($cM);
$viewer -> set_clicked($clicked);
$viewer -> set_zoom($zoom);
$viewer -> set_show_physical($show_physical);
$viewer -> set_show_ruler($show_ruler);
$viewer -> set_show_IL($show_IL);
$viewer -> set_comp_map_id($comp_map_id);
$viewer -> set_comp_map_version_id($comp_map_version_id);
$viewer -> set_comp_chr($comp_chr);
$viewer -> set_color_model($color_model);
$viewer -> set_display_marker_type($marker_type);
$viewer -> set_force($force);
$viewer -> set_default_map_id($default_map_id);
$viewer -> set_db_backend($cview_db_backend);

if ($map_chr_select) { 
    my ($comp_map_id, $comp_chr) = split / /, $map_chr_select; 
    $viewer->set_comp_map_version_id($comp_map_id);
    $viewer->set_comp_chr($comp_chr);
}
$viewer -> set_size($size);
$viewer -> set_hilite($hilite);
$viewer -> set_cM_start($cM_start);
$viewer -> set_cM_end($cM_end);
$viewer -> set_confidence($confidence);
$viewer -> set_show_zoomed($show_zoomed);

$viewer->generate_page();

;return;
},
'declared_args' => {
  '$cM' => { default => ' 0' },
  '$cM_end' => { default => ' undef' },
  '$cM_start' => { default => ' undef' },
  '$chr_nr' => { default => undef },
  '$clicked' => { default => ' 0' },
  '$color_model' => { default => ' undef' },
  '$comp_chr' => { default => ' undef' },
  '$comp_map_id' => { default => ' undef' },
  '$comp_map_version_id' => { default => ' undef' },
  '$confidence' => { default => ' undef' },
  '$cview_db_backend' => { default => ' \'cxgn\'' },
  '$dbh' => { default => undef },
  '$default_map_id' => { default => ' undef' },
  '$force' => { default => ' 0' },
  '$hilite' => { default => ' undef' },
  '$map_chr_select' => { default => ' \'\'' },
  '$map_id' => { default => ' undef' },
  '$map_version_id' => { default => ' undef' },
  '$marker_type' => { default => ' undef' },
  '$show_IL' => { default => ' 0' },
  '$show_offsets' => { default => ' 0' },
  '$show_physical' => { default => ' 0' },
  '$show_ruler' => { default => ' 0' },
  '$show_zoomed' => { default => ' undef' },
  '$size' => { default => ' undef' },
  '$zoom' => { default => ' 0' }
},
'load_time' => 1763125086,

)
;