tax2tree cogent parse error: Didn't get back to root of tree.

77 views
Skip to first unread message

Sam Lambrechts

unread,
Jul 18, 2013, 1:07:44 PM7/18/13
to qiime...@googlegroups.com
Hi everybody!

I am trying to use tax2tree, but each time I get the following error message:

cogent.parse.record.RecordError: Didn't get back to root of tree.

My tree was generated using FastTree and contains the GG13_5 reference sequences (91% OTU reps) in combination with roughly 1,000 query reads with custom sequence identifiers (which are not in the taxonomy file unlike the reference seqs). Does anyone has an idea why this is happening and how to solve this?

The full output that gets printed to the screen:

ubuntu@ip-172-31-23-229:~/tax2tree-v1.0$ nlevel -t tests/data/GG91_lane.tree -m tests/data/91_otu_taxonomy.txt -o GG91_lane_mettax

Traceback (most recent call last):
  File "/usr/local/bin/nlevel", line 103, in <module>
    main()
  File "/usr/local/bin/nlevel", line 72, in main
    tree = load_tree(open(opts.tree), tipname_map, opts.verbose)
  File "/usr/local/lib/python2.7/dist-packages/t2t/nlevel.py", line 119, in load_tree
    tree = DndParser(input)
  File "/usr/local/lib/python2.7/dist-packages/cogent/parse/tree.py", line 166, in DndParser
    raise RecordError, "Didn't get back to root of tree."
cogent.parse.record.RecordError: Didn't get back to root of tree.

Kind regards

Daniel McDonald

unread,
Jul 18, 2013, 1:13:04 PM7/18/13
to qiime...@googlegroups.com
Hi Sam,

You'll need to reroot the tree, which can be done using the reroot script. I recommend just using the Archaea to do so. One easy way to get the Archaea IDs to root with is to take the relevant Greengenes taxonomy file, and do:

grep Archaea 99_otu_taxonomy.txt | cut -f 1 > archaea_ids.txt

BTW, I'm on vacation at the moment so my responses on tax2tree will be a bit slow. But, I'll try to keep the turn around time low.
-Daniel


--
 
---
You received this message because you are subscribed to the Google Groups "Qiime Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qiime-forum...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Sam Lambrechts

unread,
Jul 18, 2013, 2:27:54 PM7/18/13
to qiime...@googlegroups.com
Thank you for your answer Daniel, appreciate the help. I will keep in mind you're on vacation, have a good one!

If any new questions/problems regarding tax2tree should pop up, I will post them in a new topic, that way it should be easier for people who might encounter the same problems in the future to find the relevant information on this forum

Thanks

Sam


Sam Lambrechts

unread,
Jul 18, 2013, 3:08:59 PM7/18/13
to qiime...@googlegroups.com
Hi Daniel,

It seems I'm getting the same error when trying the reroot script. The following gets printed:

ubuntu@ip-172-31-23-229:~/tax2tree-v1.0/scripts$ python reroot -i GG91_lane.tree -t archaea_ids.txt -o GG91_lane_rerooted

Traceback (most recent call last):
  File "reroot", line 58, in <module>
    main()
  File "reroot", line 50, in main
    tree = DndParser(open(opts.input))
  File "/usr/local/lib/python2.7/dist-packages/cogent/parse/tree.py", line 166, in DndParser
    raise RecordError, "Didn't get back to root of tree."
cogent.parse.record.RecordError: Didn't get back to root of tree.

Kind regards,

Sam

Daniel McDonald

unread,
Jul 18, 2013, 3:10:57 PM7/18/13
to qiime...@googlegroups.com
Weird, okay. It looks like the newick file that describes the tree is ill-formed for some reason. Can you provide the FastTree command you used to create the tree?
-Daniel



Sam

--

Sam Lambrechts

unread,
Jul 18, 2013, 3:32:00 PM7/18/13
to qiime...@googlegroups.com
Hi Daniel

I think I have identified the problem: Apparently there were identifiers which contained a ";" character.

Thank you for responding 

Daniel McDonald

unread,
Jul 18, 2013, 3:32:59 PM7/18/13
to qiime...@googlegroups.com
That would do it... ;)


--
Reply all
Reply to author
Forward
0 new messages