I am having trouble getting topGO to with with my data. It has something to due with my GO terms being in an inverse order, but from what I can tell that really shouldn't be an issue.
Anyone encounter this problem before? Below is the code and error associated with it.
geneID2GO <- readMappings(file = "aust_GO.txt") GO2geneID <- inverseList(geneID2GO) str(head(GO2geneID)) List of 6 $ GO:0000002: chr [1:2] "Caust.v2_007320" "Caust.v2_019771" $ GO:0000003: chr "Caust.v2_016664" $ GO:0000012: chr "Caust.v2_020298" $ GO:0000014: chr "Caust.v2_001917" $ GO:0000015: chr [1:2] "Caust.v2_001229" "Caust.v2_021398" $ GO:0000022: chr [1:5] "Caust.v2_000558" "Caust.v2_002098" "Caust.v2_002701" "Caust.v2_010710" ... geneUniverse <- names(GO2geneID) head(GO2geneID) $
GO:0000002
[1] "Caust.v2_007320" "Caust.v2_019771"
$GO:0000003
[1] "Caust.v2_016664"
$GO:0000012
[1] "Caust.v2_020298"
$GO:0000014
[1] "Caust.v2_001917"
$GO:0000015
[1] "Caust.v2_001229" "Caust.v2_021398"
$GO:0000022
[1] "Caust.v2_000558" "Caust.v2_002098" "Caust.v2_002701" "Caust.v2_010710" "Caust.v2_019642"
genesOfInterest <- read.table("GO_MB1.txt",header=FALSE) genesOfInterest <- as.vector(genesOfInterest$V2) geneList <- factor(as.integer(geneUniverse %in% genesOfInterest)) names(geneList) <- geneUniverse str(geneList) Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ... - attr(*, "names")= chr [1:3327] "GO:0000002" "GO:0000003" "GO:0000012" "GO:0000014" ... myGOdata <- new("topGOdata", description="My project", ontology="BP", allGenes=geneList, annot = annFUN.GO2genes, GO2gene = GO2geneID)
Building most specific GOs ..... ( 0 GO terms found. )
Build GO DAG topology .......... ( 0 GO terms and 0 relations. ) Error in if is.na(index) || index < 0 || index > length(nd)) stop("vertex is not in graph: ", : missing value where TRUE/FALSE needed
Thanks, Mike