Question: Cut a tree based on time t
gravatar for tutoring891
6.2 years ago by
United States
tutoring8910 wrote:

I'm using the ape library to import a tree of type newick format. This tree contains branch lengths. I'm interested in cutting the tree at t=1. The time starts from 0 up until t=2 (rooted node) for example. Is there an easy way to cut the tree at specific time and then extract those different subtrees generated. I'm using R and I could not find any function in ape that does that. Any suggestions would be appreciated.


Update: Nevermind I was able to solve it. Convert the phylo tree to hclust and then use the function cutree.

trees R phylogenetic • 2.1k views
ADD COMMENTlink modified 6.2 years ago by Chrispin Chaguza260 • written 6.2 years ago by tutoring8910

can you add that as an answer perhaps. Thanks for following up.

ADD REPLYlink written 6.2 years ago by Istvan Albert ♦♦ 85k

Hi, I am facing a similar problem and would be happy to hear your thoughts on how you addressed the challenge. Thanks!

ADD REPLYlink written 9 months ago by Mac10
gravatar for Chrispin Chaguza
6.2 years ago by
Wellcome Sanger Institute
Chrispin Chaguza260 wrote:

Check ete2 toolkit (, I think it has a function for extracting subtrees based on a specified node.

ADD COMMENTlink written 6.2 years ago by Chrispin Chaguza260

yes, check this example:

ADD REPLYlink written 6.2 years ago by jhc2.9k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1859 users visited in the last hour