Skip to content

Commit

Permalink
Merge pull request #290 from huerqiang/master
Browse files Browse the repository at this point in the history
Change the download method for KEGG data
  • Loading branch information
GuangchuangYu authored Sep 8, 2020
2 parents 389a814 + f999ab1 commit 604b2d5
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: clusterProfiler
Type: Package
Title: statistical analysis and visualization of functional profiles for
genes and gene clusters
Version: 3.17.1
Version: 3.17.2
Authors@R: c(
person(given = "Guangchuang", family = "Yu", email = "[email protected]", role = c("aut", "cre", "cph"), comment = c(ORCID = "0000-0002-6485-8781")),
person(given = "Li-Gen", family = "Wang", email = "[email protected]", role = "ctb"),
Expand Down
4 changes: 2 additions & 2 deletions R/enricher.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##'
##' @title enricher
##' @param gene a vector of gene id
##' @param pvalueCutoff pvalue cutoff on enrichment tests to report
##' @param pvalueCutoff adjusted pvalue cutoff on enrichment tests to report
##' @param pAdjustMethod one of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"
##' @param universe background genes. If missing, the all genes listed in the database (eg TERM2GENE table) will be used as background.
##' @param minGSSize minimal size of genes annotated for testing
Expand Down Expand Up @@ -44,7 +44,7 @@ enricher <- function(gene,
##' @param minGSSize minimal size of each geneSet for analyzing
##' @param maxGSSize maximal size of genes annotated for testing
##' @param eps This parameter sets the boundary for calculating the p value.
##' @param pvalueCutoff pvalue cutoff
##' @param pvalueCutoff adjusted pvalue cutoff
##' @param pAdjustMethod p value adjustment method
##' @param TERM2GENE user input annotation of TERM TO GENE mapping, a data.frame of 2 column with term and gene
##' @param TERM2NAME user input of TERM TO NAME mapping, a data.frame of 2 column with term and name
Expand Down
9 changes: 8 additions & 1 deletion R/kegg-utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,15 @@ kegg_rest <- function(rest_url) {

message("Reading KEGG annotation online:\n" )
f <- tempfile()
dl <- tryCatch(downloader::download(rest_url, destfile = f, quiet = TRUE),
## dl <- tryCatch(downloader::download(rest_url, destfile = f, quiet = TRUE),
if (capabilities("libcurl")) {
dl <- tryCatch(utils::download.file(rest_url, destfile = f, quiet = TRUE, method = "libcurl"),
error = function(e) NULL)
} else {
dl <- tryCatch(downloader::download(rest_url, destfile = f, quiet = TRUE),
error = function(e) NULL)
}

if (is.null(dl)) {
message("fail to download KEGG data...")
return(NULL)
Expand Down
2 changes: 1 addition & 1 deletion man/GSEA.Rd

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

2 changes: 1 addition & 1 deletion man/enrichDAVID.Rd

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

2 changes: 1 addition & 1 deletion man/enrichGO.Rd

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

2 changes: 1 addition & 1 deletion man/enrichKEGG.Rd

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

2 changes: 1 addition & 1 deletion man/enrichMKEGG.Rd

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

2 changes: 1 addition & 1 deletion man/enricher.Rd

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

0 comments on commit 604b2d5

Please sign in to comment.