Skip to content

Commit

Permalink
bump to version 0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhimingYe committed Dec 24, 2024
1 parent a5a3754 commit cc182da
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 85 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: EnrichGT
Title: EnrichGT - all in one enrichment analysis soluction
Version: 0.6.0.1
Version: 0.7.0
Author: Zhiming Ye
Maintainer: Zhiming Ye <[email protected]>
Description: Do biological enrichment analysis and parsing and clustering
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export(database_progeny_mouse)
export(egt_compare_groups)
export(egt_enrichment_analysis)
export(egt_gsea_analysis)
export(egt_infer)
export(egt_infer_act)
export(egt_plot_results)
export(egt_plot_umap)
export(egt_recluster_analysis)
Expand Down
1 change: 1 addition & 0 deletions R/cp_helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ egt_gsea_analysis_internal <- function(genes,database,p_val_cut_off=0.5,min_gene
db0 <- database[,c(1,2)]
database <- database[,c(2,3)]
}else{
colnames(database)[1] <- "term"
db0 <- data.frame(ID = database$term, term = database$term)
}
db0 <- db0 |> dplyr::mutate(CheckDup = paste0(ID,term)) |> dplyr::filter(!duplicated(CheckDup)) |> dplyr::select(-CheckDup) |> dplyr::rename(pathway = term) # Because of output is pathway
Expand Down
7 changes: 5 additions & 2 deletions R/infAct.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#' [PROGENy](https://saezlab.github.io/progeny/) is a comprehensive resource containing a curated collection of pathways and their target genes, with weights for each interaction.
#'
#'[CollecTRI](https://github.com/saezlab/CollecTRI) is a comprehensive resource containing a curated collection of TFs and their transcriptional targets compiled from 12 different resources. This collection provides an increased coverage of transcription factors and a superior performance in identifying perturbed TFs compared to our previous.
#'
#' If when doing re-enrichment, you select a high number of clusters, that may cause low gene number in each meta-gene module, and then can't be infered sucessfully. So if result is empty, please increase the number of re-clustering when doing it.
#'
#' @param x an EnrichGT_obj object.
#' @param DB can be "progeny" (the Pathway activity database), or "collectri" (TF activity database)
Expand All @@ -15,10 +17,11 @@
#' @importFrom stringr str_to_title
#' @author Zhiming Ye, Saez-Rodriguez Lab (The decoupleR package, https://saezlab.github.io/decoupleR/)
#'
egt_infer <- function(x,DB="collectri",species="human"){
egt_infer_act <- function(x,DB="collectri",species="human"){
genelist <- tryCatch(x@gene_modules,error=function(e){
cli::cli_abort("NOT an enrichGT object. ")
})
InferedCpres <- doEnrich(genelist,p_val_cut_off = 1 ,min_geneset_size=2,max_geneset_size=1000,database=(dbParser(DB,species)))
cli::cli_alert_warning("If when doing re-enrichment, you select a high number of clusters, that may cause low gene number in each meta-gene module, and then can't be infered sucessfully. So if result is empty, please increase the number of re-clustering when doing it. ")
InferedCpres <- egt_enrichment_analysis(genelist,p_val_cut_off = 1 ,min_geneset_size=2,max_geneset_size=1000,database=(dbParser(DB,species)))
return(InferedCpres)
}
16 changes: 9 additions & 7 deletions R/kegg.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
#' @export
#'
#' @rdname KEGGhelp
database_kegg_show_organism <- function(){
x <- read.delim("https://rest.kegg.jp/list/organism",quote = "\t",header = F)
return(x)
}

keggModuleList <- function(orgkegg){
k0<-glue::glue("https://rest.kegg.jp/list/pathway/{orgkegg}")
Expand Down Expand Up @@ -107,3 +100,12 @@ database_kegg <- function(kegg_organism="hsa",OrgDB = org.Hs.eg.db,kegg_modules=

}



#' @export
#'
#' @rdname KEGGhelp
database_kegg_show_organism <- function(){
x <- read.delim("https://rest.kegg.jp/list/organism",quote = "\t",header = F)
return(x)
}
1 change: 1 addition & 0 deletions R/ora.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ doEnrich_Internal <- function(genes,database,p_adj_methods,p_val_cut_off,backgro
db0 <- database[,c(1,2)]
database <- database[,c(2,3)]
}else{
colnames(database)[1] <- "term"
db0 <- data.frame(ID = database$term, term = database$term)
}
db0 <- db0 |> dplyr::mutate(CheckDup = paste0(ID,term)) |> dplyr::filter(!duplicated(CheckDup)) |> dplyr::select(-CheckDup) |> dplyr::rename(TERMs = term)
Expand Down
8 changes: 4 additions & 4 deletions man/KEGGhelp.Rd

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

8 changes: 5 additions & 3 deletions man/egt_infer.Rd → man/egt_infer_act.Rd

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

67 changes: 0 additions & 67 deletions news.md

This file was deleted.

0 comments on commit cc182da

Please sign in to comment.