4 package CXGN
::Cview
::Chromosome
::Scaffold
;
6 use base
"CXGN::Cview::Chromosome";
8 our $INTER_SCAFFOLD_DISTANCE = 100_000
;
14 my $marker_link = shift;
16 my $self = $class-> SUPER
::new
($chr_nr);
18 $self->{marker_link
} = $marker_link;
20 open (my $F, "<$file") || die "Can't find file $file.";
22 my $current_offset = 0;
27 my ($scaffold, $length, $c, $cM) = split /\t/;
29 if ($c != $chr_nr) { next(); }
31 my $m = CXGN
::Cview
::Marker
::RangeMarker
->new($self);
33 $current_offset += $INTER_SCAFFOLD_DISTANCE;
35 $m->get_label()->set_name($scaffold);
36 $m->set_marker_name($scaffold);
37 $m->get_label()->set_url(&{$self->{marker_link
}}($scaffold));
38 $m->set_offset($current_offset + ($length/2));
39 $m->set_north_range($length/2);
40 $m->set_south_range($length/2);
41 $self->add_marker($m);
42 $current_offset += $length;
46 $self->sort_markers();
47 $self->set_length($current_offset);
48 #$chr->set_url($self->{url});
49 $self->distribute_labels();
50 $self->distribute_label_stacking();
51 $self->set_units("bp");
52 $self->get_ruler()->set_units("bp");