-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Apologies if this has been discussed before or is an easy fix!
I've just been introduced to metacoder and I want to be able to use a phyloseq object as an entry. I can get the code to work pretty well, but as mentioned in the documentation, a pretty large and hard to read heat tree is produced. One suggestion is to filter_taxa by a taxon rank to cut it down a bit, but my object (sourced from standard physique object) won't work to filter by supertaxon. It throws the following error:
Warning messages:
1: There is no "taxon_id" column in the data set "3", so there are no taxon IDs.
2: The data set "4" is named, but not named by taxon ids.
3: In heat_tree.default(taxon_id = character(0), supertaxon_id = character(0), :
'taxon_id' and 'supertaxon_id' are empty. Returning NULL.
Data set 3 is my sample data so it makes sense that there is no taxon id. Data set 4 is the physeq tree that comes with the physique object.
How can I tell the filter_taxa function of the heat map to look in Data set 1 (out_table) or Data set 2 (taxa_data) for this? I know it's because I'm inputting a physeq, but it's much easier for me to do so in my workflow.
As is, I only have it as one line in the heat_tree code as so:
obj %>% + filter_taxa(taxon_ranks == "p") %>% + heat_tree(node_label = taxon_names, + node_size = n_obs, + node_color = n_obs, + initial_layout = "re", layout = "da")
Thank you!!