Entering edit mode
7.8 years ago
sansritisinha
•
0
I wanted to remove one of the taxa from the tree. so i downloaded ape package and using drop.tip i could remove the taxa. but I am unable to print/plot the modified tree. i tried using plot() for plotting the tree but it seems to be specified with ylim values. how do i get ylim values for the tree? or is there a different way of plotting the tree?
thank you
Please add the code you used, ideally with a minimum reproducible example (i.e. a small dataset that we can use to reproduce your problem). Also, for plotting trees take a look at the ggtree package and its documentation, for example the introduction.
I used the following:
With this the taxa I wanted to remove was removed and the tree now had a taxa less than what it had. I do not know how to display/ rite/plot the modified tree
Take a look at
?drop.tip
documentation. There it says the returned value fromdrop.tip
is a phylo object. Therefore, you need to assign the returned value to a variable and plot that.how do I do that? I am using R for the first time. can you please help me with the code?
OK, something like this:
I would highly recommend you to read some introduction to R. There are many in the documentation section at http://www.r-project.org
it worked. thank you so much! Can I export this tree in newick format?
Try reading
?write.tree
.