From 37ce4b7bdaf8b90911500a459130cbd003606b12 Mon Sep 17 00:00:00 2001 From: bnanes Date: Mon, 27 Apr 2020 17:26:52 -0500 Subject: [PATCH] Fix selection of duplicate probe sets Fixes the rare situation of two probe sets mapped to the same gene with the same mean expression --- R/egseaMain.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/egseaMain.R b/R/egseaMain.R index 5da9b03..8102cd2 100755 --- a/R/egseaMain.R +++ b/R/egseaMain.R @@ -758,7 +758,7 @@ mapProbesIntoEntrezIDs <- function(elist, probe.annot, probeMap.method){ # APPROACH 5: IQR (used in Agilent's GeneSpring) exprs = sapply(1:length(reps), function(x) IQR(elist$E[reps[x], ])) - sel = c(sel, reps[which(max(exprs) == exprs)]) + sel = c(sel, reps[which(max(exprs) == exprs)][1]) }else sel = c(sel, reps) } @@ -795,4 +795,4 @@ mapProbesIntoEntrezIDs <- function(elist, probe.annot, probeMap.method){ ## Create test units, type inside the EGSEA directory -# devtools::use_testthat() \ No newline at end of file +# devtools::use_testthat()