Get a percentage of genesets the specific gene is included

calculate_geneSetRatio(enrichment_results, gene_overview_df)

Arguments

enrichment_results

list of enrichment results

gene_overview_df

dataframe with gene-wise information

Value

numerical vector of gene set ratios

Examples

calculate_geneSetRatio(
list(
  A = get(load(system.file("extdata", "example_enrichment.rda", package = "goatea"))), 
  B = get(load(system.file("extdata", "example_enrichment.rda", package = "goatea")))
), 
get(load(system.file("extdata", "example_genes_overview.rda", package = "goatea"))))
#> # A tibble: 100 × 13
#>     gene symbol  A_efsi A_pval B_efsi B_pval A_perc B_perc genelist_overlap
#>    <int> <chr>    <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl> <chr>           
#>  1 14969 gene_29   -4.9 0.0783   -4.9 0.0783  -96.7  -96.7 ""              
#>  2 12070 gene_75   -4.9 0.845    -4.9 0.845   -96.7  -96.7 ""              
#>  3 10534 gene_76    4.8 0.0121    4.8 0.0121 2686.  2686.  "A+B"           
#>  4 15042 gene_12    4.8 0.282     4.8 0.282  2686.  2686.  ""              
#>  5 14654 gene_68   -4.8 0.0203   -4.8 0.0203  -96.4  -96.4 "A+B"           
#>  6 12937 gene_98   -4.8 0.791    -4.8 0.791   -96.4  -96.4 ""              
#>  7 17523 gene_13    4.7 0.201     4.7 0.201  2499.  2499.  ""              
#>  8 15743 gene_35    4.7 0.471     4.7 0.471  2499.  2499.  ""              
#>  9 19501 gene_69   -4.7 0.0133   -4.7 0.0133  -96.2  -96.2 "A+B"           
#> 10 19908 gene_65   -4.6 0.306    -4.6 0.306   -95.9  -95.9 ""              
#> # ℹ 90 more rows
#> # ℹ 4 more variables: A_geneSetRatio <dbl>, A_SS_geneSetRatio <dbl>,
#> #   B_geneSetRatio <dbl>, B_SS_geneSetRatio <dbl>