From a062c5b97d5825691345c340bdb24665c58c09b1 Mon Sep 17 00:00:00 2001 From: Fabian Springer Date: Mon, 25 Mar 2024 11:05:10 +0100 Subject: [PATCH] minor fixes in the appearance of the plots --- src/plotting/functions_plotting.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plotting/functions_plotting.R b/src/plotting/functions_plotting.R index 5efa954..cd6890e 100644 --- a/src/plotting/functions_plotting.R +++ b/src/plotting/functions_plotting.R @@ -294,8 +294,9 @@ f_compute_PCoA <- function(meta_df, mat, method = "bray", threshold_for_prevalen message(nrow(relAB_sel), " out of ", nrow(mat_clean), " features passed prevalence cutoff") # remove empty columns - relAB_sel <- relAB_sel[, colSums(relAB_sel) > 0] - + if (method == "bray") { + relAB_sel <- relAB_sel[, colSums(relAB_sel) > 0] + } # Compute Bray-Curtis distances dist <- vegan::vegdist(x = t(relAB_sel), method = method) pco <- labdsv::pco(dis = dist, k = 2)