Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 about the Monastery: (14)
As of 2015-07-07 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls