Skip to content

Commit

Permalink
data.table style foldEnrichment calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
assaron committed Jul 11, 2024
1 parent 7954215 commit eea285e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/fgseaORA.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fora <- function(pathways, genes, universe, minSize=1, maxSize=length(universe)-
n=length(universe)-sapply(pathwaysFiltered, length),
k=length(genesFiltered))

overlapsT$es=(overlapsT$q/overlapsT$k)/(overlapsT$m/length(universe))
overlapsT[, es := (q/k)/(m/length(universe))]

# q-1 because we want probability of having >=q white balls
pathways.pvals <- with(overlapsT,
Expand Down

0 comments on commit eea285e

Please sign in to comment.