You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble on coloring the branches of one tree based on detection of taxa by different gene regions 12S and 16S (and also possibly grouping based on two study regions in another identical tree).
I understand that there is another Metacoder script on coloring of taxa based on differential tree - comparing abundance but our interest is not on comparing OTU abundance/any other variable from further statistical analysis so the script might not be usable for us. I wonder if you have the script on coloring of branches of one tree simply based on two different groups - 12S, 16S region (and possibly third color on shared regions of 12S, 16S). Or if not possible for the previous, I would like to have two identical trees but with coloring of different branches based on 12S, 16S?
Currently I am only able to display two separate trees based on single gene region so I'm emailing for urgent help. Here is my running script:
And here is my current generated picture (but we hope to have identical trees with coloring of different branches (taxa) based on the detection of different 12S, 16S gene regions):
I will be very grateful if you can answer me!
The text was updated successfully, but these errors were encountered:
Dear Zachary Foster and everyone,
I am having trouble on coloring the branches of one tree based on detection of taxa by different gene regions 12S and 16S (and also possibly grouping based on two study regions in another identical tree).
I understand that there is another Metacoder script on coloring of taxa based on differential tree - comparing abundance but our interest is not on comparing OTU abundance/any other variable from further statistical analysis so the script might not be usable for us. I wonder if you have the script on coloring of branches of one tree simply based on two different groups - 12S, 16S region (and possibly third color on shared regions of 12S, 16S). Or if not possible for the previous, I would like to have two identical trees but with coloring of different branches based on 12S, 16S?
Currently I am only able to display two separate trees based on single gene region so I'm emailing for urgent help. Here is my running script:
install.packages("metacoder")
install.packages("phyloseq")
library(phyloseq)
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install(version = "3.19")
setwd("E:/1-R/metacoder/")
otu <- read.delim('otu_table.txt', row.names = 1, sep = '\t', check.names = FALSE)
tax <- read.delim('tax_table.txt', row.names = 1, sep = '\t', check.names = FALSE)
phy <- phyloseq(otu_table(as.matrix(otu), taxa_are_rows = TRUE), tax_table(as.matrix(tax)))
obj <- parse_phyloseq(phy)
obj
set.seed(123)
heat_tree(
obj,
node_size = n_obs, node_color = n_obs,
node_size_axis_label = 'OTU count', node_color_axis_label = 'OTU count',
node_label = taxon_names, tree_label = taxon_names,
layout = 'davidson-harel', initial_layout = 'reingold-tilford'
)
And here is my current generated picture (but we hope to have identical trees with coloring of different branches (taxa) based on the detection of different 12S, 16S gene regions):
I will be very grateful if you can answer me!
The text was updated successfully, but these errors were encountered: