Skip to contents

Generate a table to summarise gene numbers from a differential expression test.

Usage

summarise_de(
  top_table,
  lfc_threshold = 1,
  padj_threshold = 0.01,
  multi = FALSE,
  group_by = "combined_id"
)

Arguments

top_table

A data table showing results from compute_single_de

lfc_threshold

Threshold of log2FC

padj_threshold

Threshold of adjusted p value

multi

To indicate to summarise for single de comparison or multi de comparison

group_by

Name of the column that defines groups of replicates

Value

a data table

Examples

data("mini_mac")
top_table <- mini_mac@tools$diff_exprs$Staurosporine_10
summarise_de(top_table, lfc_threshold = 1, padj_threshold = 0.05)
#> # A tibble: 1 × 6
#>   Total_genes_tested Significantly_upregulated Significantly_downregulated
#>                <int>                     <int>                       <int>
#> 1                500                       361                          26
#> # ℹ 3 more variables: Total_significant <int>, Padj_threshold <dbl>,
#> #   Log2FC_threshold <dbl>
summarise_de(mini_mac, lfc_threshold = 1, 
padj_threshold = 0.01, multi=TRUE)
#> # A tibble: 15 × 7
#>    combined_id  Total_genes_tested Significantly_upregu…¹ Significantly_downre…²
#>    <chr>                     <int>                  <int>                  <int>
#>  1 Anastrozole…                500                      0                      0
#>  2 Camptotheci…                500                    363                     15
#>  3 Capivaserti…                500                      0                      0
#>  4 Ceralaserti…                500                      0                      0
#>  5 Chlorambuci…                500                      0                      0
#>  6 Cytarabine_…                500                      0                      0
#>  7 Erlotinib_h…                500                      2                      0
#>  8 Etoposide_10                500                      2                      0
#>  9 Fluvastatin…                500                      0                      0
#> 10 Mk.2206_dih…                500                      0                      0
#> 11 Nutlin.3a_10                500                      2                      0
#> 12 Paclitaxel_…                500                      8                      1
#> 13 Sb590885_10                 500                      0                      0
#> 14 Staurospori…                500                    359                     14
#> 15 Vinblastine…                500                      3                      0
#> # ℹ abbreviated names: ¹​Significantly_upregulated, ²​Significantly_downregulated
#> # ℹ 3 more variables: Total_significant <int>, padj_threshold <dbl>,
#> #   Log2FC_threshold <dbl>