Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-09-21 23:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (176 votes), past polls