Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in enrichGO,when seting ont = "ALL",Error in data.frame(..., check.names = FALSE) : 行名里有缺失值。 #713

Open
XIANZHE-LI opened this issue Aug 6, 2024 · 1 comment

Comments

@XIANZHE-LI
Copy link

go <- enrichGO(gene = id,
#universe = names(geneList),#背景基因
OrgDb = "org.Mm.eg.db",
ont = "ALL",#"BP", "MF", "CC"
pAdjustMethod = "BH",
pvalueCutoff = 0.5,
qvalueCutoff = 0.5,
readable = TRUE)
Error in data.frame(..., check.names = FALSE) : 行名里有缺失值

but, running "BP", "MF",or "CC" separately, they all success.

R 4.4.0
clusterprofiler 4.12.2

@guidohooiveld
Copy link

guidohooiveld commented Aug 16, 2024

It is working in my hands with the example code. See below.

I noticed you are indeed using the latest version of clusterProfiler (i.e. 4.12.2), but maybe your Bioconductor installation is not yet up-to-date. Note the version of the GO.db library (3.19.1).

Therefore I recommend to update your complete Bioconductor installation (to version 3.19); in a fresh R session run: BiocManager::install(version = "3.19")

> library(clusterProfiler)
> library(org.Hs.eg.db)
> 
> data(geneList, package="DOSE")
> gene <- names(geneList)[abs(geneList) > 2]
> 
> 
> ego <- enrichGO(gene          = gene,
+                 universe      = names(geneList),
+                 OrgDb         = org.Hs.eg.db,
+                 ont           = "ALL",
+                 pAdjustMethod = "BH",
+                 pvalueCutoff  = 0.01,
+                 qvalueCutoff  = 0.05,
+                 readable      = TRUE)
> 
> ego
#
# over-representation test
#
#...@organism    Homo sapiens 
#...@ontology    GOALL 
#...@keytype     ENTREZID 
#...@gene        chr [1:207] "4312" "8318" "10874" "55143" "55388" "991" "6280" "2305" ...
#...pvalues adjusted by 'BH' with cutoff <0.01 
#...152 enriched terms found
'data.frame':   152 obs. of  10 variables:
 $ ONTOLOGY   : chr  "BP" "BP" "BP" "BP" ...
 $ ID         : chr  "GO:0098813" "GO:0000070" "GO:0000819" "GO:0140014" ...
 $ Description: chr  "nuclear chromosome segregation" "mitotic sister chromatid segregation" "sister chromatid segregation" "mitotic nuclear division" ...
 $ GeneRatio  : chr  "34/197" "28/197" "30/197" "32/197" ...
 $ BgRatio    : chr  "238/11586" "152/11586" "185/11586" "224/11586" ...
 $ pvalue     : num  3.73e-22 1.91e-21 3.02e-21 7.01e-21 7.30e-21 ...
 $ p.adjust   : num  1.12e-18 2.88e-18 3.03e-18 4.40e-18 4.40e-18 ...
 $ qvalue     : num  1.03e-18 2.65e-18 2.79e-18 4.05e-18 4.05e-18 ...
 $ geneID     : chr  "CDCA8/CDC20/KIF23/CENPE/MYBL2/CCNB2/NDC80/TOP2A/NCAPH/ASPM/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/TACC3/NEK2/CDK1/MAD2L1"| __truncated__ "CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/NEK2/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF1"| __truncated__ "CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/TOP2A/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/TACC3/NEK2/CDK1/MAD2L1/KIF18A/CDT"| __truncated__ "CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/NEK2/UBE2S/CDK1/MAD2L1/KIF18A/CDT1/BIRC"| __truncated__ ...
 $ Count      : int  34 28 30 32 37 37 38 23 39 37 ...
#...Citation
 T Wu, E Hu, S Xu, M Chen, P Guo, Z Dai, T Feng, L Zhou, W Tang, L Zhan, X Fu, S Liu, X Bo, and G Yu.
 clusterProfiler 4.0: A universal enrichment tool for interpreting omics data.
 The Innovation. 2021, 2(3):100141 

> head(as.data.frame(ego))
           ONTOLOGY         ID                          Description GeneRatio
GO:0098813       BP GO:0098813       nuclear chromosome segregation    34/197
GO:0000070       BP GO:0000070 mitotic sister chromatid segregation    28/197
GO:0000819       BP GO:0000819         sister chromatid segregation    30/197
GO:0140014       BP GO:0140014             mitotic nuclear division    32/197
GO:0007059       BP GO:0007059               chromosome segregation    37/197
GO:0000280       BP GO:0000280                     nuclear division    37/197
             BgRatio       pvalue     p.adjust       qvalue
GO:0098813 238/11586 3.730986e-22 1.124892e-18 1.034858e-18
GO:0000070 152/11586 1.909540e-21 2.878631e-18 2.648230e-18
GO:0000819 185/11586 3.017475e-21 3.032563e-18 2.789841e-18
GO:0140014 224/11586 7.008600e-21 4.403280e-18 4.050849e-18
GO:0007059 319/11586 7.302289e-21 4.403280e-18 4.050849e-18
GO:0000280 327/11586 1.726930e-20 8.677821e-18 7.983262e-18
                                                                                                                                                                                                                                 geneID
GO:0098813                     CDCA8/CDC20/KIF23/CENPE/MYBL2/CCNB2/NDC80/TOP2A/NCAPH/ASPM/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/TACC3/NEK2/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/TRIP13/PRC1/KIFC1/KIF18B/AURKA/CCNB1/KIF4A/PTTG1
GO:0000070                                                        CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/NEK2/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/TRIP13/PRC1/KIFC1/KIF18B/CCNB1/KIF4A
GO:0000819                                            CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/TOP2A/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/TACC3/NEK2/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/TRIP13/PRC1/KIFC1/KIF18B/CCNB1/KIF4A
GO:0140014                                 CDCA8/CDC20/KIF23/CENPE/MYBL2/NDC80/NCAPH/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/NEK2/UBE2S/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/CHEK1/TRIP13/PRC1/KIFC1/KIF18B/AURKA/CCNB1/KIF4A/BMP4
GO:0007059   CDCA8/CDC20/KIF23/CENPE/MYBL2/CCNB2/NDC80/TOP2A/NCAPH/ASPM/DLGAP5/UBE2C/HJURP/SKA1/NUSAP1/TPX2/TACC3/NEK2/CENPM/CENPN/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/TRIP13/PRC1/KIFC1/KIF18B/AURKA/CCNB1/KIF4A/PTTG1
GO:0000280 CDCA8/CDC20/KIF23/CENPE/MYBL2/CCNB2/NDC80/TOP2A/NCAPH/ASPM/DLGAP5/UBE2C/SKA1/NUSAP1/TPX2/NEK2/RAD51AP1/UBE2S/CDK1/MAD2L1/KIF18A/CDT1/BIRC5/KIF11/TTK/NCAPG/AURKB/CHEK1/TRIP13/PRC1/KIFC1/KIF18B/AURKA/CCNB1/KIF4A/PTTG1/BMP4
           Count
GO:0098813    34
GO:0000070    28
GO:0000819    30
GO:0140014    32
GO:0007059    37
GO:0000280    37
> 
> 
> packageVersion("clusterProfiler")
[1] ‘4.12.2’
> packageVersion("GO.db")
[1] ‘3.19.1’
> 
> 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants