[Bioperl-l] nexus add_tree, get_trees, write tree in write_aln

Chris Fields cjfields at uiuc.edu
Thu Nov 9 10:28:45 EST 2006


On Nov 9, 2006, at 8:13 AM, Chris Fields wrote:

> On Nov 9, 2006, at 7:55 AM, Nathan Haigh wrote:
>
>> Albert Vilella wrote:
>>> Hi,
>>>
>>> I am musing on how to add trees to the AlignIO::Nexus objects.
>>>
>>> In PAML we have this "add_tree" method, and "get_rst_trees",  
>>> which we
>>> could also apply to this case.
>>>
>>> I also would like to hear some feedback on how to write_aln nexus
>>> files that contain one or more trees in the object instance. Do we
>>> want this by default? Only if a "with_trees" parameter is set?
>>>
>>> Cheers,
>>>
>>>     Albert.
>>> _______________________________________________
>>> Bioperl-l mailing list
>>> Bioperl-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>
>> Hi Albert,
>>
>> I don't know if you are aware of this resource, so here it is:
>> http://search.cpan.org/search?query=bio%3A%3Anexus&mode=all
>>
>> I would suggest that if there are trees in the object instance, then
>> write_aln should print them by default and then have a "no_trees"
>> option.
>>
>> Nath
>
> Another option is to store them in the SimpleAlign object as a queue
> of Tree objects.  Stockholm format allows trees in the annotation
> section, so it makes sense that if some alignments contain this data
> then we should have a way of parsing and storing it, as long as we
> read/write support the particular tree format.

....

Forgot to mention the option of using a builder object, analogous to  
the one used for Bio::SeqIO::genbank (Bio::Seq::SeqBuilder); this  
would be similar to Nathan's suggestion but would tell the parser  
what data you want parsed (alignment annotation, tree data,  
sequences, accession/id, etc) based on 'slots' and particular  
conditions, and therefore determines what data is stored in  
SimpleAlign objects.  I planned on setting one up for  
Bio::AlignIO::stockholm in the near future for optional annotation  
parsing, but tree parsing could be included as well.  Were you  
thinking of something along those lines?

Chris

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list