diff --git a/inst/pages/clustering.qmd b/inst/pages/clustering.qmd index b3665175..cf5fcb95 100644 --- a/inst/pages/clustering.qmd +++ b/inst/pages/clustering.qmd @@ -304,11 +304,13 @@ features. #| fig-height: 2 # Get the estimates on how much each phylum contributes on each cluster -best_model <- metadata(altExp(tse, "prevalent"))$DMM$dmm[2] -drivers <- as.data.frame(best_model[[1]]@fit$Estimate) +models <- metadata(altExp(tse, "prevalent"))$DMM +n_clusters <- models[["best"]] +best_model <- models[["dmm"]][[n_clusters]] +drivers <- fitted(best_model, scale = TRUE) # Plot by utilizing miaViz's function plotLoadings -plotLoadings(as.matrix(drivers), ncomponents = 2) +plotLoadings(drivers, ncomponents = 2) ``` As well as in hierarchical clustering, we can also visualize the clusters by