Get rid of some warnings in CXGN::Cview::Chromosome::Vector
[cview.git] / lib / CXGN / Cview / Marker / FISHMarker.pm
blob13492dfeed404ffa710bb2b976964f6056126b1a
2 =head1 NAME
4 CXGN::Cview::Marker::FISHMarker - a class for drawing fished BACs.
6 =head1 DESCRIPTION
8 Inherits from L<CXGN::Cview::Marker>. Deals with displaying FISH markers on the pachytene chromosomes. Work pretty much like other marker objects, the main difference being how the offset is being represented: The unit is percent, not cM, and the distances are measured from the centromere. On the short arm (top arm), the percent values are given as negative values, on the long (bottom) arm, the values are positive.
10 =head1 SEE ALSO
12 See also the documentation in L<CXGN::Cview>.
14 =head1 AUTHOR(S)
16 Lukas Mueller (lam87@cornell.edu)
18 =head1 FUNCTIONS
21 =cut
25 use strict;
26 use CXGN::Cview::Marker;
28 package CXGN::Cview::Marker::FISHMarker;
30 use base qw( CXGN::Cview::Marker );
32 sub new {
33 my $class = shift;
34 my $self = $class -> SUPER::new(@_);
35 return $self;
38 =head2 function set_offset()
40 Sets the offset in percent. Legal range -100 .. +100. Negative offset is drawn on the short arm,
41 positive offset is drawn on the long arm.
43 =cut
45 sub set_offset {
46 my $self = shift;
47 my $offset = shift;
48 if (abs($offset)>100) {
49 warn "CXGN::Cview::Marker::FISH_marker::set_offset: warning, abs(offset) [$offset] > 100\n";
51 $self->SUPER::set_offset($offset);
54 # always return a constant color, such as light green, for the FISH marker colors.
55 # and for the label... So we override some marker functions here.
57 sub get_color {
58 my $self = shift;
59 return (255,50,50);
62 sub get_label_line_color {
63 my $self = shift;
64 return (50, 50, 150);
67 sub get_text_color {
68 my $self = shift;
69 return (50, 50, 150);