Plot phylogenetic tree with all ancestor nodes
0
0
Entering edit mode
7 weeks ago
AfinaM ▴ 10

Hi everyone,

I am trying to generate a phylogenetic tree and I noticed that the tree produced using MEGA software and R (using ape package) is a bit different where one of the ancestor node is removed.

(Open image in new tab for full image)

Is there a way in R to make sure that all nodes are presented in the phylogenetic tree?

Edit:

In MEGA, I used default settings for both alignment (Clustal) and phylogenetic tree (NJ). For the comparison, I used the Newick file generated from MEGA and use the codes below:

tr = read.tree("tree.nwk");
tr$edge.length=NULL; plot(gettree,show.node.label = T,no.margin = T);  I doubt NULLing the edge.length affect the tree. Below is the other tree generated without tr$edge.length=NULL;

Appreciate if anyone can help with this. Here is the Newick file that I use.

phylogenetic tree R ape • 210 views
1
Entering edit mode

Hi, this is not informative. Write in details the algorithms and parameters you used for MEGA and R-ape (with code in the latter case), and ideally, you should supply an example dataset to make it reproducible.

0
Entering edit mode

Hi, I have edited the post.

0
Entering edit mode

Hi! Have you tried these packages? You may want to give them a try.

https://cran.r-project.org/web/packages/castor/index.html

https://guangchuangyu.github.io/software/treeio/

0
Entering edit mode

I've tried using both to generate and still couldn't manage to get that one ancestor node to show up. Are you familiar using these packages? Here is the Newick file that I'm experimenting with.

0
Entering edit mode

Could you tell me the accession number of the ancestor node?

0
Entering edit mode

From iTOL website, I still get the same phylogenetic tree as in R. Here is the Newick file that I used.