Closed marwa38 closed 1 year ago
Hi again,
Yes the taxa just need the same ids in the taxa abundance and function copy number tables.
The tree produced by the PICRUSt2 pipeline could be used there - it's not specified as such because FuncDiv
is agnostic to the provenance of the input data (and actually it was designed with metagenome-assembled genomes in mind).
Cheers,
Gavin
Hello. Regarding input, data... Could I use the default stratified contributions file provided by picrust2? Also, unfortunately I don't have the phylogenetic tree generated by picrust2, could use a phylogenetic tree generated from a phyloseq object? Thank you.
Hi @gonzalofe,
Yes, you can use the output table from PICRUSt2. The key thing is that you need to specify what the four key column names are that the tool is looking for. You can take a look at this line from the FuncDiv tutorial for help:
alpha_out <- alpha_div_contrib(metrics = metrics,
contrib_tab = contrib_tab,
in_tree = in_tree,
ncores = 1,
replace_NA = FALSE,
samp_colname = "samp",
func_colname = "func",
taxon_colname = "tax",
abun_colname = "tax_abun")
If you're inputting a PICRUSt2 stratified table, then you would want to specify:
...
samp_colname = "sample",
func_colname = "function",
taxon_colname = "taxon",
abun_colname = "taxon_rel_abun")
Regarding the tree - FuncDiv is agnostic to how the input tree was produced. As long as the tip labels match the labels in the "taxon" column then it should work correctly.
Cheers,
Gavin
Hi again I think it will be helpful to clarify for me regarding alpha diversity
in_tree <- ape::read.tree("taxa.tree")
is it tree produced from picrust2 as it is not clear?Thanks M