-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relative abundance in heat tree #357
Comments
Hello, You can put in the name of any column in any table in you input column in place of library(metacoder)
#> This is metacoder verison 0.3.5 (stable)
# Get example data
x = parse_tax_data(hmp_otus, class_cols = "lineage", class_sep = ";",
class_key = c(tax_rank = "taxon_rank", tax_name = "taxon_name"),
class_regex = "^(.+)__(.+)$")
# Geting a total for all columns
x$data$tax_abund_total <- calc_taxon_abund(x, "tax_data", cols = hmp_samples$sample_id,
groups = rep("total_count", nrow(hmp_samples)))
#> Summing per-taxon counts from 50 columns in 1 groups for 174 taxa
# Plot total count
heat_tree(x, node_label = taxon_names, node_size = total_count, node_color = total_count) Created on 2023-10-25 with reprex v2.0.2 |
Hello Zachary, Thanks for your quick answer! Simon
|
Hard to say for sure without being able to run the code with your data myself, but it looks like you are using the OTU table in
|
Hi Zachary, sorry for the late answer.
You should be able to run the code I provided as GlobalPatterns is a dataset from the phyloseq package. |
Hello Metacoder devs,
It must be pretty straight forward but I'm having a hard time trying to plot relative abundance of the taxa in the whole dataset instead of OTU count as node_size in the heat tree. I guess I have to change n_obs to something but I couldn't find the right parameter to replace it by.
Have a good day,
Simon
The text was updated successfully, but these errors were encountered: