Skip to content

Commit

Permalink
Merge pull request #23 from EinarBaldvin/eb_dev_rrvgo
Browse files Browse the repository at this point in the history
Fixed hardcoding of column names in getGoSize function.
  • Loading branch information
ssayols authored Mar 11, 2024
2 parents b51ecb7 + eae9603 commit 4f2ab8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/rrvgo.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ getGoSize <- function(terms, orgdb, keytype, children) {
go <- AnnotationDbi::select(orgdb, keytype=if(children) "GOALL" else "GO", keys=terms, columns=keytype)

# count
counts <- tapply(go$ENTREZID, go$GO, function(x) length(unique(x)))
counts <- tapply(go[[keytype]], go[[if(children) "GOALL" else "GO"]], function(x) length(unique(x)))
empty <- terms[!(terms %in% names(counts))]
nocounts <- setNames(rep(0, length(empty)), empty)

Expand Down

0 comments on commit 4f2ab8a

Please sign in to comment.