This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gene Enrichment

Hi Everyone ı am trying to do enrichment. In my recent post ı meantionedGene enrichment analysis R studio error about first error that ı accrossed. I tide over it by import gmt file rstudio manually.

library(readr)
c7_all_v7_1_entrez <- read_table2("~/workspace1/rnaseq/gene_enrichment/c7.all.v7.1.entrez.gmt", 
    col_names = FALSE)
library(readr)
c6_all_v7_1_entrez <- read_table2("~/workspace1/rnaseq/gene_enrichment/c7.all.v7.1.entrez.gmt", 
    col_names = FALSE)

But ı got errors in following steps so ı amnot sure ı completely overcome first error or It causes to error in following steps.So ı need recomment.

myEntrezIdList<- c(4744, 5816, 27286, 94121, 4741, 441631, 3736,9173, 22987, 4142, 6279, 127833, 2840, 56999, 91683, 5122, 2828, 9021, 100192386, 2316, 6134)

ImmunSigEnrich <- enricher(myEntrezIdList,TERM2GENE=c6, pvalueCutoff = 0.01) Error in path2gene[[2]] : subscript out of bounds

ImmunSigEnrich <- setReadable(ImmunSigEnrich, OrgDb = org.Hs.eg.db, keyType = "ENTREZID") Error in is(x, "enrichResult") : object 'ImmunSigEnrich' not found

thank you

rstudio enrichment readgmt gene

Fix typos in your question and be more specific, in the title yet in the question itself.

1 answer

There's no need to import two times the same library. Do not overpost: rather ask a more detailed question. Read your gmt file using read.gmt() function of clusterProfiler and pass the element to the TERM2GENE parameter in enricher function. Read the clusterProfiler documentation for more.

Log in to answer this question.