[Bio] / FigKernelPackages / raedraw.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/raedraw.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Thu Feb 3 20:43:02 2005 UTC revision 1.5, Fri Feb 4 00:38:17 2005 UTC
# Line 96  Line 96 
96   $self->{'maxn'}        =50     unless (defined $self->{'maxn'});   $self->{'maxn'}        =50     unless (defined $self->{'maxn'});
97   $self->{'maxp'}        =1e-5   unless (defined $self->{'maxp'});   $self->{'maxp'}        =1e-5   unless (defined $self->{'maxp'});
98    
99    
100   # each genome gets 3 box heights, and we have 2 top/bottom margins   # each genome gets 3 box heights, and we have 2 top/bottom margins
101   # we also need to add room for the target genome track.   # we also need to add room for the target genome track.
102   $self->{'height'}=(3 * $self->{'box_height'}* (scalar @{$self->compareto()} +1)) + ($self->{'top_marg'} + $self->{'bot_marg'});   $self->{'height'}=(3 * $self->{'box_height'}* (scalar @{$self->compareto()} +1)) + ($self->{'top_marg'} + $self->{'bot_marg'});
# Line 298  Line 299 
299    my $xtrans=$absorow->{$row}->{'start'} - $self->{'margin'};    my $xtrans=$absorow->{$row}->{'start'} - $self->{'margin'};
300    $self->{'rowgroup'}->{$row}=$self->{'svg'}->group(id=>"row_$row", transform=>"translate(-$xtrans, $transform)");    $self->{'rowgroup'}->{$row}=$self->{'svg'}->group(id=>"row_$row", transform=>"translate(-$xtrans, $transform)");
301    
   print STDERR "For row $row transform is translate(-$xtrans, $transform)\n";  
302    # add genome labels to the rows    # add genome labels to the rows
303    foreach my $simgen (keys %{$self->{'trackposn'}}) {    foreach my $simgen (keys %{$self->{'trackposn'}}) {
304     $self->{'rowgroup'}->{$row}->text(id=>"${simgen}_${row}_label", x=>$xtrans, y=>$self->{'trackposn'}->{$simgen}, textLength=>100, lengthAdjust=>"spacingAndGlyphs",     $self->{'rowgroup'}->{$row}->text(id=>"${simgen}_${row}_label", x=>$xtrans, y=>$self->{'trackposn'}->{$simgen}, textLength=>100, lengthAdjust=>"spacingAndGlyphs",
# Line 324  Line 324 
324   foreach my $peg ($fig->pegs_of($self->{'genome'})) {   foreach my $peg ($fig->pegs_of($self->{'genome'})) {
325    $pegcount++;    $pegcount++;
326    last if ($self->{'stopshort'} && $self->{'stopshort'} == $pegcount);    last if ($self->{'stopshort'} && $self->{'stopshort'} == $pegcount);
   
327    # Define the location of the box once per peg    # Define the location of the box once per peg
328    # also use this to figure out which row to add it to    # also use this to figure out which row to add it to
329    my @loc=$fig->feature_location($peg);    my @loc=$fig->feature_location($peg);
# Line 447  Line 446 
446   my @attr = $fig->feature_attributes($peg);   my @attr = $fig->feature_attributes($peg);
447   if (@attr > 0) {   if (@attr > 0) {
448    foreach $_ (@attr) {    foreach $_ (@attr) {
449       next if ($self->{'addedtv'}->{$tv->[1].$peg}); # specifically avoid dups with tag/value pairs
450       $self->{'addedtv'}->{$tv->[1].$peg}=1;
451     my($tag,$val,$url) = @$_;     my($tag,$val,$url) = @$_;
452     next unless ($tag eq $tv->[1]);     next unless (lc($tag) eq lc($tv->[1]));
453    
454     # we are going to test if it is a number. If it is not a number, we don't want to check min/max     # we are going to test if it is a number. If it is not a number, we don't want to check min/max
455     my $number=1;     my $number=1;
# Line 461  Line 462 
462    
463     next if ($number && $min && $val < $min);     next if ($number && $min && $val < $min);
464     next if ($number && $max && $val > $max);     next if ($number && $max && $val > $max);
 print STDERR "Adding a box at $x\n";  
465     # now color the box. We can do this based on the number. We should probably have a scale factor here, but I don't know what it is     # now color the box. We can do this based on the number. We should probably have a scale factor here, but I don't know what it is
466     # so we'll let people supply it.     # so we'll let people supply it.
467     my @color=(0,1,1); # maybe 1,1,1?     my @color=(0,1,1); # maybe 1,1,1?

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3