mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 19:27:24 +01:00
Generalize method definitions
This commit is contained in:
parent
d3edeefbe2
commit
9b0b3c13f5
7 changed files with 137 additions and 169 deletions
|
|
@ -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)]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue