I have just produced a NJ tree using PAUP and a piece of code that looks like this(Which Software Can Be Used To Build Nj Tree With Gtr+I+G Model?, my main reason to use PAUP is explained in the same post). PAUP capabilities to plot trees are relatively limited and since it stores the trees in *.tre format by default, is there a way to export my output trees in a different format like Newick, or one that is fully compatible with ETE 3 and other programs used to visualize trees?
There are two (major) formats in which trees are stored: Newick/New Hampshire/parenthetical and NEXUS. Confusingly, both can use the
.tre extension. Because PAUP* and other programs exclusively use NEXUS and others use Newick, there are a lot of ways to convert between them. You can write your own in a variety of languages. Here's a quick, three-line snippet in R:
library(ape) a <- read.nexus("your_tree.nex") #can be used to write any object of class 'phylo' or 'multiphylo' write.tree(a, file="your_tree.phy") #and, for reference, to write in NEXUS: write.nexus(a, file="your_tree.nex")