clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

Error in if (abs(max.ES) > abs(min.ES)) { : missing value where TRUE/FALSE needed

Open zhenzhang2020 opened this issue 4 years ago • 10 comments

Hi,

I"m using your R package "clusterprofiler" for gsea, but i keep encountering error "Error in if (abs(max.ES) > abs(min.ES)) { : missing value where TRUE/FALSE needed" , i checked my genelist input and theres no NA value, would you please give some suggestions how to solve this problem? Thanks in advance!

zhenzhang2020 avatar Dec 15 '20 12:12 zhenzhang2020

@zhenzhang2020

Prerequisites

  • [ ] Have you read Feedback and follow the guide?
    • [ ] make sure your are using the latest release version
    • [ ] read the documents
    • [ ] google your quesion/issue

Describe you issue

  • [ ] Make a reproducible example (e.g. 1)
  • [ ] your code should contain comments to describe the problem (e.g. what expected and actually happened?)

Ask in right place

  • [ ] for bugs or feature requests, post here (github issue)
  • [ ] for questions, please post to Bioconductor or Biostars with tag clusterProfiler

huerqiang avatar Dec 15 '20 14:12 huerqiang

Dear all,

I am a newbie to bioinformatics, and am running into the same issue when doing GSEA as described in this tread. Now and then I will get the error message:

Error in if (abs(max.ES) > abs(min.ES)) { : missing value where TRUE/FALSE needed

However, this is despite that I have checked the geneList to ensure that there aren't any 0's with function any(geneList == 0) or any missing values with function anyNA(geneList). The problem comes when I make changes to the gene set (TERM2GENE) and goes away when I change the minGSSize parameter to a higher value, though this is undesirable for me. Do you guys have any idea as to how I can solve this issue?

Best, Rikki

Rikkiff avatar Jan 28 '21 13:01 Rikkiff

I also encountered this problem write like gseaplot2(NB_vs_EB_all.go.gsea, 96), no error, but when write like gseaplot2(NB_vs_EB_all.go.gsea, "response to stress"), it will say Error in if (abs(max.ES) > abs(min.ES)) { : missing value where TRUE/FALSE needed

feifengd avatar Jul 26 '21 16:07 feifengd

@feifengd Maybe you need to read our document: https://yulab-smu.top/biomedical-knowledge-mining-book/enrichplot.html

# It is OK
gseaplot2(edo2, geneSetID = 1:3)

# It is OK
gseaplot2(edo2, geneSetID = c("DOID:0050338", "DOID:3905"))

# It is WRONG
gseaplot2(edo2, geneSetID = "tuberculosis")

huerqiang avatar Jul 26 '21 16:07 huerqiang

Dear all,

I am a newbie to bioinformatics, and am running into the same issue when doing GSEA as described in this tread. Now and then I will get the error message:

Error in if (abs(max.ES) > abs(min.ES)) { : missing value where TRUE/FALSE needed

However, this is despite that I have checked the geneList to ensure that there aren't any 0's with function any(geneList == 0) or any missing values with function anyNA(geneList). The problem comes when I make changes to the gene set (TERM2GENE) and goes away when I change the minGSSize parameter to a higher value, though this is undesirable for me. Do you guys have any idea as to how I can solve this issue?

Best, Rikki

Hi Rikki,

Did you find out how to solve this problem?

Best.

GouQiao avatar Nov 17 '22 02:11 GouQiao

In my situation, there're too many Zero values in the geneList. Simply removing all 0s works for me.

leezx avatar Feb 20 '23 18:02 leezx

In my situation, there're too many Zero values in the geneList. Simply removing all 0s works for me.

This worked for me as well! 😃

felixm3 avatar Jan 28 '24 02:01 felixm3