Skip to content
Snippets Groups Projects
Commit 6048f14b authored by Simeon's avatar Simeon
Browse files

revision 16S working

parent e8c912c3
No related branches found
No related tags found
No related merge requests found
......@@ -843,7 +843,7 @@ set$ps.topnTax <- cuphyr::abundant_tax_physeq(ps.trans, lvl = set$taxlvl,
set$my_scale_fill <- my_scale_fill
set$topntax_tb <- psmelt(set$ps.topnTax) %>%
set$topntax_tbl <- psmelt(set$ps.topnTax) %>%
as_tibble() %>%
left_join(set$alpha_div_ps_trans, by = "Sample") %>%
select(Genus, Alias, ndvi, Abundance, Shannon) %>%
......@@ -853,17 +853,6 @@ set$topntax_tb <- psmelt(set$ps.topnTax) %>%
arrange(ndvi) %>%
mutate(ndvi_rank = c(1:length(ndvi)))
set$other <- set$topntax_tb %>%
group_by(Alias) %>%
summarise(sumabu = sum(Abundance)) %>%
mutate(Genus = 'Other', Abundance = 1-sumabu) %>%
select(-sumabu)
set$topntax_tbl <- bind_rows(set$topntax_tb, set$other) %>%
mutate(Genus = factor(Genus, levels = c(
sort(unique(set$topntax_tb$Genus)),
"Other")
))
plots$topn_tax_custom <- ggplot(set$topntax_tbl, aes(x = fct_reorder(Alias, ndvi),
y = Abundance,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment