2 # Lukas Mueller, July 2004.
9 Cview.pm - objects for the SGN chromosome viewer
13 my $map_image = CXGN::Cview::MapImage -> new($dbh, 500, 600);
15 my $map = CXGN::Cview::MapFactory->new($dbh, { map_version_id=>55 });
16 my $chr1 = $map->get_chromosome($chr_nr);
17 $chr1->set_vertical_offset(50);
18 $chr1->set_horizontal_offset(100);
19 $chr1->set_height(300);
20 $chr1->set_labels_left();
21 $chr1->set_display_marker_offset();
22 $chr1->set_hilite(50, 100);
24 my @m1 = $chr1->get_markers();
26 for (my $i=0; $i<@m1; $i++) {
29 $m1[$i]->hide_label();
31 $m1[$i]->hilite(); $m1[$i]->show_label();
37 my $ruler = CXGN::Cview::Ruler -> new (200, 20, 550, 0, $chr1->get_chromosome_length());
38 $ruler -> set_labels_right();
39 $map -> add_ruler($ruler);
41 # adding a physical map
43 # (same as adding any chromosome, but specify an id for a physical map)
48 $map_image -> render_jpg();
52 Lukas Mueller (lam87@cornell.edu)
56 The Cview package defines several objects:
62 A C<MapImage> object that is like a canvas to draw other objects on
66 A C<CXGN::Chromosome> object that contains chromosome information, such as markers and links between chromosomes
70 A C<CXGN::Marker> object that contains the marker information
74 A C<CXGN::ChrLink> object that stores information about markers that are linked on different chromosomes
78 A C<CXGN::Ruler> object that draws a ruler
82 A C<CXGN::Chromosome::Physical> object, which inherits from chromosome and draws a physical map.
86 A C<CXGN::Chromosome::IL> object, which inherits from chromosome, and draws an IL map.
90 These objects can be placed on the MapImage at will and know how to render themselves using the render() function.
94 Copyright (c) 2002-2006 Sol Genomics Network and Cornell University.
96 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
98 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
100 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.