...
|
...
|
@@ -138,9 +138,10 @@ addAncestorGO <- function(go){
|
138
|
138
|
}
|
139
|
139
|
goID2Ancestor <- c(as.list(GOBPANCESTOR), as.list(GOMFANCESTOR),
|
140
|
140
|
as.list(GOCCANCESTOR))
|
141
|
|
- newGo <- lapply(relist(lapply(mapply(append, unlist(go),
|
142
|
|
- goID2Ancestor[unlist(go)]),
|
143
|
|
- function(x){x[x!="all"]}), go), unlist)
|
|
141
|
+ allGo <- unlist(go)
|
|
142
|
+ goID2Ancestor <- lapply(goID2Ancestor, function(x){x[x%in%allGo]})
|
|
143
|
+ newGo <- lapply(relist(mapply(append, allGo, goID2Ancestor[allGo]), go),
|
|
144
|
+ unlist)
|
144
|
145
|
newGo <- lapply(newGo, function(x){if(is.null(x)){character(0)}else{x}})
|
145
|
146
|
return(newGo)
|
146
|
147
|
}
|