simplifyEnrichment
simplifyEnrichment copied to clipboard
Return dendrogram from binary_cut
After seeing I could not retrieve the dendrogram created by binary_cut
(#78 ) I propose the following pull request where:
- I added
return_dend = FALSE
to bothcluster_mat
andcluster_mat2
(in the one there was already such an argument which was not in use) - Moved the
cl = as.numeric(as.vector(unname(cl)))
line into these functions (instead of inbinary_cut
) - Changed functions to return either just
cl
or a named list ofcl
anddend
. - Documentation and
plot_binary_cut
updated accordingly
Lastly, in cluster_terms
, as all clustering methods must return a vector of clusters, I added that return_dend=FALSE
. I think this should be removed and that returning a more complex object could be nice but that is a bigger change than I intended.
I tested the changes over my data and saw no problems
After investigating the returned dendrogram I find it useful to include the split attributes added in cut_dend
to the actual dendrogram returned. The dendrogram together with the split information is useful when considering different "resolutions" of the clustering