Skip to content

Commit 4ae1cdf

Browse files
committed
fix issue. solution implemented
1 parent 7e62149 commit 4ae1cdf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/board.expression/R/expression_server.R

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,13 @@ ExpressionBoard <- function(id, pgx, labeltype = shiny::reactive("feature")) {
573573
if (is.null(sel.row)) {
574574
return(NULL)
575575
}
576+
577+
## determine which column to match with pgx$GMT
576578
gene1 <- res[sel.row, ]
577-
##gmt_gene_mapping <- ifelse(is.na(gene1$human_ortholog), gene1$symbol, gene1$human_ortholog)
578-
gmt_gene_mapping <- gene1$symbol, gene1$human_ortholog)
579+
match.res <- apply(res[,c("symbol","human_ortholog")],2,
580+
function(x) sum(x%in%rownames(pgx$GMT)))
581+
match.col <- names(which.max(match.res))
582+
gmt_gene_mapping <- gene1[,match.col]
579583
j <- which(rownames(pgx$GMT) == gmt_gene_mapping)
580584
if (length(j) == 0) {
581585
return(NULL)

0 commit comments

Comments
 (0)