phyx
phyx copied to clipboard
pxltr should preserve annotations if present
pxltr
works well, but if the input is an annotated Nexus tree, the newick output does not include the annotations.
Rethinking this one. Are Nexus annotations newick-compliant? Don't think so. Forget how this got brought up.
(If someone remembers, let me know! :bowtie:)
@josephwb do you have an example with this? I can help tackle this but not exactly sure I understand it.
This so old I forget! Also, must be pxrlt
?
But I think the situation was this: you have, say, a BEAST tree with ugly labels. You use pxrlt
to clean them up, but because a newick comes out all of your fancy Nexus node annotations (probabilities, rates, whatever) are lost, so when you open your tree in FigTree you cannot make it pretty.
But I guess this would be a an issue for most programs. Maybe a general solution is to have have Nexus as a possible output option? I am currently doing that for pxcltr
.
I can look at this.
Just curious if there are any updates on this?
I would also like this functionality, but don't know if @josephwb had already assigned it to himself. @josephwb are you doing this?
I am not currently working on this. Basically, we need a general Nexus tree writer that preserves the annotations. This should be made as an available output option for pxrlt
and pxrmt
and pxrr
(maybe others?).
I would be interested in this if it does ever come up again. I have an annotated Nexus treefile from pxcontrates
in which I would like to preserve the ancestral state reconstruction values, but of course running it through pxrlt
got rid of them. I know for now that the thing to do is use pxrlt
on the starting tree that I run through pxcontrates
but I could foresee more general needs for this, like with BEAST output as stated above.
@sbrobeson Thanks for pinging this issue. I agree it would be of use. I am working on several other issues, so if anyone else wants to run with this, that would be great. Otherwise, I can come around to this at some point.