Skip to content

Commit

Permalink
dpgsea
Browse files Browse the repository at this point in the history
  • Loading branch information
noriakis committed Feb 4, 2024
1 parent 8483edc commit 730f0c6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ License: GPL-3
Description: Analysis toolkit for intra-species diversity from metagenomics.
Authors@R: person("Noriaki", "Sato", email = "nori@hgc.jp", role = c("cre", "aut"))
Depends: ggplot2, ggstar, ggraph, igraph
Imports: GetoptLong, BiocFileCache, RCurl, igraph, vegan, methods, data.table, phangorn, RColorBrewer, ggtree, circlize, ComplexHeatmap, ggkegg, ape, dplyr, exactRankTests, ggblend, ggh4x, scales, tidygraph, ggplotify, ggtreeExtra, ggnewscale, scico
Imports: GetoptLong, BiocFileCache, RCurl, igraph, vegan, methods, data.table, phangorn, RColorBrewer, ggtree, circlize, ComplexHeatmap, ggkegg, ape, dplyr, exactRankTests, ggblend, ggh4x, scales, tidygraph, ggplotify, ggtreeExtra, ggnewscale, scico, MKmisc
Suggests: simplifyEnrichment, stringr, tidyr, Boruta, knitr, ggrepel
RoxygenNote: 7.3.0
VignetteBuilder: knitr
7 changes: 7 additions & 0 deletions R/doGSEA.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#'
#' @param zeroPerc genes >= the percentage of count zero sample will be excluded.
#' Default to zero, not recommended in GSEA
#' @importFrom MKmisc mod.t.test
#' @return GSEA results from clusterProfiler
#' @export
doGSEA <- function(stana, candSp=NULL, cl=NULL, eps=1e-2, how=mean,
Expand Down Expand Up @@ -47,6 +48,12 @@ doGSEA <- function(stana, candSp=NULL, cl=NULL, eps=1e-2, how=mean,
if (target!="pathway") {
url <- "https://rest.kegg.jp/link/ko/module"
}

bfc <- BiocFileCache()
path <- bfcrpath(bfc, url)

## Load, transparent and rasterize
magick_image <- image_read(path)

kopgsea <- data.frame(data.table::fread(url, header = FALSE, sep = "\t"))
if (target=="pathway") {
Expand Down
7 changes: 5 additions & 2 deletions man/doGSEA.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 730f0c6

Please sign in to comment.