Mercurial > repos > ecology > estimate_endem
comparison EstimEndem.R @ 1:f3a977826375 draft default tip
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/Phylodiversity_workflow commit cbd0cb48be9f2aa5e30c917d6a9031ef1a7a83c8
author | ecology |
---|---|
date | Thu, 05 Jun 2025 16:50:45 +0000 |
parents | f7a55ccf2a3e |
children |
comparison
equal
deleted
inserted
replaced
0:f7a55ccf2a3e | 1:f3a977826375 |
---|---|
41 #select the less distorting clustering method, best fitting between phylogenetic distances in phylobeta matrix | 41 #select the less distorting clustering method, best fitting between phylogenetic distances in phylobeta matrix |
42 # and raw distances from branch lengths of the tree | 42 # and raw distances from branch lengths of the tree |
43 select_linkage(phylo_beta[[1]]) | 43 select_linkage(phylo_beta[[1]]) |
44 | 44 |
45 #select optimal number of clusters with selected method | 45 #select optimal number of clusters with selected method |
46 optim <- optimal_phyloregion(phylo_beta[[3]], k = 30) | 46 optim <- optimal_phyloregion(phylo_beta[[3]]) |
47 print(paste("the best number of cluster is :", optim$optimal$k)) | 47 print(paste("the best number of cluster is :", optim$optimal$k)) |
48 #plot(optim$df$k, optim$df$ev, pch = 20) # k - nbr of clusters VS explained variance given k | 48 #plot(optim$df$k, optim$df$ev, pch = 20) # k - nbr of clusters VS explained variance given k |
49 # k has to be selected by a user | 49 # k has to be selected by a user |
50 | 50 |
51 # pass the grid cell to spatial format | 51 # pass the grid cell to spatial format |