This is a test version of Biostars. For the public version, visit https://www.biostars.org.
gseKEGG - no gene can be mapped (RNAseq analysis)

Hi all,

I have been trying to extract the GSEA results from a list of genes after RNAseq analysis. It looks like my gseKEGG function is giving me problems. I am unable to generate a list of KEGG terms, it seems as my list of genes can't be mapped.

Could you help me please?

res_entrez <- dplyr::filter(res_ids, entrezid != "NA")
res_entrez <- res_entrez[which(duplicated(res_entrez$entrezid) == F), ]
foldchanges <- res_entrez$log2FoldChange
names(foldchanges) <- res_entrez$entrezid
foldchanges <- sort(foldchanges, decreasing = TRUE)
set.seed(123456)
gseaKEGG <- gseKEGG(geneList = foldchanges,
                organism = "mmu",
                nPerm = 1000,
                minGSSize = 20,
                pvalueCutoff = 0.05,
                verbose = FALSE)

I obtain the error message:

enter image description here

Here is what my "res_entrez" object looks like

enter image description here

rnaseq cluster-profiler kegg gsea
foldchanges <- res_entrez$log2FoldChange
..
..
gseaKEGG <- gseKEGG(geneList = foldchanges, ..

That doesn't make sense to me. I don't know the gseaKEGG function at all, but common sense dictates that geneList cannot be a vector of foldChange values.

I was basically trying to create a vector of foldchange values but with entrezID as name for each value.

Yes but then you'll need to set geneList to names(foldchanges), not foldchanges, no?

What does head(foldchanges) give you?

I also tried the test with DOSE package, it seems to work and the geneList seems similar.

data(geneList, package="DOSE")
kk2 <- gseKEGG(geneList     = geneList,
           organism     = 'hsa',
           minGSSize    = 120,
           pvalueCutoff = 0.05,
           verbose      = FALSE)
head(geneList)

My previous code:

gseaKEGG_sex <- gseKEGG(geneList = foldchanges_sex,
                    organism = "mmu",
                    keyType = 'ncbi-geneid',
                    nPerm = 1000,
                    minGSSize = 20,
                    pvalueCutoff = 0.05,
                    verbose = FALSE)

Here is what head of both geneList gives me enter image description here

You realize I'm not there debugging, right? What is foldchages_sex? Your previous code was not using that variable.

What happens when you provide gseKegg(geneList = c(18054, 219158, 54610), ...?

Hi, I remember gseKEGG has a parameter that can specify the gene name type(entrez, symbol..).

1 answer

I got my answer from someone on bioconductor support : https://support.bioconductor.org/p/9149905/#9149918

Basically, I had to uninstall the package and install it again via the devtools function (GitHub page).

Log in to answer this question.