Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Splice Function for Bioperl Tree editing

by Khen1950fx (Canon)
on Apr 11, 2013 at 08:06 UTC ( #1028087=note: print w/ replies, xml ) Need Help??

in reply to Splice Function for Bioperl Tree editing

You were close. Try this very simplified example to get rid of the warnings:

#!/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);

Comment on Re: Splice Function for Bioperl Tree editing
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028087]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2015-03-31 07:06 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (660 votes), past polls