Entering edit mode
I am not able to retrieve my genes contributing to the GO term being enriched.
Code should be placed in three backticks as shown below
#this is my code
allRes <- GenTable(hs_topGOdata, classicFisher = resultFisher,
classicKS = resultFisher,
orderBy = "classicFisher", ranksOf = "classicKS", topNodes = 20)
allRes
# retrieve genes2GO list from the "expanded" annotation in GOdata
allGO = genesInTerm(hs_topGOdata)
allGO["GO:0051241"]
SAM_ANOTATION <- lapply(allGO,function(x) x[x %in% allGenes.hs] )
SAM_ANOTATION[["GO:0051241"]]
Everything runs fine and I get all the annotated genes which in my case for that term is 20 through allGO, however, I am unable to run the SAM_ANNOTATION function of lapply(), I am unsure if allGenes.hs is right. The allGene.hs is my named vector containing all of my genes and the p-values.
Please help