1 package CXGN
::Cview
::Marker
;
5 CXGN::Cview::Marker - a class for drawing markers
9 Inherits from L<CXGN::Cview::ImageObject>. Defines a marker object on a Cview image. Markers can be rendered in different colors, and have labels associated with them, L<CXGN::Cview::Label>, that can be hilited, rendered in different colors, etc. See the L<CXGN::Cview::Label> class for more information. The two label objects that are associated with each marker are:
15 a name label object. The label object can in theory be accessed using the accessors for this label are get_label() and set_label(), however it is best to use the standard accessors of the marker object and let it deal with the label object itself.
19 an offset label that gives the distance in cM (or in the current map units) and is drawn symmetrically on the other side of the chromosome to the name label. The accessors for this label are get_offset_label() and set_offset_label(). It is currently not drawn by default in the Cview programs. The accessor show_offset_label() will cause the offset label to be displayed.
23 Labels also have a mark associated with them. That's a small round circle after the label that can be colored to provide some additional visual information about the marker. See the mark related functions below.
25 Markers can be hidden using the set_hidden(1) accessor. Only the small tick on the chromosome will be drawn, and the label will be omitted.
27 For a marker that can define a range on the chromosome instead of a specific location use the L<CXGN::Cview::Marker::RangeMarker> class. See that class for more information.
29 Other Marker properties are inherited from ImageObject, such as the enclosing_rect accessors, set_url and get_url, and others. See L<CXGN::Cview::ImageObject>.
33 See also the documentation in L<CXGN::Cview>.
37 Lukas Mueller (lam87@cornell.edu)
39 =head1 VERSION and CHANGE HISTORY
41 Original version July 2004
43 [2006-07-07] Replaced label functions with CXGN::Cview::Label class.
54 use CXGN
::Cview
::ImageObject
;
55 use CXGN
::Cview
::Label
;
57 use base qw
/ CXGN::Cview::ImageObject /;
61 my $m -> new ($chr, $marker_id, $marker_name, $marker_type, $confidence, $order_in_loc, $location_subscript, $cM_offset, $loc_type, $loc_order, $overgo, $bac_count);
63 Creates a new marker. The $chr is the chromosome object the marker belongs to. The marker_id has to be a unique id for the marker. The marker_name is any string, marker_type should be CAPS, COSII, RFLP, SNP etc, confidence is -1 for undefined, 0 = ? .. 4= LOD(3). order_in_loc is deprecated, location_subscript is the subscript of the marker on that chromosome, if any. cM_offset is the offset of the marker on the chr, in cM. overgo should be set to true if the marker has an overgo marker, has_bacs should be set to true if there are BACs associated to that overgo marker.
69 my $self = $class -> SUPER
::new
(@_);
70 my $chromosome = shift;
72 $self->set_chromosome($chromosome);
73 my ($marker_id, $marker_name, $marker_type, $confidence, $order_in_loc, $location_subscript, $offset, $loc_type, $loc_order, $has_overgo, $has_bacs) = @_;
74 # print STDERR "\@_ = @_\n";
76 # initialize the marker object with what was supplied by
77 # the call and some reasonable default parameters
79 $self->set_id($marker_id);
81 $self->set_marker_type($marker_type);
82 $self->set_confidence($confidence);
83 $self->set_order_in_loc($order_in_loc);
84 $self->set_location_subscript($location_subscript);
85 $self->set_offset($offset);
86 $self->set_loc_type($loc_type);
87 $self->set_loc_order($loc_order);
88 $self->set_has_overgo($has_overgo);
89 $self->set_has_bacs($has_bacs);
90 $self->set_color(50, 50 , 50);
91 $self->set_label(CXGN
::Cview
::Label
->new());
92 #$self->set_label_side("right");
93 $self->set_show_tick(1);
94 $self->set_north_range(0);
95 $self->set_south_range(0);
98 # initialize the label
100 $self->get_label()->set_hilite_color(255, 255, 0);
101 $self->get_label()->set_line_color(150,150,150);
102 if (!$location_subscript) { $location_subscript=""; }
103 if (!$marker_name) { $marker_name = ""; }
104 $self->get_label()->set_name($marker_name.$location_subscript);
105 $self->set_marker_name($marker_name);
109 # $self->set_north_range(0);
110 # $self->set_south_range(0);
111 $self->set_mark_color(255, 255, 255);
112 $self->set_mark_size(8);
113 $self->set_mark_link("");
115 # the default for this is set in the label object. $self->set_label_spacer(); # the distance between the label and the midline of the chromosome
116 $self->set_font(GD
::Font
->Small());
118 # the offset label is shown on the opposite side of
121 my $offset_label = CXGN
::Cview
::Label
->new();
122 $offset_label->set_text_color(150, 150, 150);
123 $offset_label->set_name( (sprintf "%5.2f", ($offset || 0) ) . " ");
124 $self->set_offset_label($offset_label);
129 =head2 function get_color()
131 Gets the color of the marker (more specifically, the line of the marker on the chromosome). Three numbers between 0 and 255 for red, green and blue channels are returned as a list.
137 if (!exists($self->{marker_color
})) { @
{$self->{marker_color
}}=(); }
138 return @
{$self->{marker_color
}};
141 =head2 function set_color()
143 Sets the color of the marker (more specifically, the line of the marker on the chromosome). Three numbers between 0 and 255 for red, green and blue channels are required. Default color is black.
149 $self->{marker_color
}[0]=shift;
150 $self->{marker_color
}[1]=shift;
151 $self->{marker_color
}[2]=shift;
155 =head2 function get_name()
157 Gets the complete name of the marker including the suffix.
163 # test if there is anything in loation_subscript and set to empty string
164 # otherwise a 0 may be appended.
165 if (!$self->get_location_subscript()) { $self->set_location_subscript(""); }
166 return $self->get_marker_name().$self->get_location_subscript();
169 =head2 functions get_marker_name(), set_marker_name()
171 gets the marker name, excluding the suffix.
175 sub get_marker_name
{
177 # this function returns the marker name without the subscript. This is useful for constructing links to the marker detail page
178 # which requires a type/name tuple
179 if (!exists($self->{marker_name
}) || !defined($self->{marker_name
})) { $self->{marker_name
}=""; }
180 return $self->{marker_name
};
183 sub set_marker_name
{
186 $self->{marker_name
}=$name;
189 =head2 accessors get_synonyms, set_synonyms
201 if (!exists($self->{synonyms
})) {
202 $self->{synonyms
} = [];
204 return @
{$self->{synonyms
}};
209 $self->{synonyms
} = shift;
213 =head2 functions get_id(), set_id()
215 gets the unique id associated with the marker.
221 if (!exists($self->{marker_id
}) || !defined($self->{marker_id
})) {
222 $self->{marker_id
}="";
224 return $self->{marker_id
};
229 $self->{marker_id
}=shift;
232 =head2 functions set_confidence() and get_confidence()
234 Synopsis: my $confidence = $m->get_confidence()
235 Arguments: setter function: -1 ... 3.
236 -1 means uncalculated confidence
240 Returns: getter returns values above
241 defaults to -1 if confidence property has not been set.
242 Side effects: display in the chromosome viewer depends on confidence values.
249 $self->{confidence
}=shift;
254 if (!exists($self->{confidence
}) || !defined($self->{confidence
}) || !$self->{confidence
}) {
255 $self->{confidence
}=-1;
257 return $self->{confidence
};
262 =head2 accessors set_marker_type() and get_marker_type()
264 Synopsis: accessors for the marker_type property.
267 Side effects: rendering in the chromosome viewer depends on
269 Description: marker types are: RFLP, SSR, CAPS and COS.
273 sub set_marker_type
{
275 $self->{marker_type
} = shift;
278 sub get_marker_type
{
280 if (!exists($self->{marker_type
}) || !defined($self->{marker_type
})) {
281 $self->{marker_type
}="";
283 return $self->{marker_type
};
286 =head2 function get_mark_color()
288 the mark is a little circle displayed after the marker name.
289 it can be used to add additional visual information for a marker.
290 The mark is clickable. The link can be set using set_mark_link().
291 The default color is white with no link.
297 return @
{$self->{mark_color
}};
300 =head2 function set_mark_color()
302 the mark is a little circle displayed after the marker name.
303 it can be used to add additional visual information for a marker.
304 The mark is clickable. The link can be set using set_mark_link().
305 The default color is white with no link.
310 # the mark is a little circle displayed after the marker name.
311 # it can be used to add additional visual information for a marker.
312 # The mark is clickable. The link can be set using set_mark_link().
313 # The default color is white with no link.
315 $self->{mark_color
}[0] = shift;
316 $self->{mark_color
}[1] = shift;
317 $self->{mark_color
}[2] = shift;
320 =head2 function set_show_mark()
322 Synopsis: $m->set_show_mark()
325 Side effects: causes the mark to be displayed when the marker
333 $self->{show_mark
} = 1;
336 =head2 function hide_mark()
338 Synopsis: $m->hide_mark()
341 Side effects: hides the mark
348 $self->{show_mark
}=0;
351 =head2 function get_show_mark()
363 return $self->{show_mark
};
366 =head2 functions set_mark_link(), get_mark_link()
378 $self->{mark_link
} = shift;
383 if (!exists($self->{mark_link
})) { $self->{mark_link
}=""; }
384 return $self ->{mark_link
};
387 =head2 functions has_overgo(), set_has_overgo()
389 Synopsis: $m->has_overgo()
392 Side effects: used to derive the mark\'s color
399 return $self->{has_overgo
};
404 $self->{has_overgo
}=1;
407 =head2 functions has_bacs(), set_has_bacs()
409 Synopsis: $m->set_has_bacs(1)
412 Side effects: causes the mark to be displayed in red.
419 $self->{has_bacs
} = shift; # the number of bacs associated with this marker
424 return $self->{has_bacs
};
427 =head2 functions get_mark_rect(), set_mark_rect()
439 if (! exists($self->{mark_rect
}) || !defined($self->{mark_rect
})) { @
{$self->{mark_rect
}} = (0,0,0,0); }
440 return ($self ->{mark_rect
}[0], $self->{mark_rect
}[1], $self->{mark_rect
}[2], $self->{mark_rect
}[3]);
445 ($self ->{mark_rect
}[0], $self->{mark_rect
}[1], $self->{mark_rect
}[2], $self->{mark_rect
}[3]) = @_;
448 =head2 functions set_mark_size(), get_mark_size()
460 $self->{mark_size
} = shift;
465 if (!exists($self->{mark_size
}) || !defined($self->{mark_size
})) { $self->{mark_size
}=0; }
466 return $self->{mark_size
};
469 =head2 functions is_frame_marker(), set_frame_marker()
473 Returns: returns true if the object represents
475 Side effects: the chromosome viewer may decide to render
476 these markers differently
477 Description: set_frame_marker just sets the property to 1.
482 sub is_frame_marker
{
484 if (!exists($self->{loc_type
}) || !defined($self->{loc_type
})) { $self->{loc_type
}=""; }
485 return ($self->{loc_type
} eq "frame");
488 sub set_frame_marker
{
490 $self->{loc_type
} = "frame";
494 =head2 functions set_chromosome(), get_chromosome()
496 Synopsis: accessors for the chromosome property, representing
497 the chromosome this marker is associated with.
498 Arguments: setter: a CXGN::Cview::Chromosome object.
499 Returns: getter: a CXGN::Cview::Chromosome object.
500 Side effects: the marker will be drawn on this chromosome. The
501 marker also needs to be added to the marker list of
502 the chromosome. Calling add_marker on the chromosome
503 object takes care of all that.
510 return $self->{chromosome
};
515 $self->{chromosome
}=shift;
518 =head2 function hide()
520 Hides the marker completely from the chromosome.
526 #$self -> {hidden} = 1;
527 $self->get_label()->set_hidden(1);
530 =head2 function unhide()
538 #$self -> {hidden} = 0;
539 $self->get_label()->set_hidden(0);
542 =head2 function is_hidden()
544 Returns true if marker is hidden.
550 #return $self -> {hidden};
551 return $self->get_label()->is_hidden();
554 =head2 function hide_label()
556 Hides the label of the marker only. The marker 'tick' is still being drawn.
562 #$self->{label_hidden} = 1;
563 $self->get_label()->set_hidden(1);
566 =head2 function show_label()
568 Unhides the label if it was previously hidden. Otherwise has no effect.
574 #$self ->{label_hidden} = 0;
575 $self->get_label()->set_hidden(0);
578 =head2 function is_label_visible()
580 Returns true if the label is not hidden.
584 sub is_label_visible
{
586 return !$self->is_hidden();
589 =head2 function get_image_map()
591 Returns the image map for this label as a string. Usually the chromosome object calls this function.
597 #print STDERR "get_image_mapo marker\n";
598 # my $coords = join ",", ($self -> get_label_rect());
600 if ($self->get_url()) {
601 $s = $self->get_label()->get_image_map();
602 # $s = "<area shape=\"rect\" coords=\"".$coords."\" href=\"".$self->get_url()."\" alt=\"\" />\n";
604 if ($self->get_show_mark()) {
605 $s .= "<area shape=\"rect\" coords=\"".(join(",", $self->get_mark_rect()))."\" href=\"".$self->get_mark_link()."\" alt=\"\" title=\"".($self->get_tooltip())."\" />\n";
612 =head2 function render()
614 $marker -> render($image);
616 Renders the marker on a GD image object. The chromosome object usually calls this function to render the entire chromosome.
624 # calculate y position in pixels
626 my $y = $self->get_chromosome()->get_vertical_offset() + $self->get_chromosome()->mapunits2pixels($self->get_offset());
628 #warn "[Marker.pm] ".$self->get_offset()."cM is $y pixels...\n";
629 # determine the side which this label should be drawn on. If it was not set manually,
630 # retrieve the side from the chromosome as a default.
632 if (!$self->get_label_side()) {
633 $self->set_label_side($self->get_chromosome()->get_label_side());
636 # render marker only if it is visible (markers outside of sections or hidden markers are not visible)
637 if ($self -> is_visible
()) {
639 # draw the tick on the chromosome
641 my $color = $image -> colorResolve
($self->get_color());
642 my $chromosome_width = $self->get_chromosome()->get_width();
643 my $halfwidth = int($chromosome_width/2);
644 $self->draw_tick($image);
646 # deal with label stuff
648 # the $label object deals with displaying the marker's name
649 # the $offset_label object deals with displaying the marker's offset
650 # on the opposite side
652 my $label = $self->get_label();
653 my $offset_label = $self->get_offset_label();
655 if ($self->get_hilited()) {
656 $label->set_hilited(1);
659 # draw the labels left of the chromosome if label_side eq left
661 if ($self->get_label_side() eq "left") {
663 # define the Label's reference point
665 $label->set_reference_point($self->get_chromosome()->get_horizontal_offset()-$halfwidth,$y);
666 $label->set_horizontal_offset($self->get_chromosome()->get_horizontal_offset()- $label->get_label_spacer());
668 # draw the offset on the right if label_side eq left, if display_marker
669 # offset is true in the chromosome object
671 if ($self->get_chromosome()->{display_marker_offset
}) {
673 # define the label's reference point
675 $offset_label->set_reference_point($self->get_chromosome()->get_horizontal_offset()+$halfwidth, $y);
676 $offset_label->set_horizontal_offset($self->get_chromosome()->get_horizontal_offset()+ $label->get_label_spacer()
678 $offset_label->set_vertical_offset($label->get_vertical_offset());
679 $offset_label->set_align_side("left");
681 $offset_label->set_hidden($label->is_hidden());
682 $offset_label->render($image);
686 # draw the labels on the right side if label_side is right
688 elsif ($self->get_label_side() eq "right") {
690 # define the Label's reference point (the point where the label points to)
691 # and the horizontal offset (the actual position of the text label)
693 $label->set_reference_point($self->get_chromosome()->get_horizontal_offset()+$halfwidth,$y);
694 $label->set_horizontal_offset($self->get_chromosome()->get_horizontal_offset()+$label->get_label_spacer());
696 # if show offset is turned on, draw a label on the opposite side of the chromosome
697 # showing the cM position
699 if ($self->get_chromosome()->{display_marker_offset
}) {
701 $offset_label->set_reference_point(
702 $self->get_chromosome()->get_horizontal_offset()-$halfwidth, $y
705 $offset_label->set_horizontal_offset($self->get_chromosome()->get_horizontal_offset()-
706 $label->get_label_spacer()
708 $offset_label->set_vertical_offset($label->get_vertical_offset());
709 $offset_label->set_align_side("right");
710 $offset_label->set_hidden($label->is_hidden());
711 $offset_label->render($image);
715 $label->render($image);
717 # draw the offset on the left if label_side eq right, if display_marker
718 # offset is true in the chromosome object
720 $self->draw_mark($image);
725 =head2 function draw_tick
739 my $color = $image -> colorResolve
($self->get_color());
740 my $halfwidth = int($self->get_chromosome->get_width/2);
741 my $y = $self->get_chromosome()->get_vertical_offset() + $self->get_chromosome()->mapunits2pixels($self->get_offset());
743 if ($self->get_show_tick()) {
744 $image -> line
($self->get_chromosome()->get_horizontal_offset() - $halfwidth +1, $y, $self->get_chromosome()->get_horizontal_offset()+$halfwidth-1, $y, $color);
748 =head2 functions get_label(), set_label()
750 Synopsis: Accessors for the label property, which
751 is a CXGN::Cview::Label object. This attribute
752 is set automatically in the constructor and the
753 label name set to the marker name.
754 Arguments: the setter takes a CXGN::Cview::Label object as a
756 Returns: the getter returns the marker\'s label object.
757 Side effects: the label object attributes are used for rendering
765 return $self->{label
};
770 $self->{label
}=shift;
773 =head2 function is_visible()
775 returns true if the marker is visible, meaning it is not hidden and it lies not outside the chromosome section, if defined.
782 # if it is hidden, we know its not visible...
784 if ($self->{hidden
}) { return 0; }
786 # if the chromosome is a section, we return true if the offset is in that inverval, not otherwise
787 if ($self->get_chromosome()->is_section()) {
788 if ($self->get_offset() >= $self->get_chromosome()->get_start_cM() && $self->get_offset() <= $self ->get_chromosome()->{end_cM
}) {
794 # it's not hidden, and it's not a section, so it has to be visible...
801 return $self -> {type
};
804 =head2 function draw_mark()
806 Synopsis: draws the mark as specified with the other mark functions.
810 Description: the mark is a little circle next to the marker name that
811 can be used to convey additional information about the marker.
812 The color can be set using set_mark_color() and the link can be
813 set using set_mark_url(). The mark should be its own object...
821 my $halfwidth = $self -> get_chromosome
()->get_width() / 2;
822 my $label = $self->get_label();
824 my $y = $label->get_vertical_offset();
825 my $circle_color = $image -> colorResolve
($self->{mark_color
}[0], $self->{mark_color
}[1], $self->{mark_color
}[2]);
827 if ($self->get_show_mark()) {
828 if ($self->get_label_side() eq "left") {
830 # draw the mark for the left labels
832 my $circle_color = $image -> colorResolve
($self->get_mark_color());
834 $x = $self->get_chromosome()->get_horizontal_offset()-$label->get_label_spacer()-$label->get_width()-$self->get_mark_size();
836 $self->set_mark_rect($x, $y, $x+$self->get_mark_size(), $y+$self->get_mark_size());
838 elsif ($self->get_label_side() eq "right") {
839 $x = $self->get_chromosome()->get_horizontal_offset()+$label->get_label_spacer()+$self->get_label_width()+$self->get_mark_size();
841 $self->set_mark_rect($x, $y, $x+$self->get_mark_size(), $y+$self->get_mark_size());
843 for (my $i=1; $i<=$self->get_mark_size(); $i++) {
844 $image -> arc
($x,$y, $i, $i, 0, 360, $circle_color);
849 =head2 accessors get_offset(), set_offset()
851 Returns the offset of the marker in map units (by default cM).
857 return $self->{offset
};
862 $self->{offset
}=shift;
865 =head2 functions get_north_range(), set_north_range
867 Synopsis: $m->set_north_range(5)
868 Args/returns: a range in cM that describes the uncertainty
869 of the marker\'s location
870 Side effects: the label is drawn reflecting the uncertainty.
875 sub get_north_range
{
877 return $self->{north_range
};
880 sub set_north_range
{
882 $self->{north_range
}=shift;
885 =head2 functions get_south_range(), set_south_range()
887 Synopsis: $m->set_south_range(4)
888 Description: see set_north_range()
892 sub get_south_range
{
894 return $self->{south_range
};
897 sub set_south_range
{
899 $self->{south_range
}=shift;
903 =head2 set_range_coords
905 Usage: $m->set_range_coords($start, $end)
906 Desc: for markers that require a range, sets
907 the feature start to $start and end to $end,
908 calling set_offset(), set_north_range(), and
909 set_south_range() with the appropriate values.
911 Args: start [int], end [int]
917 sub set_range_coords
{
921 $self->set_offset(($start + $end )/2);
922 $self->set_north_range(($end - $start)/2);
923 $self->set_south_range(($end-$start)/2);
929 Usage: my $s = $m->get_start();
930 Desc: accessor for the start coord of the marker.
931 no corresponding setter. Use set_range_coords().
941 return $self->get_offset()-$self->get_north_range();
946 Usage: my $e = $m->get_end();
947 Desc: accessor for the end coord of the marker.
948 Ret: no corresponding setter. Use set_range_coords().
957 return $self->get_offset()+$self->get_south_range();
960 =head2 accessors get_orientation, set_orientation
962 Usage: $m->set_orientation("F");
964 Property the orientation of the feature, either "F" or "R".
970 sub get_orientation
{
975 if (!exists($self->{orientation
})) {
976 $self->{orientation
} = "F";
978 return $self->{orientation
};
981 sub set_orientation
{
983 my $orientation = shift;
984 if ($orientation !~ /F|R/i) {
985 die "Orientation has to be either F or R!";
987 $self->{orientation
} = uc($orientation);
991 =head2 functions get_label_side(), set_label_side()
994 Args/Returns: either "right" or "left"
995 Side effects: labels are drawn on the right of the
996 chromosome object if this equals "right", on
997 the left if equal to "left".
1002 sub get_label_side
{
1004 if (!exists($self->{label_side
})) {
1005 return $self->get_chromosome()->get_label_side();
1007 return $self->{label_side
};
1010 sub set_label_side
{
1013 $self->{label_side
}=$side;
1016 =head2 function get_offset_label()
1026 sub get_offset_label
{
1028 return $self->{offset_label
};
1031 =head2 function set_offset_label()
1041 sub set_offset_label
{
1043 $self->{offset_label
}=shift;
1046 =head2 function show_offset_label()
1056 sub show_offset_label
{
1059 if ($show != undef) {
1060 my $self->{show_offset_label
}=$show;
1063 return $self->{show_offset_label
};
1067 =head2 function get_show_tick
1079 return $self->{show_tick
};
1082 =head2 function set_show_tick
1094 $self->{show_tick
}=shift;
1097 =head2 functions set_url(), get_url()
1099 sets the url that this marker links to.
1105 $self->get_label()->set_url(shift);
1110 return $self->get_label()->get_url();
1113 =head2 accessors set_tooltip, get_tooltip
1126 if (!exists($self->{tooltip
}) || !defined($self->{tooltip
})) {
1127 $self->{tooltip
} = '';
1129 return $self->{tooltip
};
1134 $self->{tooltip
}=shift;
1139 =head2 function hilite()
1141 Hilites the marker in the hilite color (default is yellow).
1147 $self->get_label()->set_hilited(1);
1152 $self->get_label()->set_hilited(0);
1157 return $self->get_label()->get_hilited();
1162 =head2 functions get_label_height()
1164 Synopsis: gets the height of the label.
1165 note: the height can\'t be set because
1166 it depends on the font size.
1175 sub get_label_height
{
1177 return $self ->get_label()->get_font()->height();
1180 =head2 function get_label_width()
1182 Synopsis: gets the width of the label.
1183 note - the width can\'t be set because
1184 it depends on the text in the label
1185 and the current font size.
1194 sub get_label_width
{
1196 return $self->get_label()->get_width();
1199 =head2 functions set_label_pos(), get_label_pos()
1212 # sets the position of the label in pixels.
1215 my $vertical_position = shift;
1216 # $self -> {label_position} = $vertical_position;
1217 $self->get_label()->set_vertical_offset($vertical_position);
1222 #return $self->{label_position};
1223 return $self->get_label()->get_vertical_offset();
1226 =head2 functions set_label_spacer(), get_label_spacer()
1228 Synopsis: Accessors for the label_spacer property, which
1229 represents the number of pixels from the edge of the
1230 label to the mid-line of the chromosome.
1239 sub set_label_spacer
{
1241 my $label_spacer = shift;
1242 $self->get_label()->set_label_spacer($label_spacer);
1245 sub get_label_spacer
{
1248 return $self->get_label()->get_label_spacer();
1251 =head2 function get_label_line_color()
1261 sub get_label_line_color
{
1263 return $self->get_label()->get_line_color();
1266 =head2 function set_label_line_color()
1276 sub set_label_line_color
{
1278 $self->get_label()->set_line_color(@_);
1281 =head2 function get_hilite_color()
1283 Gets the hilite color. Returns the RGB components of the color
1284 as a list of three elements.
1288 sub get_hilite_color
{
1290 # if (!exists($self->{hilite_color})) { @{$self->{hilite_color}}=(); }
1291 # return @{$self->{hilite_color}};
1292 return $self->get_label()->get_hilite_color();
1295 =head2 function set_hilite_color()
1297 Sets the hilite color. Default is yellow. Three numbers between 0 and 255 for red, green and blue channels are required.
1301 sub set_hilite_color
{
1303 $self->get_label()->set_hilite_color(@_);
1306 =head2 function get_offset_text_color()
1308 Gets the current offset text color (the color of the line
1309 that connects the marker tick with the marker name).
1313 sub get_offset_text_color
{
1315 #if (!exists($self->{offset_text_color})) { @{$self->{offset_text_color}}=(); }
1316 return $self->get_offset_label()->get_text_color();
1317 #return @{$self->{offset_text_color}};
1320 =head2 function set_offset_text_color()
1322 Sets the color of the offset scale text, if enabled.
1326 sub set_offset_text_color
{
1328 $self->get_offset_label()->set_text_color(@_);
1331 =head2 function get_text_color()
1333 gets the color of the label text.
1338 sub get_text_color
{
1340 return $self->get_label()->get_text_color();
1343 =head2 function set_text_color()
1345 sets the color of the label text.
1349 sub set_text_color
{
1351 $self->get_label()->set_text_color(@_);
1355 =head2 accessors get_order_in_loc(), set_order_in_loc()
1357 Synopsis: I think this is deprecated...
1365 sub get_order_in_loc
{
1367 return $self->{order_in_loc
};
1370 sub set_order_in_loc
{
1372 $self->{order_in_loc
}=shift;
1376 =head2 functions get_location_subscript(), set_location_subscript()
1378 Synopsis: sets the location subscript of this marker position
1379 Arguments: setter: a subscript, usually "a".."c" or similar
1380 Returns: getter: the current subscript
1381 Side effects: the subscript will be rendered on the map,
1382 added to the marker name. The CXGN::Cview::Marker function
1383 get_name() will also include the subscript, whereas
1384 get_marker_name() will not.
1389 sub get_location_subscript
{
1391 return $self->{location_subscript
};
1394 sub set_location_subscript
{
1396 $self->{location_subscript
}=shift;
1399 =head2 accessors get_loc_type(), set_loc_type()
1411 return $self->{loc_type
};
1416 $self->{loc_type
}=shift;
1419 =head2 accessors get_loc_order(), set_loc_order()
1421 Synopsis: I think this is deprecated.
1431 return $self->{loc_order
};
1436 $self->{loc_order
}=shift;
1441 Usage: my $flag = $m->has_range()
1442 Desc: returns true if the marker has a range defined
1443 (usually using set_north_range() and set_south_range())
1452 if ( ($self->get_end() - $self->get_start()) > 12) { return 1;}