I like to study the distribution of the genes annotated to a GO term of interest. One that is significant enriched in my topGO analysis and for that i use the showGroupDensity function. But I get the following error:
print(showGroupDensity(GOdataUP, goID, ranks = F))
Error in print(showGroupDensity(GOdataUP, goID, ranks = F)) :
error in evaluating the argument 'x' in selecting a method for function 'print': Error in factor(group, labels = paste(c("complementary", whichGO), " (", :
invalid 'labels'; length 2 should be 1 or 0
Can some one help me understand the source of this error?
This is my script:
#####resTable is an object with the result of DESeq2 differential expression analysis
algPvalue <-resTable$padj;
names(algPvalue) <- rownames(resTable);
algPvalue <- algPvalue[names(algUP)];
#### algUP is a vector that contain 10,000 genes (background genes and significant genes)
topDiffGenes <- function(algPvalue){
return(algPvalue < 0.05)
}
GOdataUP <- new( "topGOdata", ontology="BP", allGenes = algUP, geneSel = topDiffGenes, nodeSize=5, annot=annFUN.org, mapping="org.Hs.eg.db", ID = "SYMBOL" )
goID <- topGOResultsUp[80, "GO.ID"]
print(showGroupDensity(GOdataUP, goID, ranks = F))

What happen if you don't use the print(...), do you gt the same error? Which version of topGO are you using?