register_clustering_methods: Register new clustering methods

Description Usage Arguments Details Value Examples

View source: R/z.register_methods.R

Description

Register new clustering methods

Usage

1

Arguments

...

A named list of clustering functions, see Details.

Details

The user-defined functions should accept at least one argument which is the input matrix. The second optional argument should always be ... so that parameters for the clustering function can be passed by control argument from cluster_terms, simplifyGO or simplifyEnrichment. If users forget to add ..., it is added internally.

Please note, the user-defined function should automatically identify the optimized number of clusters.

The function should return a vector of cluster labels. Internally it is converted to numeric labels.

Value

No value is returned.

Examples

1
2
3
4
5
6
register_clustering_methods(
	# assume there are 5 groups
	random = function(mat, ...) sample(5, nrow(mat), replace = TRUE)
)
all_clustering_methods()
remove_clustering_methods("random")

simplifyEnrichment documentation built on Nov. 8, 2020, 5:07 p.m.