Using tax2tree for taxonomy assignment

273 views
Skip to first unread message

Dylan Bodington

unread,
Jun 19, 2013, 2:41:37 AM6/19/13
to qiime...@googlegroups.com
Hi,

I'm trying out tax2tree, and have a few possible paths to follow:

1. Insert_seqs_into_tree.py (raxml_v730, gg 13_5 otu 99 reference tree) then tax2tree
2. Concatenate my fasta with the gg 13_5 otu 99 fasta and run fastree (or massively parallel raxml) then tax2tree
3. Run a raxml of the gg 13_5 fasta, then run insert_seqs_into_tree.py with pplacer

My first question: what is involved in insert_seqs_into_tree.py with the default raxml_v730? Does it just combine the fasta files and recreate the tree?

Secondly: are there reference trees created with raxml, which I think is necessary in order to use pplacer? This would save me a long raxml run.

Dylan

Daniel McDonald

unread,
Jun 19, 2013, 10:11:54 AM6/19/13
to qiime...@googlegroups.com
Hey Dylan,

We've only ever done this with 2 and we used near full length reads as reconstruction with a multimodal sequence length distribution leads to bad trees. I'd be curious to hear though if you try 1 or 3. 

I believe insert_seqs_into_tree.py is wrapping insertion methods but I haven't used it specifically. I'm not aware of any Greengenes reference trees based off of raxml

Best,
Daniel



Dylan

--
 
---
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.
 
 

Dylan Bodington

unread,
Jun 20, 2013, 2:08:43 AM6/20/13
to QIIME Forums
Hey Daniel,

What I might try first is to insert my sequences onto the tree in ARB and export the tree. It's not ideal, but it should work. I guess it's basically the same process as 1 above.

Dylan

On 19 June 2013 23:11, Daniel McDonald <was...@gmail.com> wrote:
this


Dylan Bodington

unread,
Jun 20, 2013, 2:15:52 AM6/20/13
to QIIME Forums
On that note, are you going to release an arb file with each greengenes update?

Dylan

Dylan Bodington

unread,
Jun 20, 2013, 2:35:49 AM6/20/13
to QIIME Forums
Hi Daniel,

The 13_5 README mentions a new arb. Where might I find that?

Dylan

Daniel McDonald

unread,
Jun 20, 2013, 11:02:16 AM6/20/13
to qiime...@googlegroups.com
Yes... we're still finalizing the ARB db. Which reminds me, I need to find out whats going on with it...
-Daniel


Sam Lambrechts

unread,
Jul 16, 2013, 7:08:02 AM7/16/13
to qiime...@googlegroups.com
Hi Dylan and Daniel,

It seems like we are trying to do similar things here. I am also in the progress of trying to phylogenetically place/classify unknown reads within a reference phylogeny. More specifically, I am using short query reads that until now do not classify at the phylum level using the RDP classifier and such.

I am curious as to what your experiences are in the meantime with the 3 different paths you list?

I have tried option 3 (with pplacer and phylosift) on my data, but it seems the output is not biologically relevant. My experience with phylogenetic placement tools such as pplacer is that they do not seem to perform well on phylogenetically new/distant clades. So for me the only option that remains is de novo tree building (option 2 in your list). What worries me is what Daniel mentions, that de novo reconstruction with both near full length and short sequences might lead to bad trees?

I am curious to what your experiences with de novo phylogenetic tree building on alignments containing both full and short sequences are. Is the outcome that bad? It seems like it is the only option to unravel the identity/phylogenetic relationships of distant clades comprised of short sequences... (next to designing primers and recovering full length sequences ofcourse)

Interested to hear your thoughts!   

Daniel McDonald

unread,
Jul 16, 2013, 11:33:53 AM7/16/13
to qiime...@googlegroups.com
Hi Sam,

I haven't tried any of the placement tools myself. I've heard mixed reports, and agree with your concerns that they likely breakdown in regions of novel phylogenetic diversity. 

De novo reconstruction is not necessarily bad, and may at least help resolve deep branches unless the sequences are extremely divergent. You can then get at the taxonomy by decorating Greengenes on with tax2tree. This wasn't horrible when we did it before with 454 data mixed in with full reads for getting at deep taxonomy. Morgan Price has a discussion on fragments here:


How divergent are the sequences you have from, say, what's in Greengenes?

Best,
Daniel





--

Sam Lambrechts

unread,
Jul 16, 2013, 5:00:02 PM7/16/13
to qiime...@googlegroups.com
Thank you for your thoughts Daniel!

I am indeed reconstructing phylogenetic trees with the "-pseudo" option in FastTree, as Morgan Price suggests on his site. Nice to hear a second confirmation that this is a good thing to do when merging 454 reads with full length reference alignments!

Most of the unclassified sequences seem to have somewhere between 65% and 85% (best hit) sequence similarity with named clones when doing a search and classify with the silva sina aligner.

Another thing I am curious about is what your thoughts are on masking alignments encompassing the whole bacterial domain when doing these kind of reconstructions? If I understand correctly, Greengenes (and the Qiime SOP) suggest a greengenes-compatible lane mask to mask the alignment, but it seems some people advise against this because the lane mask originally was built to make a phylogeny between all three domains? So instead, certain people propose to use a custom "soft" mask to remove any columns where the most common base in a position occurs in less than 50% of the sequences. What are your opinions on this? Won't using a lane mask that was built for all three domains make things look more similar than they really are when only using bacterial sequences and a mix of short/long ones? 

Appreciate the discussion!

Sam  

Daniel McDonald

unread,
Jul 16, 2013, 5:36:58 PM7/16/13
to qiime...@googlegroups.com
Hey Sam,

How divergent are the sequences from Greengenes 13_5? Silva does not cover the same range of phylogenetic diversity as Greengenes, so my guess is that the SI will be a bit higher.

The Lane mask was originally based on a limited number of bacterial, archaeal and eukaryotic (16S/18S respectively) sequences. I can fwd the relevant text if you'd like (had to photocopy). I've been concerned over the mask for a while now, and it is possible that we will revisit it with Greengenes in the future. However, the current recommendation, if looking at the full Greengenes set, is to apply the Lane mask. If you are using a smaller, more targeted sequence set, then relaxing that criteria could increase the phylogenetic signal. The filter_alignment.py script in QIIME has functionality to drop highly gapped positions, and high entropy positions (effectively the goal of the Lane mask) but this is determined on the set of sequences on input not a predetermined mask.

As for Greengenes itself, we do a few things on masking. First, sequences are aligned and masked by SSU-Align (based on Infernal). The alignment is then expanded out to match columns between the SSU-Align alignment and the NAST alignment. We then apply the Lane mask. 

I'm not really sure how to think about the effect of the Lane mask and the combination of fragments and full length sequence.

What I'd really like to see, but I don't know if this would actually improve tree quality, would be to dynamically update the mask while determining the splits. I discussed it briefly with Morgan but we never moved forward on it, and while it seems like it may improve the tree, I don't know if it actually would, or if those changes would alter biological conclusions.

Best,
Daniel


Sam Lambrechts

unread,
Jul 16, 2013, 6:16:00 PM7/16/13
to qiime...@googlegroups.com
Interesting Daniel!

If the current recommendation by GG and Qiime when looking at the full Greengenes set, is to apply the Lane mask, then I guess it probably is also the way to go for me, as I want to use the whole 97% or 94% GG alignment in combination with my unknown reads. Might try the softer mask (dropping highly gapped positions and high entropy positions based on the whole alignment of GG sequences plus the small reads) to compare if that's advisable?

Greengenes 13_5 does indeed resolve some of the previously unclassified sequences at the phylum level, mostly within recently proposed candidate taxa. For the remainder, the best hit sequence similarity against GG 13_5 is also roughly between 65% and 85%

Kind Regards,

Sam
  

Daniel McDonald

unread,
Jul 16, 2013, 6:19:54 PM7/16/13
to qiime...@googlegroups.com
I'd be interested to hear how the softer mask pans out. You'll need to redecorate taxonomy, but that isn't that big of an issue.

Best,
Daniel



Sam
  

--

Sam Lambrechts

unread,
Jul 17, 2013, 7:46:07 AM7/17/13
to qiime...@googlegroups.com
Ok, I will post an update when I have some results

Regarding the decoration of taxonomy, I was wondering what the computational costs are for tax2tree? Is there a certain minimum amount of CPU's/RAM memory that is needed or advisable when decorating trees of more than 20,000 sequences with taxonomy? I am using EC2 cloud servers, so I'm wondering which instance type I should pick for tax2tree. For the moment I'm thinking of using a high memory one, to get the job done fast, but if you have an idea of what tax2tree requires, that would be useful

Thanks,

Sam 

Sam Lambrechts

unread,
Jul 18, 2013, 10:19:53 PM7/18/13
to qiime...@googlegroups.com
As a follow up:

The trees that I reconstructed using the Greengenes 13_5 reference alignment did not yield biologically relevant placements of the sequences with both the GG-compatible lane mask method and the custom method with a softer mask (removing any column where the most common base in a position occurs in less than 50% of the seqs). The reason I know this is because I added "test" sequences of known taxonomy. On the contrary, the broad scale trees reconstructed with the latest Silva release (constructed with the same filtering rules) do seem to be biologically relevant and correct. With Greengenes all the short 454 reads form one artefactual group (based on their short length I presume), while when using silva as the reference alignment they spread to the correct positions in the tree. I am not sure why this is occuring, but it seems the only variable that is different is the reference alignment (GG vs Silva), because each time the trees were reconstructed using the same FastTree command (-gtr -gamma -pseudo -fastest) and the same soft masking rule was applied to both alignments. It would have been great to have support for the placement of specific potentially novel lineages from both reference databases, but for now only the large silva alignment proved to be useful

Daniel McDonald

unread,
Jul 22, 2013, 12:11:05 PM7/22/13
to qiime...@googlegroups.com
Hey Sam,

Thanks for the summary. How did you align the sequences?
-Daniel


On Thu, Jul 18, 2013 at 8:19 PM, Sam Lambrechts <samlambr...@gmail.com> wrote:
As a follow up:

The trees that I reconstructed using the Greengenes 13_5 reference alignment did not yield biologically relevant placements of the sequences with both the GG-compatible lane mask method and the custom method with a softer mask (removing any column where the most common base in a position occurs in less than 50% of the seqs). The reason I know this is because I added "test" sequences of known taxonomy. On the contrary, the broad scale trees reconstructed with the latest Silva release (constructed with the same filtering rules) do seem to be biologically relevant and correct. With Greengenes all the short 454 reads form one artefactual group (based on their short length I presume), while when using silva as the reference alignment they spread to the correct positions in the tree. I am not sure why this is occuring, but it seems the only variable that is different is the reference alignment (GG vs Silva), because each time the trees were reconstructed using the same FastTree command (-gtr -gamma -pseudo -fastest) and the same soft masking rule was applied to both alignments. It would have been great to have support for the placement of specific potentially novel lineages from both reference databases, but for now only the large silva alignment proved to be useful

--

Sam Lambrechts

unread,
Jul 23, 2013, 5:18:24 PM7/23/13
to qiime...@googlegroups.com

Hi Daniel,

I aligned the sequences to the GG reference alignment using the aligner developed by Pat Schloss (http://www.ncbi.nlm.nih.gov/pubmed/20011594), as implemented in mothur. I also wanted to try the PaPaRa aligner (http://bioinformatics.oxfordjournals.org/content/27/15/2068.full), developed by the RAxML team, but in the paper they state PaPaRa could not be expected to produce reasonable results when using query reads from potentially distant clades.

Thank you for the interesting discussion

Sam 

Daniel McDonald

unread,
Jul 23, 2013, 5:20:46 PM7/23/13
to qiime...@googlegroups.com
Hey Sam,

I recommend using PyNAST or SSU-Align to assure that the sequences map back to the template correctly. This could explain the separate groupings.

Best,
Daniel


--

Sam Lambrechts

unread,
Jul 24, 2013, 12:31:34 PM7/24/13
to qiime...@googlegroups.com
Ok Daniel

Thanks for the feedback, will keep this in mind

Sam
Reply all
Reply to author
Forward
0 new messages