gseGO by fold-change returns errors
1
2
Entering edit mode
22 months ago
Alex To ▴ 30

I want to gseGO() provided by clusterProfiler R package. My gene list is the unregulated markers from a cluster generated by UMAP. The number is log2 fold change.

str(head(cluster7.genes))
Named num [1:6] 2.14 1.81 1.76 1.71 1.67 ...
- attr(*, "names")= chr [1:6] "10082" "9353" "53353" "55553" ...

cluster7.enriched <- gseGO(geneList = cluster7.genes, OrgDb = org.Hs.eg.db,  keyType = "ENTREZID", ont = "BP", pvalueCutoff = 1, verbose = FALSE)

Warning messages:
1: In preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam,  :
  There are duplicate gene names, fgsea may produce unexpected results.
2: In preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam,  :
  All values in the stats vector are greater than zero and scoreType is "std", maybe you should switch to scoreType = "pos".

But I don't know why it returns errors even when the pvalueCutoff is 1. Do I need to change scoreType to "pos" to solve this error? If so, how to do it since I can't see any relevant parameters available in gseGO() for me to change? Thanks.

enter image description here

GO RNA-seq R • 2.1k views
ADD COMMENT
3
Entering edit mode
22 months ago
mark.ziemann ★ 1.9k

It has given you a warning message, not an error. You should take a look at the contents of cluster7.enriched to see if it has yielded any results.

When doing a preranked GSEA like this, the inputs are generally a mixture of up and down regulated genes, so there will be positive and negative numbers. Some folks like to use the log fold changes as input. I like to use the DESeq test statistic.

Also it looks as though you have duplicate gene names. This could be a problem and it is best to explicitly resolve this before GSEA. Some approaches used are to take the mean of duplicate genes, or just keep the entry with the most extreme value.

ADD COMMENT
1
Entering edit mode

You are right. I obtained the gene list based on the filter "log2 fold change > 0.25", so my gene list has only positive value. Now that when I remove the filter to obtain the gene list again, as my gene list contains negative value, it works now.

Thanks so much.

ADD REPLY
1
Entering edit mode

Alex To : Please accept this answer (green check mark) to provide closure to this thread.

ADD REPLY

Login before adding your answer.

Traffic: 1476 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