mirror of
https://github.com/johrpan/geposan.git
synced 2025-10-26 18:57:25 +01:00
Properly access distance data
This commit is contained in:
parent
c0a1d965d7
commit
21a5817988
5 changed files with 12 additions and 18 deletions
|
|
@ -1,12 +1,12 @@
|
|||
# Compute the mean correlation coefficient comparing gene distances with a set
|
||||
# of reference genes.
|
||||
correlation <- function(distances, preset, progress = NULL) {
|
||||
correlation <- function(preset, progress = NULL) {
|
||||
species_ids <- preset$species_ids
|
||||
gene_ids <- preset$gene_ids
|
||||
reference_gene_ids <- preset$reference_gene_ids
|
||||
|
||||
# Prefilter distances by species.
|
||||
distances <- distances[species %chin% species_ids]
|
||||
distances <- geposan::distances[species %chin% species_ids]
|
||||
|
||||
# Tranform data to get species as rows and genes as columns. We construct
|
||||
# columns per species, because it requires fewer iterations, and transpose
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue