Quick question, while I recognize that DADA2 is a _de novo_ method, I was wondering, if you assigned taxonomy via Greengenes reference database, if it was possible to use the tree provided by Greengenes for hierarchical multiple testing?
Thank you,
N
Maybe. We don't have an automated way to do that for you right now though. Would it be better to build your own phylogenetic tree from the sequences?
My sequence table is a little on the large size (22949 taxa) and I've been having issues with building the tree with phangorn.
At that size you can still use FastTree (http://www.microbesonline.org/fasttree/) to build a phylogeny in reasonable compute time. Its external (to R) software though.
I assume that would just consist of aligning the sequences (as shown in the workflow paper) and then using the resulting fasta file from DECIPHER with FastTree?
Apologies but I don't actually have experience of using FastTree (haven't needed it yet) so I can't help too much. Their documentation is probably the place to look.
@nmshahir You can give this a try: https://github.com/gblanchard4/dada2_to_qiime
It's my little conversions script to pipe a DADA2 seqtab into Qiime to do the alignment, tree building, taxa assignment, and biom conversion. It also creates an extra level of taxonomy that is the sequence variant level so you can examine that.
It will create an otutable, repset, and a shell script with all the steps to put into Qiime
P.S.
Let me know if you have any questions about it!
if anyone comes across this thread, here is how I do it.
I export the alignment as fasta
writeXStringSet(msa_stag, file= "msa.fasta")
then I call FastTree via system from within R
system("/path/to/FastTree -gtr -nt path/to/file/msa.fasta > path/to/file/FastTree.tre")
If you need an ultrametric tree (e.g. for calculation of phylogenetic diversity) you can make the tree ultrametric with PATHd8
system("/path/to/PATHd8/PATHd8 path/to/file/FastTree.tre path/to/file/FastTree_um.tre")
The file that PATHd8 returns contain more than just the tree so we need to extract the tree
system("grep '^d8 tree' path/to/file/FastTree_um.tre > path/to/file/FastTree_um_oT.tre")
Voil脿. Now you can read the tree into R and continue from here. I like the workflow as you never leave R and hence can have the code for the tree-building were it belongs, in your analysis script - which makes it fully reproducible.
Software:
@FabianRoger Would it be possible for me to email you for help on getting FastTree and PATHd8 set up? I too am having problems with phangorn taking an immensely long time and need to find a different alternative but am unfamiliar with FastTree and PATHd8.
sure, my email is fabian.[email protected]. Tell me were you run into problems - I see If I can help.
Most helpful comment
if anyone comes across this thread, here is how I do it.
I export the alignment as fasta
then I call FastTree via system from within R
If you need an ultrametric tree (e.g. for calculation of phylogenetic diversity) you can make the tree ultrametric with PATHd8
The file that PATHd8 returns contain more than just the tree so we need to extract the tree
Voil脿. Now you can read the tree into R and continue from here. I like the workflow as you never leave R and hence can have the code for the tree-building were it belongs, in your analysis script - which makes it fully reproducible.
Software:
FastTree
PATHd8