Open justannwska opened 3 years ago
A bit late, but, in case anyone else runs into this issue, the problem is that TERM2GENE
is expected to be a two-column dataframe, and not a list of genes as one might get from calling geneIds(getGmt("input.gmt"))
:
TERM2GENE: user input annotation of TERM TO GENE mapping, a data.frame of 2 column with term and gene.
I'm not sure if this has always been the case, or if the behavior changed in a recent version, but, it's something to be aware of.
To convert a list such as the above to a dataframe in the proper format, one can do:
stack(gene_set_lst)[c(2, 1)]
Hello,
I was trying to use enricher function with MSigDB .gmt gene symbols (c2.cp.kegg.v7.2.symbols.gmt) However I'm getting this error: 'rror in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 62, 31, 27, 28, 34, 26, 25, 42, 17, 16, 55, 132, 159, 98, 32, 44, 11, 54, 29, 18, 40, 22, 10, 50, 52, 46, 30, 21, 15, 49, 77, 33, 58, 19, 39, 14, 24, 64, 41, 23, 13, 70, 72, 51, 88, 59, 35, 36, 127, 69, 267, 87, 178, 265, 189, 76, 272, 125, 113, 68, 135, 38, 121, 181, 78, 79, 115, 151, 47, 56, 86, 129, 199, 84, 133, 73, 90, 102, 71, 155, 137, 108, 75, 96, 116, 48, 126, 389, 213, 101, 85, 67, 43, 166, 130, 53, 182, 325, 65, 89, 57, 139, 37, 83, 74'
Could you help me to understand the issue? Thank you!
Here is my code egmt = clusterProfiler::enricher(gene = sigGenes$hgnc_symbol, TERM2GENE = KEGG, universe = universe$hgnc_symbol, minGSSize=5, maxGSSize =1000)
Structure of my TERM2GENE str(KEGG) List of 186 $ KEGG_GLYCOLYSIS_GLUCONEOGENESIS : chr [1:62] "ACSS2" "GCK" "PGK2" "PGK1" ... $ KEGG_CITRATE_CYCLE_TCA_CYCLE : chr [1:31] "IDH3B" "DLST" "PCK2" "CS" ... $ KEGG_PENTOSE_PHOSPHATE_PATHWAY : chr [1:27] "RPE" "RPIA" "PGM2" "PGLS" ... $ KEGG_PENTOSE_AND_GLUCURONATE_INTERCONVERSIONS : chr [1:28] "UGT1A10" "UGT1A8" "RPE" "UGT1A7" ...
sigGenes$hgnc_symbol [1] "EGR1" "RHOB" "ELF3" "FOS" "JUN"
universe contains all genes in my expression experiment