I'm using topGO to get enriched GO terms from my data. I was able to succesful get the enriched GO terms, but, at the end of the pipeline, there are two commands throwing errors which I could not solve.
> tgd <- new( "topGOdata", ontology="BP", allGenes = alg, nodeSize=5, annot=annFUN.org, mapping="org.Mm.eg.db", ID = "ensembl" )
First error, when I try to plot the distribution of the genes annotated to a GO term
> print(showGroupDensity(object = tgd, whichGO = "GO:0015980", ranks = TRUE)) Error in factor(group, labels = paste(c("complementary", whichGO), " (", : invalid 'labels'; length 2 should be 1 or 0 >
Second error, when I try to get the genes in any GO id, I receive a error.
In the topGO manual, the chip argument is set to affyLib, but how can I use the mouse annotation instead? When I try it fails.
> gt <- printGenes(tgd, whichTerms = "GO:0015980", chip = org.Mm.eg.db, numChar = 10) Error in as.vector(x, "character") : cannot coerce type 'environment' to vector of type 'character'
Anyone with experience in using the topGO can help me out?