diff --git a/R/method.R b/R/method.R index d3f11e3..6f8b3f2 100644 --- a/R/method.R +++ b/R/method.R @@ -19,7 +19,7 @@ method <- function(id, name, description, func) { structure( list( - id = id, + id = glue::glue("geposan_method_{id}"), name = name, description = description, func = func diff --git a/R/method_adjacency.R b/R/method_adjacency.R index b841d61..9fb73cf 100644 --- a/R/method_adjacency.R +++ b/R/method_adjacency.R @@ -55,7 +55,7 @@ adjacency <- function(id = "adjacency", reference_gene_ids <- preset$reference_gene_ids cached( - "adjacency", + id, c( species_ids, gene_ids, diff --git a/R/method_clustering.R b/R/method_clustering.R index b036977..741ca14 100644 --- a/R/method_clustering.R +++ b/R/method_clustering.R @@ -76,7 +76,7 @@ clustering <- function(id = "clustering", gene_ids <- preset$gene_ids cached( - "clustering", + id, c(species_ids, gene_ids, span, weight), { # nolint scores <- data.table(gene = gene_ids) diff --git a/R/method_correlation.R b/R/method_correlation.R index 4b61bd8..2eec60c 100644 --- a/R/method_correlation.R +++ b/R/method_correlation.R @@ -24,7 +24,7 @@ correlation <- function(id = "correlation", reference_gene_ids <- preset$reference_gene_ids cached( - "correlation", + id, c(species_ids, gene_ids, reference_gene_ids, summarize), { # nolint # Prefilter distances by species. diff --git a/R/method_distance.R b/R/method_distance.R index 0557787..e81bc35 100644 --- a/R/method_distance.R +++ b/R/method_distance.R @@ -14,9 +14,9 @@ #' #' @export distance <- function(id = "distance", - name = "Distance", - description = "Distance to telomeres", - summarize = stats::median) { + name = "Distance", + description = "Distance to telomeres", + summarize = stats::median) { method( id = id, name = name, @@ -25,7 +25,7 @@ distance <- function(id = "distance", species_ids <- preset$species_ids gene_ids <- preset$gene_ids - cached("distance", c(species_ids, gene_ids), { + cached(id, c(species_ids, gene_ids), { # Prefilter distances by species and gene. data <- geposan::distances[ species %chin% preset$species_ids & diff --git a/R/method_neural.R b/R/method_neural.R index 0a29eb6..438aff1 100644 --- a/R/method_neural.R +++ b/R/method_neural.R @@ -33,7 +33,7 @@ neural <- function(id = "neural", reference_gene_ids <- preset$reference_gene_ids cached( - "neural", + id, c( species_ids, gene_ids,