jenniferlu717 / KrakenTools

KrakenTools provides individual scripts to analyze Kraken/Kraken2/Bracken/KrakenUniq output files
GNU General Public License v3.0
316 stars 88 forks source link

Construct a phylogenetic tree from Kraken2 in order to use in phyloseq object #46

Open magibc opened 2 years ago

magibc commented 2 years ago

Hi, It's my first time analysing metagenomics from a shotgun experiment but before to post this issue I tried some strategies to overcome the topic described below.

I would like to construct a phyloseq object from Kraken2 + Bracken output but containing a phylogenetic tree in the phyloseq object in order to be able to calculate Unifrac distances in downstream analysis.

Could you recommend me some software to create a phylogenetic tree from Kraken2 output?

Thanks on advance for your help/hints,

Magí.

damioresegun commented 2 years ago

I was trying to do this recently too but as I understand it, you can't make it directly from a Kraken output as that only have taxonomic information. For phylogenetic information, you need to carry out a multiple sequence alignment and then carry out bootstrap calculation. Its somewhat computationally difficult to do and I honestly gave up on doing that for my samples. In terms of software that could make one, you could try MEGA although in my experience, that works for small-ish datasets.

For phyloseq, you can make a taxonomic tree that could help in visualisation however, it doesn't really do much in providing phylogenetic information that you can analyse.

If you do manage to find something that works for metagenomic data, let me know!

CMagnoBR commented 1 year ago

Hey guys! Let me know too! Recently Im looking for a method for infer phylogenetic tree, and produce a newick tree file for others purposes. Using Kraken2, we can extract the mapped sequences using "--classified-out" option. However, there aren`t any method to use these sequences for phylogenetic inference. The head of the reads has the TaxID classified by the Kraken2. I believe that is the way. Suggestions?

Regards.

CMagnoBR commented 9 months ago

Hi! Past 1 year, there is some advance for this question?? Thanks!

paulzierep commented 4 months ago

I need to look into this, but should it not be possible to create a tree from the tax ids using e.g. ete3: http://etetoolkit.org/docs/latest/tutorial/tutorial_ncbitaxonomy.html In any case the tree is optional for phyloseq so you can use most functions without the tree.