gseaplot() function of clusterProfiler went wrong
0
0
Entering edit mode
@giuseppe0525-14327
Last seen 6.1 years ago

Hello, everyone!

1.

I got the error 'Error in if absmax.ES) > absmin.ES)) { :  

missing value where TRUE/FALSE needed' 

when running gseaplot() to visualize the GSEA result.

 

2.

I run the code 'gseaplot(gsea, geneSetID = "mmu03013")'  where gsea is a gseaResult object. The class of gsea is shown as followed:

> class(gsea)
[1] "gseaResult"
attr(,"package")
[1] "DOSE"

The object gsea is created with the GSEA() function, in which geneList(t_isc24) is derived from MArrayLM object using limma package, and TERM2GENE(pathway) is created based on EnrichmentBrowser package. The related codes are shown below:

 

## create pathway

library(EnrichmentBrowser)

gs <- get.kegg.genesets("mmu")

 

$`mmu00020_Citrate_cycle_(TCA_cycle)`
 [1] "104112" "11428"  "11429"  "12974"  "13382"  "14194"  "15926"  "15929"  "170718" "17448"  "17449"  "18293"  "18534"  "18563"  "18597" 
[16] "18598"  "20916"  "20917"  "235339" "239017" "243996" "269951" "56451"  "66052"  "66925"  "66945"  "67680"  "67834"  "68263"  "71832" 
[31] "74551"  "78920

...

> class(gs)
[1] "list"

...

> class(pathway)
[1] "matrix"
  

 

## create t_isc24

library(limma)

probeID <- rownames(ischemic_ebFit$t)
head(probeID)

gene_id_t <- getEG(probeID, "mouse430a2")


colnames(ischemic_ebFit$contrasts)
head(ischemic_ebFit$t)

> head(ischemic_ebFit$t)
              Contrasts
               sham24h_ischemia24h
  1415670_at             -2.400054
  1415671_at             -1.196139
  1415672_at              3.523950
  1415673_at              2.581356
  1415674_a_at           -1.942669
  1415675_at             -3.272687


t_isc24 <- ischemic_ebFit$t[,"sham24h_ischemia24h"]
names(t_isc24) <- gene_id_t
t_isc24 <- sort(t_isc24, decreasing = TRUE)

> class(t_isc24)
[1] "numeric

> head(t_isc24)
   16878    20310    67951    14579    17392     <NA> 
44.58554 28.30740 27.52500 27.31784 26.72206 26.26859 

## GSEA

gsea <- GSEA(geneList = t_isc24, 
     exponent = 1, 
     nPerm = 1000, 
     minGSSize = 10,
     maxGSSize = 1000, 
     pvalueCutoff = 0.05, 
     pAdjustMethod = "BH", 
     TERM2GENE = pathway,
     TERM2NAME = NA, 
     verbose = TRUE, 
     seed = FALSE, 
     by = "fgsea")

 

3.

However, I run the gseaplot() function with another gsearesults object derived from gsekegg() function and it actually worked.

gsekegg <- gseKEGG(t_isc24, organism = "mmu", 
                   keyType = "ncbi-geneid", 
                   exponent = 1,
        nPerm = 1000, 
        minGSSize = 10, 
        maxGSSize = 1000, 
        pvalueCutoff = 0.05,
        pAdjustMethod = "BH", 
        verbose = TRUE, 
        use_internal_data = FALSE,
        seed = FALSE, 
        by = "fgsea")

> class(gsekegg)
[1] "gseaResult"
attr(,"package")
[1] "DOSE"

 

A plot was returned when running gseaplot(gsekegg, geneSetID = "mmu03013").

 

I really appreciate your kindness if you can offer some suggestion on this problem.

 

 

gsea clusterprofiler • 2.8k views
ADD COMMENT
0
Entering edit mode

As 'Language "ca" is not one of the supported languages ['en']!' , I cannot list some objects mentioned above.

ADD REPLY

Login before adding your answer.

Traffic: 739 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6