[Biopython-dev] Parsing PAML supplementary output
Peter Cock
p.j.a.cock at googlemail.com
Tue Oct 11 11:05:48 UTC 2011
On Tue, Oct 11, 2011 at 11:37 AM, Brandon Invergo <b.invergo at gmail.com> wrote:
>> I would consider that to be a meta file containing a PHYLIP
>> alignment and a tree, but in itself it isn't a PHYLIP alignment.
>>
>> That looks like exactly the kind of issue NEXUS was designed
>> to solve: how to embed alignments, trees and other stuff into
>> a single plain text file for input into a phylogenetic tool.
>>
>> Doesn't PHYLIP have an XML format these days? Trying
>> to parse something like that text (without a formal standard)
>> seems like a painful exercise and long term maintenance
>> headache.
>
> I'm not suggesting that Biopython parse and store the information
> because I agree that it would be an unmaintainable nightmare. To bring
> myself out of the clouds a bit and back to the basics of my original
> intent: if I work on better integrating the PAML module so that the user
> can pass a MultipleSeqAlignment object, I will need a way to write that
> alignment to a file with potentially more information than the default
> PhylipWriter allows. So, just as simple as that, Bio.Phylo.PAML would
> need its own alignment writer....something I'm not going to worry about
> right now.
>
> With this mentality, then yes, anything containing such option flags and
> info is no longer a PHYLIP alignment but is rather an input file to some
> program. As such, the existing PhylipIO module should *not* be modified
> to handle this metadata. Please ignore all my other half-baked ideas.
What you could think about is having the Bio.Phylo.PAML create this
file, and call the existing PhylipIO module with the handle to write the
alignment part - and perhaps the Bio.Phylo module with the handle to
write any tree.
> So, current, phylip-related tasks:
> - implement SequentialPhylipWriter and SequentialPhylipIterator classes
> in PhylipIO
>
> That's it, I think. I'll revisit this alignment-writing stuff at some
> other point. One task at a time...
>
> -brandon
That sounds like a manageable step to start with :)
Peter
More information about the Biopython-dev
mailing list