#!/usr/bin/perl -l use strict; use warnings; use Data::Dumper::Concise; use Bio::TreeIO; use Bio::Tree::TreeFunctionsI; my $usage = "usage: $0 treeFile \n"; my $treeFile = $ARGV[0] or die $usage; my $in = Bio::TreeIO->new( -format => 'newick', -file => $treeFile, ); my $tree = $in->next_tree; my @nodes = $tree->find_node(-id => 'node1'); $tree->splice(-remove_id => [0], -keep_id => [1]); print Dumper( $in ); exit(0);
In reply to Re: Splice Function for Bioperl Tree editing
by Khen1950fx
in thread Splice Function for Bioperl Tree editing
by xela07
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |