1 package CXGN
::Cview
::LocusChr
;
6 use CXGN
::Cview
::Chromosome
;
7 use CXGN
::Cview
::Cview_data_adapter
;
8 use CXGN
::Configuration
;
9 use CXGN
::Cview
::MapImage
;
12 use base qw
/ CXGN::Cview::MapImage /;
30 my $self= $class->SUPER::new
($name, $width, $height);
34 my $marker_name= shift;
36 $self->set_lg_name($lg_name);
38 $self->set_marker_name($marker_name);
43 =head2 get_image_filename
54 sub get_image_filename
{
57 my $filename = time().".$$.png";
58 my $vhost_conf=CXGN
::CView
::Config
->new();
59 my $image_path = $vhost_conf->get_conf('basepath').$vhost_conf->get_conf('tempfiles_subdir')."/cview/$filename";
60 my $image_url = $vhost_conf->get_conf('tempfiles_subdir')."/cview/$filename";
62 my $chromosome= CXGN
::Cview
::Chromosome
->new($self->get_lg_name(), 100,50, 25 );
63 CXGN
::Cview
::Cview_data_adapter
::fetch_chromosome
($self->get_dbh(), $chromosome, $self->get_map(), $self->get_lg_name());
64 $chromosome->set_caption($self->get_lg_name);
65 $chromosome->set_width(12);
66 my $map_id= $self->get_map()->map_id();
67 my $marker_name= $self->get_marker_name();
68 my $lg_name=$self->get_lg_name();
69 $chromosome->set_url("/cview/view_chromosome.pl?map_id=$map_id&chr_nr=$lg_name&hilite=$marker_name");
71 my @markers= $chromosome->get_markers();
73 foreach my $m(@markers) {
74 if ($m->get_name() eq $self->get_marker_name()) {
76 $m->set_label_spacer(20);
78 else { $m->hide_label(); }
79 $m->set_color(150, 80, 50);
82 $self->add_chromosome($chromosome);
84 $self -> render_png_file
($image_path);
85 return ($image_path, $image_url);
137 return $self->{lg_name
};
154 $self->{lg_name
}=shift;
191 =head2 get_marker_name
202 sub get_marker_name
{
204 return $self->{marker_name
};
208 =head2 set_marker_name
219 sub set_marker_name
{
221 $self->{marker_name
}=shift;