# Readtree error message

**URL:** https://forum.mothur.org/t/readtree-error-message/99
**Category:** Commands in mothur
**Created:** [January 19, 2010, 5:25pm UTC](https://forum.mothur.org/t/readtree-error-message/99 "2010-01-19T17:25:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![dbaptista](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@dbaptista](https://forum.mothur.org/u/dbaptista)
#### Post date: [January 19, 2010, 5:25pm UTC](https://forum.mothur.org/t/readtree-error-message/99/1 "2010-01-19T17:25:26Z")

</div>

Hi all,

I’m getting an error message when I try to import a tree into mothur using the “read.tree” command (for use in parsimony and unifrac analysis). I used a program called “fasttree” to build the tree. It is a program that can build a tree using the alignment instead of a distance matrix. I’m finding I can’t use phylip to build my tree since my distance matrix is too large (nearly 8 gb). Unfortunately, when I try to read my tree into mothur, it errors out. The trees from fasttree are supposed to be in newick format.

Mothur closes and I have to open the log to get the error message, which reads: “Error: Expected comma in input file. Found ).” I’m not sure what this error means. I’m assuming it’s a formatting issue with my tree. I ran a small sample through fasttree and it read fine, but I got this error when I ran a sample size of about 2000 samples and my large alignment of 48000 samples. Has anyone used this program successfully with mothur or can someone tell me what this error message means? Any help would be appreciated.

I’m using a windows-based pc with 8 processors and 48 gb RAM, so I don’t think it’s a computer issue. Thanks!

-Damon

---

<div class="post-metadata">

### Author: ![jamesafoster](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jamesafoster](https://forum.mothur.org/u/jamesafoster)
#### Post date: [January 20, 2010, 12:52am UTC](https://forum.mothur.org/t/readtree-error-message/99/2 "2010-01-20T00:52:22Z")

</div>

sounds like the tree file is corrupted. Have you tried opening it with a tree viewer, like figtree?

---

<div class="post-metadata">

### Author: ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)
#### Post date: [January 20, 2010, 5:23am UTC](https://forum.mothur.org/t/readtree-error-message/99/3 "2010-01-20T05:23:40Z")

</div>

yeah, it’s corrupted. by the node labels that fasttree puts in and by the fact that they don’t give bifurcating trees. i don’t actually think the fasttree trees have branch lengths (so why do unifrac?), but i might be wrong.

---

<div class="post-metadata">

### Author: ![jamesafoster](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jamesafoster](https://forum.mothur.org/u/jamesafoster)
#### Post date: [January 20, 2010, 4:39pm UTC](https://forum.mothur.org/t/readtree-error-message/99/4 "2010-01-20T16:39:27Z")

</div>

I recommend clearcut for building trees, very fast even on very big trees.

> <https://www.ncbi.nlm.nih.gov/pubmed/16982706>
>
> Clearcut is an open source implementation for the relaxed neighbor joining (RNJ) algorithm. While traditional neighbor joining (NJ) remains a popular method for distance-based phylogenetic tree reconstruction, it suffers from a O(N(3)) time complexity, where N represents the number of taxa in the input. Due to this steep asymptotic time complexity, NJ cannot reasonably handle very large datasets. In contrast, RNJ realizes a typical-case time complexity on the order of N(2)logN without any significant qualitative difference in output. RNJ is particularly useful when inferring a very large tree or a large number of trees. In addition, RNJ retains the desirable property that it will always reconstruct the true tree given a matrix of additive pairwise distances. Clearcut implements RNJ as a C program, which takes either a set of aligned sequences or a pre-computed distance matrix as input and produces a phylogenetic tree. Alternatively, Clearcut can reconstruct phylogenies using an extremely fast standard NJ implementation.Clearcut source code is available for download at: http://bioinformatics.hungry.com/clearcut

---

<div class="post-metadata">

### Author: ![dbaptista](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@dbaptista](https://forum.mothur.org/u/dbaptista)
#### Post date: [January 20, 2010, 5:36pm UTC](https://forum.mothur.org/t/readtree-error-message/99/5 "2010-01-20T17:36:23Z")

</div>

Pat: I get the same error message even when I turn the internal node labels off in fasttree. I’ve heard that other researchers are using fasttree trees to do unifrac analysis, so I was under the impression there is a way.

James: Thanks for the suggestion on figtree. I wasn’t aware of that program. I’m able to open my trees in figtree without any error messages, so I don’t think my tree files are corrupted. Unfortunately, I can’t use clearcut since I’m running a windows based pc and it looks like clearcut only works on linux.

It sounds like we might just have to bite the bullet and look into getting a linux based PC so we can use clearcut. That seems to be the standard method. Just out of curiosity, has anyone successfully run clearcut with an 8 gb distance matrix?

Thanks for all the advice.

---

<div class="post-metadata">

### Author: ![pschloss](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/pschloss/32/4_2.png) [@pschloss](https://forum.mothur.org/u/pschloss)
#### Post date: [January 20, 2010, 7:03pm UTC](https://forum.mothur.org/t/readtree-error-message/99/6 "2010-01-20T19:03:34Z")

</div>

could you email us an exampmle fasttree tree ([mothur.bugs@gmail.com](mailto:mothur.bugs@gmail.com))? i’ve successfully used clearcut to build nj and r-nj trees for datasets up to 14,000 sequences

---

<div class="post-metadata">

### Author: ![jamesafoster](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jamesafoster](https://forum.mothur.org/u/jamesafoster)
#### Post date: [January 20, 2010, 9:05pm UTC](https://forum.mothur.org/t/readtree-error-message/99/7 "2010-01-20T21:05:57Z")

</div>

better yet, get a mac!

Good luck.
