Bio-Graphics
view release on metacpan or search on metacpan
lib/Bio/Graphics/Pictogram.pm view on Meta::CPAN
}
else {
$y_trans += $prev_size;
}
$pos_group->text('id'=> uc($letter->[0]).$bp,height=>$height,
'width'=>$width,x=>$x,y=>$size,
'transform'=>"translate(0,$y_trans),scale(1,$scale)",
'style'=>{"font-size"=>$fontsize,
'text-anchor'=>'middle',
'font-family'=>'Verdana',
'fill'=>$color->{uc $letter->[0]}})->cdata(uc $letter->[0]) if $scale > 0;
$prev_size = $scale * $size;
$count++;
}
#plot the bit if required
if($self->plot_bits){
$seq_grp->text('x'=>$x,
'y'=>$bit_y,
'style'=>{"font-size"=>'10',
'text-anchor'=>'middle',
'font-family'=>'Verdana',
'fill'=>'black'})->cdata($bits);
}
$bp++;
$x+=$width;
}
#plot the tags
$seq_grp->text(x=>int($width/2),y=>$bit_y,style=>{"font-size"=>'10','text-anchor'=>'middle','font-family'=>'Verdana','fill'=>'black'})->cdata("Bits:") if $self->plot_bits;
$seq_grp->text(x=>int($width/2),y=>$pos_y,style=>{"font-size"=>'10','text-anchor'=>'middle','font-family'=>'Verdana','fill'=>'black'})->cdata("Position:");
#plot the base positions
$x = 45+$size/2-int($width/2);
foreach my $nbr(1..($bp-1)){
$seq_grp->text(x=>$x+int($width/2),y=>$pos_y,style=>{"font-size"=>'10','text-anchor'=>'left','font-family'=>'Verdana','fill'=>'black'})->cdata($nbr);
$x+=$width;
}
# $seq_grp->transform("scale(2,2)");
return $self->svg_obj($svg);
}
sub _make_pwm_from_site_matrix{
( run in 0.356 second using v1.01-cache-2.11-cpan-454fe037f31 )