Bio-NEXUS
view release on metacpan or search on metacpan
lib/Bio/NEXUS/Tools/NexPlotter.pm view on Meta::CPAN
my $x2 = int( $x1 + $treeNodeRadius );
my $y2 = int( $y1 + $treeNodeRadius );
if ( not $ppp_param ) {
&__draw_circle($my_data,$x1, $y1,$treeNodeRadius,$color) if (!$node->is_otu);
}
$my_data->set_tree_map_coord( $node->get_name, [$x1,$y1,$x2,$y2] ) if $runtime_options->{'output_type'} eq 'png';
if ($node->{name} ne "root") {
#$query->delete("session") if ($runtime_options->{'session'});
$node->_set_xcoord($x1);
$node->_set_ycoord($y1);
#$areaMap .= qq(<area shape=rect onMouseOver="showtip(this,event,'$node->{name} options $prob_val')" onMouseOut="PopUpMenu2_Hide();" coords=$x1,$y1,$x2,$y2 href="javascript:PopUpMenu2_Set(getParam(\'$qs\',\'$node->{name}\',\'$file_param\',\'$colorn...
}
else {
#$areaMap .= qq(<area shape=rect onMouseOver="showtip(this,event,'Root node options $prob_val')" onMouseOut="PopUpMenu2_Hide();" coords=$x1,$y1,$x2,$y2 href="javascript:PopUpMenu2_Set(getParamRoot(\'$qs\',\'$node->{name}\',\'$file_param\',\'$colorn...
}
if (not $node->is_otu) {
my @nodes = @{$node->get_children()};
foreach my $child (@nodes) {
&__print_tree($my_data,$child, $x1, $y1,$otuseqs);
}
}
}
sub __print_matrix {
lib/Bio/NEXUS/Tools/NexPlotter.pm view on Meta::CPAN
$x2 -= $nexusG->get_fontWidth;
&__draw_line($my_data,$x1,$y1,$x2,$y1,'gray',1) if (($x1 < $x2) && ($runtime_options->{'show_content'} ne 'Data only'));
} else {
$x1 = $x;
$x2 = $nexusG->get_characterStartXpos - $nexusG->get_labelMatrixGapWidth;
$y1 = $y;
#$y2 = $y-( $nexusG->get_fontHeight/2);
$y2 = $y;
&__draw_text($my_data,$x1,$y2,$taxon_name,$color);
$my_data->set_label_map_coord( $taxon_name, [$x1,$y2,$x1+length($taxon_name)*$nexusG->get_fontWidth,$y2+$nexusG->get_fontHeight] ) if $runtime_options->{'output_type'} eq 'png';
#$areaMap.= sprintf "<area shape=rect onMouseOver=\"showtip(this,event,\'$tip\')\" onMouseOut=\"PopUpMenu2_Hide();\" coords=%d,%d,%d,%d href=\"javascript:PopUpMenu2_Set(getParam2(\'$qs\',\'%s\',\'$file_param\',\'$dir_param\',\'$highlight_params[$#h...
$x1 += length($taxon_name) * $nexusG->get_fontWidth + $nexusG->get_fontWidth;
&__draw_line($my_data,$x1,$y1,$x2,$y1,'gray',1) if (($x1 < $x2) && ($runtime_options->{'show_content'} ne 'Tree only') && $my_data->get_char_column_labels);
}
}
sub __print_sequence() {
my ($my_data, $x, $y, $sequence, $taxName, $color) = @_;
my $block = $my_data->get_selected_char_block;
$color = ( defined($color) ? $color : 'black' );
my $data_type = $block->get_format()->{'datatype'} if ($block->get_format());
lib/Bio/NEXUS/Tools/NexPlotter.pm view on Meta::CPAN
}
$label =~ s/\|/-/;
$label =~ s/\s//g;
&__print_intron_history($my_data,$x,$y,$label,$color,@columnLabelsAll) if ( (lc $runtime_options->{'character_data_type'}) eq 'intron') && ($nexusObject->get_block('history','intron'));
}
sub __print_intron_history {
my ($my_data, $x, $y, $label,$color,@columnLabelsAll) = @_;
&__draw_text($my_data,$x,$y,'H','blue');
$my_data->set_intron_map_coord($label,[$x,$y,$x+$nexusG->get_fontWidth,$y+$nexusG->get_fontHeight]) if $runtime_options->{'output_type'} eq 'png';
#$labelAreaMap .=sprintf "<area shape=\"rect\" onMouseOver=\"showtip(this,event,'Intron history options for $label')\" onMouseOut=\"PopUpMenu2_Hide();\" coords=%d,%d,%d,%d href=\"javascript:PopUpMenu2_Set(getParam3(\'$qs\',\'$charnum\'),'','','','','...
}
sub __plot_wts {
my ($my_data, @weights) = @_;
my $blank = 0;
my $is_weights;
for (my $i = 0; $i <= $#weights; $i++) {
my $height = $weights[$i] * $nexusG->get_histogramHeight ;
if ( $i && ($i % ($nexusG->get_charLabelBlockWidth)) == 0 ) { # char #11, #21, etc.
$blank += $nexusG->get_fontWidth;
( run in 0.529 second using v1.01-cache-2.11-cpan-49f99fa48dc )