Skip to content

Commit

Permalink
Use the Rfast package for distance in coranking
Browse files Browse the repository at this point in the history
Also bump memory requirement
  • Loading branch information
lazappi committed Oct 9, 2024
1 parent 791c6f6 commit 42b4b32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/metrics/coranking/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ engines:
- type: r
cran:
- coRanking
- Rfast
runners:
- type: executable
- type: nextflow
directives:
label: [hightime, lowmem, lowcpu]
label: [hightime, midmem, lowcpu]
4 changes: 2 additions & 2 deletions src/metrics/coranking/script.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if (any(is.na(X_emb))) {
# TODO: computing a square distance matrix is problematic for large datasets!
# TODO: should we use a different distance metric for the high_dim?
# TODO: or should we subset to the HVG?
dist_highdim <- coRanking:::euclidean(as.matrix(high_dim))
dist_emb <- coRanking:::euclidean(as.matrix(X_emb))
dist_highdim <- Rfast::Dist(as.matrix(high_dim))
dist_emb <- Rfast::Dist(as.matrix(X_emb))

message("Compute ranking matrices")
rmat_highdim <- rankmatrix(dist_highdim, input = "dist")
Expand Down

0 comments on commit 42b4b32

Please sign in to comment.