A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/grunwaldlab/metacoder/issues/249 below:

Maximum value for median proportion · Issue #249 · grunwaldlab/metacoder · GitHub

Hello, I'm not sure what the best way to leave a reproducible example is, but possibly this is just a interpretation question. I'm making a heat tree in which node colors represent the median proportion of a taxon in a treatment group. According to the legend, the range of these values is 0-0.17. The central node, for Bacteria, is colored with the "maximum" color, implying that the median proportion of bacteria in a sample is 17%. However, 100% of the reads in the data set are bacteria; so the "median proportion" value for that node should be 1. The samples are dominated by Proteobacteria, so the median proportion value for the Proteobacteria node should also be higher than 17%. Could you help me understand what's going on? Please let me know what other information I should provide.

(As a second issue, the node size is supposed to represent the number of samples that contain that taxon, but there is no range of values shown on the figure legend for that variable.)

Thank you for your help!

devtools::install_github("ropensci/taxa")
devtools::install_github("grunwaldlab/metacoder")
library(metacoder) #0.2.0.9012 # https://github.com/grunwaldlab/metacoder
obj<-parse_phyloseq(adata)

obj$data$tax_abund <- calc_taxon_abund(obj, "otu_table")
obj$data$tax_occ <- calc_n_samples(obj, "tax_abund", groups = sample_data(adata)$treatment)
obj$data$tax_props <- calc_obs_props(obj, "tax_abund")
obj$data$diff_table <- compare_groups(obj, dataset = "tax_abund", cols=obj$sam_data$sample_ids, groups = sample_data(adata)$treatment)
obj$data$medians<-calc_group_median(obj, dataset="tax_props", groups=sample_data(adata)$treatment)

#Show taxonomic trees with presence/absence and median relative abundance 
#of taxa in each treatment
#Figures S3A-C
ht_AUT<-heat_tree(obj,
                  node_size = obj$data$tax_occ$AUT,
                  node_color = obj$data$medians$AUT,
                  node_label = taxon_names,
                  node_size_axis_label = "Samples with reads",
                  node_color_axis_label = "Median proportion")

ht_NET<-heat_tree(obj,
                  node_size = obj$data$tax_occ$NET,
                  node_color = obj$data$medians$NET,
                  node_label = taxon_names,
                  node_size_axis_label = "Samples with reads",
                  node_color_axis_label = "Median proportion")
ht_SED<-heat_tree(obj,
                  node_size = obj$data$tax_occ$SED,
                  node_color = obj$data$medians$SED,
                  node_label = taxon_names,
                  node_size_axis_label = "Samples with reads",
                  node_color_axis_label = "Median proportion")

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4