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

proof of principle for revision code supplementary

parent e9cc7d51
Branches
No related tags found
No related merge requests found
Showing with 12 additions and 1 deletion
...@@ -843,7 +843,7 @@ set$ps.topnTax <- cuphyr::abundant_tax_physeq(ps.trans, lvl = set$taxlvl, ...@@ -843,7 +843,7 @@ set$ps.topnTax <- cuphyr::abundant_tax_physeq(ps.trans, lvl = set$taxlvl,
set$my_scale_fill <- my_scale_fill set$my_scale_fill <- my_scale_fill
set$topntax_tbl <- psmelt(set$ps.topnTax) %>% set$topntax_tb <- psmelt(set$ps.topnTax) %>%
as_tibble() %>% as_tibble() %>%
left_join(set$alpha_div_ps_trans, by = "Sample") %>% left_join(set$alpha_div_ps_trans, by = "Sample") %>%
select(Genus, Alias, ndvi, Abundance, Shannon) %>% select(Genus, Alias, ndvi, Abundance, Shannon) %>%
...@@ -853,6 +853,17 @@ set$topntax_tbl <- psmelt(set$ps.topnTax) %>% ...@@ -853,6 +853,17 @@ set$topntax_tbl <- psmelt(set$ps.topnTax) %>%
arrange(ndvi) %>% arrange(ndvi) %>%
mutate(ndvi_rank = c(1:length(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), plots$topn_tax_custom <- ggplot(set$topntax_tbl, aes(x = fct_reorder(Alias, ndvi),
y = Abundance, y = Abundance,
......
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment