Search and filter and sort or summarize (compiled) enrichment output.

filter_enrichment(
  df,
  genes_input = "",
  genes_any_all = c("any", "all"),
  terms_query = "",
  terms_query_all_any = c("any", "all"),
  terms_antiquery = "",
  terms_antiquery_all_any = c("any", "all"),
  min_ngenes = 0,
  min_ngenes_input = 0,
  min_ngenes_signif = 0,
  min_abs_zscore = 0,
  min_pvalue_adjust = 0,
  max_ngenes = 1e+06,
  max_ngenes_input = 1e+06,
  max_ngenes_signif = 1e+06,
  max_abs_zscore = 1e+06,
  max_pvalue_adjust = 1
)

Arguments

df

enrichment output dataframe

genes_input

default: UI input/character vector of genes to select df terms for

genes_any_all

default: 'any', else 'all', use to define to take only specific terms containing any or all associated genes

terms_query

dfeault: UI input/character vector of keywords to match (grepl) term names

terms_query_all_any

default: 'any', else 'all', defines if terms should match any or all of the query keywords given

terms_antiquery

dfeault: UI input/character vector of keywords to NOT match (grepl) term names

terms_antiquery_all_any

default: 'any', else 'all', defines if terms should NOT match any or all of the query keywords given

min_ngenes

default: 0, set higher to filter terms with less n genes

min_ngenes_input

default: 0, else set higher to filter terms with less n input genes

min_ngenes_signif

default: 0, set higher to filter terms with less n significant genes

min_abs_zscore

default: 0, set higher to filter terms with less absolute zscore

min_pvalue_adjust

default: 0, set higher to filter terms with lower multiple testing corrected p-value

max_ngenes

default: 0, set lower to filter terms with more n genes

max_ngenes_input

default: 0, else set lower to filter terms with more n input genes

max_ngenes_signif

default: 0, set lower to filter terms with more n significant genes

max_abs_zscore

default: 0, set lower to filter terms with more absolute zscore

max_pvalue_adjust

default: 1, set lower to filter terms with higher adjusted p-value for multiple correction

Value

filtered dataframe

Examples

filter_enrichment(
get(load(system.file("extdata", "example_enrichment.rda", package = "goatea"))), 
min_ngenes = 15)
#> # A tibble: 4 × 17
#>   source source_version id     name  parent_id ngenes_input ngenes ngenes_signif
#>   <chr>  <chr>          <chr>  <chr> <list>           <int>  <int>         <int>
#> 1 origin org.Xx.eg.db   DB.007 gene… <chr [1]>           18     18            11
#> 2 origin org.Xx.eg.db   DB.002 gene… <chr [1]>           20     20            10
#> 3 origin org.Xx.eg.db   DB.006 gene… <chr [1]>           19     19             6
#> 4 origin org.Xx.eg.db   DB.001 gene… <chr [1]>           20     20            10
#> # ℹ 9 more variables: genes <list<int>>, genes_signif <list>, score_type <chr>,
#> #   pvalue <dbl>, zscore <dbl>, pvalue_adjust <dbl>, signif <lgl>,
#> #   score_oddsratio <dbl>, symbol <list>