mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 10:47:25 +01:00
ranking: Fix error copying the input
This commit is contained in:
parent
4dda7fa49e
commit
0e641e4dd2
1 changed files with 3 additions and 2 deletions
|
|
@ -30,10 +30,11 @@ ranking <- function(analysis, weights, min_n_species = 10) {
|
|||
|
||||
# Exclude genes with too few species.
|
||||
ranking <- analysis$results[
|
||||
genes_n_species[gene, n_species] >= min_n_species,
|
||||
.(score = 0.0)
|
||||
genes_n_species[gene, n_species] >= min_n_species
|
||||
]
|
||||
|
||||
ranking[, score := 0.0]
|
||||
|
||||
for (method in names(weights)) {
|
||||
weighted <- weights[[method]] * ranking[, ..method]
|
||||
ranking[, score := score + weighted]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue