Hi Lucas,
DendroPy is designed to do precisely that, i.e., "focus on the statistic
part, not on the part of actually reading and writing the data files,
worrying about the data structures to use for trees etc.".
However, for the task you describe, you will need to manipulate the
alignments themselves, and while the tree data structures and operations
of DendroPy are pretty sophisticated, the character alignment
manipulation aspects are pretty primitive. In particular, column-based
operations are possible, but pretty clunky.
I would suggest that you consider your task a two part operation.
(1) Alignment
(2) Tree building.
For (1), I suggest that you read the data using native DendroPy methods,
convert the sequences to a list of lists, and align that:
~~~
d1 = dendropy.DnaCharacterMatrix.get(
path="data.dat", schema="phylip")
seqs = [s.symbols_as_list() for s in d1]
...
[align``seqs`` and save to file]
~~~
For (2), you would then using DendroPy's tree infrastructure to build a
tree:
http://dendropy.org/primer/trees.html#building-a-tree-programmatically
I've been meaning to add an NJ routine in DendroPy for a while now.
Probably will not get around to it till after August some time ...
> --
> You received this message because you are subscribed to the Google
> Groups "DendroPy Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
dendropy-user...@googlegroups.com
> <mailto:
dendropy-user...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
--------------------------------------
Jeet Sukumaran
--------------------------------------
jeetsu...@gmail.com
--------------------------------------
Blog/Personal Pages:
http://jeetworks.org/
GitHub Repositories:
http://github.com/jeetsukumaran
Photographs (as stream):
http://www.flickr.com/photos/jeetsukumaran/
Photographs (by galleries):
http://www.flickr.com/photos/jeetsukumaran/sets/
--------------------------------------