mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
Namespace all method IDs
This commit is contained in:
parent
038208bfbd
commit
60dc05f6c6
6 changed files with 9 additions and 9 deletions
|
|
@ -19,7 +19,7 @@ method <- function(id, name, description, func) {
|
||||||
|
|
||||||
structure(
|
structure(
|
||||||
list(
|
list(
|
||||||
id = id,
|
id = glue::glue("geposan_method_{id}"),
|
||||||
name = name,
|
name = name,
|
||||||
description = description,
|
description = description,
|
||||||
func = func
|
func = func
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ adjacency <- function(id = "adjacency",
|
||||||
reference_gene_ids <- preset$reference_gene_ids
|
reference_gene_ids <- preset$reference_gene_ids
|
||||||
|
|
||||||
cached(
|
cached(
|
||||||
"adjacency",
|
id,
|
||||||
c(
|
c(
|
||||||
species_ids,
|
species_ids,
|
||||||
gene_ids,
|
gene_ids,
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ clustering <- function(id = "clustering",
|
||||||
gene_ids <- preset$gene_ids
|
gene_ids <- preset$gene_ids
|
||||||
|
|
||||||
cached(
|
cached(
|
||||||
"clustering",
|
id,
|
||||||
c(species_ids, gene_ids, span, weight),
|
c(species_ids, gene_ids, span, weight),
|
||||||
{ # nolint
|
{ # nolint
|
||||||
scores <- data.table(gene = gene_ids)
|
scores <- data.table(gene = gene_ids)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ correlation <- function(id = "correlation",
|
||||||
reference_gene_ids <- preset$reference_gene_ids
|
reference_gene_ids <- preset$reference_gene_ids
|
||||||
|
|
||||||
cached(
|
cached(
|
||||||
"correlation",
|
id,
|
||||||
c(species_ids, gene_ids, reference_gene_ids, summarize),
|
c(species_ids, gene_ids, reference_gene_ids, summarize),
|
||||||
{ # nolint
|
{ # nolint
|
||||||
# Prefilter distances by species.
|
# Prefilter distances by species.
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@
|
||||||
#'
|
#'
|
||||||
#' @export
|
#' @export
|
||||||
distance <- function(id = "distance",
|
distance <- function(id = "distance",
|
||||||
name = "Distance",
|
name = "Distance",
|
||||||
description = "Distance to telomeres",
|
description = "Distance to telomeres",
|
||||||
summarize = stats::median) {
|
summarize = stats::median) {
|
||||||
method(
|
method(
|
||||||
id = id,
|
id = id,
|
||||||
name = name,
|
name = name,
|
||||||
|
|
@ -25,7 +25,7 @@ distance <- function(id = "distance",
|
||||||
species_ids <- preset$species_ids
|
species_ids <- preset$species_ids
|
||||||
gene_ids <- preset$gene_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.
|
# Prefilter distances by species and gene.
|
||||||
data <- geposan::distances[
|
data <- geposan::distances[
|
||||||
species %chin% preset$species_ids &
|
species %chin% preset$species_ids &
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ neural <- function(id = "neural",
|
||||||
reference_gene_ids <- preset$reference_gene_ids
|
reference_gene_ids <- preset$reference_gene_ids
|
||||||
|
|
||||||
cached(
|
cached(
|
||||||
"neural",
|
id,
|
||||||
c(
|
c(
|
||||||
species_ids,
|
species_ids,
|
||||||
gene_ids,
|
gene_ids,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue