gravatar for ig.yakunin

2 hours ago by

Hi all,

I'm trying to perform GO enrichment analysis from MS-MS data and seem to have an issue with the topGO function.

#generating gene2GO mapping
GOid <- mapIds(org.Hs.eg.db,GeneNames,"GO","SYMBOL",multiVals = "list")
#universal gene named vector with spectral counts
UnivesrsalGenes <- as.vector(MS$Counts)
names(UniversalGenes) <- MS$GeneNames
#geneselectionfunction
top100 <- function(x) {
return(tail(sort(x),100))
}
GOdata <- new("topGOdata", ontology = "MF", allGenes = UniversalGenes, geneSel = top100, annot = annFUN.gene2GO, gene2GO = GOid, nodesSize =5)

For some reason the selection function does not work within the "new" function. As a result all of my genes are considered significant instead of the top 100. when I apply the top100 function to the universal gene vector by itself it works fine so I'm not sure what is going wrong.

Any help would be appreciated.

link

modified 1 hour ago

written
2 hours ago
by

ig.yakunin0



Source link