[Bioperl-l] phylogeny-trait association methods into BioPerl
miraceti
miraceti at gmail.com
Wed Oct 8 19:05:38 UTC 2008
Hi, thanks for introducing this into bioperl,
I was having a hard time trying to figure out how to use mesquite on many
many trees automatically.
Now I can use bioperl instead.
I was testing the ps() function with some discrete character states,
and I noticed the ancestor states are different from what I would get by
hand.
I think it's because of this line
map {$node->set_tag_value('ps_trait', $_)} keys %union;
it replaces the trait values every time it does map,
instead of storing all possible values.
Could you look into this?
thanks
Mira Han
On Fri, Sep 19, 2008 at 12:22 PM, Heikki Lehvaslaiho <heikki at sanbi.ac.za>wrote:
> The code is now in SVN. Bio::Tree::TreeFunctionsI::add_trait() can be used
> to
> set trait values in a tree.
>
> Enjoy,
>
> -Heikki
>
> On Wednesday 10 September 2008 13:32:06 Heikki Lehvaslaiho wrote:
> > FYI,
> >
> > I've been recently writing code to analyse phylogeny-trait associations.
> > These traits are typically geographical location of the sequence but they
> > can be any phenotypic characters associated with the sequences.
> >
> > This involves trees, i.e. Bio::Tree::Tree and Bio::Tree::Node objects and
> > strings describing the traits. I've been using tags to store trait values
> > within nodes. The tag methods are:
> >
> > Bio::Tree::Node::add_tag_value
> > Bio::Tree::Node::get_all_tags
> > Bio::Tree::Node::get_tag_values
> > Bio::Tree::Node::has_tag
> > Bio::Tree::Node::remove_all_tags
> > Bio::Tree::Node::remove_tag
> >
> > Question: Is there any particular reason why there is no
> > set_tag_value(scalar|@array) method?
> >
> > I am getting tired of writing:
> > $node->remove_tag($key);
> > map {$node->add_tag_value($key)} @values ;
> > so I am going to implement that unless there is are strong objections.
> >
> > Otherwise it has been smooth sailing. I am going to add
> > Bio::Tree::TreeFunctions::is_binary() and start populating
> > Bio::Tree::Statistics soon with these methods:
> >
> > ps() - Parsimony Score (PS) from Fitch 1971
> > ai() - Association index (AI) of Whang et al. 2001
> > mc() - Monophyletic Clade (MC) size statistics by Salemi at al. 2005
> > cherries() - number of leaf node pairs
> >
> > If you have any comments, please feel free to post them here.
> >
> > -Heikki
>
> --
> ______ _/ _/_____________________________________________________
> _/ _/
> _/ _/ _/ Heikki Lehvaslaiho heikki at_sanbi _ac _za
> _/_/_/_/_/ Senior Scientist skype: heikki_lehvaslaiho
> _/ _/ _/ SANBI, South African National Bioinformatics Institute
> _/ _/ _/ University of Western Cape, South Africa
> _/ Phone: +27 21 959 2096 FAX: +27 21 959 2512
> ___ _/_/_/_/_/________________________________________________________
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list