This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plot nucleotide (character) changes on phylogenetic tree

Hey,

I have a bunch of SNP-matrices as aligned nucleotide sequences and have no issues in making all kinds of trees out of the alignment. However, I can not find any tool that can plot the actual nucleotide changes (character state changes, mutations) on the branches. I am dreaming of a tool that can take my .fasta (or .phy) alignment, extract the different states at all positions and plot them on a tree in a "[char_nr]: [change from]>[change to]" way (eg: 12: A>C) or similar to that.

I have tried with the most common classic phylo packages (MEGA7, PAUP4, Mesquite) and also with ETE 3 (python), but all without success (I can get a list of changes and the changes for a single character in PAUP and MEGA, but I am not able to get the information on one tree). MacClade should be able to do that, but I have no access to a PowerPC-Mac which could run the old code. And WinClada, besides that I don't like spending $50 for trying something, has their servers down at the moment, so no access.

Does anybody have experience with that and can help me out? Thank you so much in advance!

Best

Raphi

snp phylogeny tree

do you have an example image? I'm not sure I understand the type of plot that you have in mind...

1 answer

given a tree and its associated alignment, this script uses ETE3 to plot column changes for each internal branch. Not sure if this is exactly what you need, but it should be easy to add custom changes. enter image description here

That seems very much like what i'm looking for, thanks! I'll test it as soon as possible and report back.

This script is really great, thank you so much! The produced figs show much more than I expected, so I would like to ask for two adjustments that could make it easier to read and use: 1. Is there a way to exclude the columns that occur again in one of the two emerging branches (evolutionary speaking: include only the mutations that occurred during this step)? 2. I am working with fasta-alignments w/o gaps and newick/nexus trees. Is there an easy way to directly refer to stored files? I can probably find out myself, but will take me hours...

Log in to answer this question.