Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 chilling in the Monastery: (9)
As of 2014-12-26 08:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (168 votes), past polls