Generalize method definitions

This commit is contained in:
Elias Projahn 2021-10-15 09:26:57 +02:00
parent d3edeefbe2
commit 9b0b3c13f5
7 changed files with 137 additions and 169 deletions

View file

@ -6,7 +6,7 @@ library(data.table)
#' The result will be a data.table with the following columns:
#'
#' - `gene` Gene ID of the processed gene.
#' - `correlation` Mean correlation coefficient.
#' - `score` Mean correlation coefficient.
#'
#' @param distances Distance data to use.
#' @param species_ids Species, whose data should be included.
@ -69,5 +69,5 @@ process_correlation <- function(distances, species_ids, gene_ids,
score <- correlation_sum / reference_count
}
results[, correlation := compute(gene), by = 1:nrow(results)]
results[, score := compute(gene), by = 1:nrow(results)]
}