[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.1, Wed Feb 2 21:01:07 2005 UTC revision 1.2, Wed Feb 2 22:08:56 2005 UTC
# Line 157  Line 157 
157   print OUT $self->{'svg'}->xmlify;   print OUT $self->{'svg'}->xmlify;
158   close OUT;   close OUT;
159    
160   print STDERR "The image should be width: ", $self->{'width'}, " height: ",   my $height=(1 + $self->{'rowcount'}) * (((scalar (keys %{$self->{'trackposn'}})) * $self->{'box_height'}* 3) + $self->{'top_marg'}+ $self->{'box_height'}), "\n";
161          $self->{'rowcount'} * (((scalar (keys %{$self->{'trackposn'}})) * $self->{'box_height'}* 3) + $self->{'top_marg'}+ $self->{'box_height'}), "\n";  
162     print STDERR "The image should be width: ", $self->{'width'}, " height: $height\n";
163    
164     print STDERR "Image is in $file\n";
165   print STDERR "Processing took ", time-$^T, " seconds\n";   print STDERR "Processing took ", time-$^T, " seconds\n";
166     return ($self->{'width'}, $height);
167  }  }
168    
169    
# Line 195  Line 199 
199    
200   An internal method to figure out how long the whole genome is and use this as the baseline for the image   An internal method to figure out how long the whole genome is and use this as the baseline for the image
201    
202   We have somethinglike this for 3 contigs ccc and gaps mmm:   We have somethinglike this for 3 contigs ccc and margins mmm:
203   Row1   mmm ccccccccccc mmm   Row1   mmm ccccccccccc mmm
204   Row2   mmm ccc mmm ccc mmm   Row2   mmm ccc mmm ccc mmm
205   Row3   mmm ccccccccccc mmm   Row3   mmm ccccccccccc mmm
# Line 230  Line 234 
234    foreach my $contig (sort {$fig->contig_ln($self->{'genome'}, $b) <=> $fig->contig_ln($self->{'genome'}, $a)} keys %len) {    foreach my $contig (sort {$fig->contig_ln($self->{'genome'}, $b) <=> $fig->contig_ln($self->{'genome'}, $a)} keys %len) {
235     $self->{'xoffset'}->{$contig}=$self->{'margin'}+$offset;     $self->{'xoffset'}->{$contig}=$self->{'margin'}+$offset;
236    
237   print STDERR "For contig $contig, length is $len{$contig} and start is ", $self->{'xoffset'}->{$contig};   #print STDERR "For contig $contig, length is $len{$contig} and start is ", $self->{'xoffset'}->{$contig};
238   print STDERR " and end will be ", $self->{'xoffset'}->{$contig} + $self->{'margin'} + (($len{$contig}/$self->{'totallen'}) * $self->{'xmultiplier'}), "\n";   #print STDERR " and end will be ", $self->{'xoffset'}->{$contig} + $self->{'margin'} + (($len{$contig}/$self->{'totallen'}) * $self->{'xmultiplier'}), "\n";
239    
240     ### Added rowinfo, but not sure about this     ### Added rowinfo, but not sure about this
241     push (@{$self->{'contigrows'}->{$contig}}, $self->{'rowcount'});     push (@{$self->{'contigrows'}->{$contig}}, $self->{'rowcount'});
# Line 269  Line 273 
273    my $transform=$row * (((scalar keys %{$self->{'trackposn'}}) * $self->{'box_height'} * 3) + $self->{'top_marg'} + $self->{'bot_marg'});    my $transform=$row * (((scalar keys %{$self->{'trackposn'}}) * $self->{'box_height'} * 3) + $self->{'top_marg'} + $self->{'bot_marg'});
274    my $xtrans=$absorow->{$row}->{'start'} - $self->{'margin'};    my $xtrans=$absorow->{$row}->{'start'} - $self->{'margin'};
275    $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)");
276    
277      print STDERR "For row $row transform is translate(-$xtrans, $transform)\n";
278    # add genome labels to the rows    # add genome labels to the rows
279    foreach my $simgen (keys %{$self->{'trackposn'}}) {    foreach my $simgen (keys %{$self->{'trackposn'}}) {
280     $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",

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3