Allow customizing method metadata

This commit is contained in:
Elias Projahn 2022-06-22 11:20:39 +02:00
parent 0e4f4621ed
commit c6ca93b009
12 changed files with 139 additions and 30 deletions

View file

@ -70,16 +70,22 @@ clusteriness <- function(data,
#' The result will be cached and can be reused for different presets, because
#' it is independent of the reference genes in use.
#'
#' @param id Unique ID for the method and its results.
#' @param name Human readable name for the method.
#' @param description Method description.
#'
#' @return An object of class `geposan_method`.
#'
#' @seealso [clusteriness()]
#'
#' @export
clustering <- function() {
method(
id = "clustering",
clustering <- function(id = "clustering",
name = "Clustering",
description = "Clustering of genes",
description = "Clustering of genes") {
method(
id = id,
name = name,
description = description,
function(preset, progress) {
species_ids <- preset$species_ids
gene_ids <- preset$gene_ids