我正在尝试使用收到此消息的as_text
方法:
我正在使用此处的示例Bio::Tree::Tree
can't locate object method as_text via package Bio::Tree::Tree
请注意,我在同一个包中尝试了其他方法,它们工作正常。
my $input = new Bio::TreeIO(-file => "bintree.nw",
-format => "newick");
my $tree = $input->next_tree;
my $tree_as_string = $tree->as_text($format);
print $tree_as_string;
给出这个print Dumper($input)
结果:
$VAR1 = bless( {
'_bootstrap_style' => 'traditional',
'_handler' => bless( {
'_treelevel' => 0,
'_currentnodes' => [],
'_lastitem' => {
'tree' => 0,
'current' => [],
'id' => 0,
'node' => 0,
'leaf' => 0
},
'nodetype' => 'Bio::Tree::Node',
'_root_verbose' => 0,
'treetype' => 'Bio::Tree::Tree',
'_currentitems' => [],
'_nodect' => [
undef,
2,
0,
0,
0,
0,
0,
0,
0
]
}, 'Bio::TreeIO::TreeEventBuilder' ),
'_file' => 'bintree.nw',
'newline_each_node' => undef,
'internal_node_id' => 'id',
'_root_cleanup_methods' => [
sub { "DUMMY" }
],
'_flush_on_write' => 1,
'_filehandle' => \*Symbol::GEN0,
'_root_verbose' => 0,
'_print_tree_count' => 0
}, 'Bio::TreeIO::newick' );
这里是Print Dumper ($tree)
有错误吗?或者这是一个错误?提前致谢