Skip to contents

get_results generates a results table from a proteomics or RNA-seq dataset on which differential analysis was performed.

Usage

get_results(object)

Arguments

object

SummarizedExperiment or DEGdata, (output from test_diff() and add_rejections()).

Value

A data.frame object containing all results variables from the performed analysis.

Examples

#Load example
data(Silicosis_pg)
data <- Silicosis_pg
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")

# Differential test
ecols <- grep("LFQ.", colnames(data_unique))
se <- make_se_parse(data_unique, ecols,mode = "delim")
filt <- filter_se(se, thr = 0, fraction = 0.4, filter_formula = ~ Reverse != "+" & Potential.contaminant!="+")
#> filter base on missing number is <= 0 in at least one condition.
#> filter base on missing number fraction < 0.4 in each row
#> filter base on giving formula 
norm <- normalize_vsn(filt)
#> vsn2: 8762 x 20 matrix (1 stratum). 
#> Please use 'meanSdPlot' to verify the fit.
imputed <- impute(norm, fun = "MinProb", q = 0.05)
#> Imputing along margin 2 (samples/columns).
#> [1] 0.3026531
diff <- test_diff(imputed, type = "control", control  = c("PBS"), fdr.type = "Storey's qvalue")
#> Tested contrasts: W10_vs_PBS, W2_vs_PBS, W4_vs_PBS, W6_vs_PBS, W9_vs_PBS
#> Storey's qvalue
dep <- add_rejections(diff, alpha = 0.01,lfc = 2)

# Get results
results <- get_results(dep)
colnames(results)
#>  [1] "name"                   "ID"                     "W10_vs_PBS_p.val"      
#>  [4] "W2_vs_PBS_p.val"        "W4_vs_PBS_p.val"        "W6_vs_PBS_p.val"       
#>  [7] "W9_vs_PBS_p.val"        "W10_vs_PBS_p.adj"       "W2_vs_PBS_p.adj"       
#> [10] "W4_vs_PBS_p.adj"        "W6_vs_PBS_p.adj"        "W9_vs_PBS_p.adj"       
#> [13] "W10_vs_PBS_significant" "W2_vs_PBS_significant"  "W4_vs_PBS_significant" 
#> [16] "W6_vs_PBS_significant"  "W9_vs_PBS_significant"  "significant"           
#> [19] "W10_vs_PBS_ratio"       "W2_vs_PBS_ratio"        "W4_vs_PBS_ratio"       
#> [22] "W6_vs_PBS_ratio"        "W9_vs_PBS_ratio"        "PBS_centered"          
#> [25] "W10_centered"           "W2_centered"            "W4_centered"           
#> [28] "W6_centered"            "W9_centered"           

significant_proteins <- results[results$significant,]
head(significant_proteins)
#>      name     ID W10_vs_PBS_p.val W2_vs_PBS_p.val W4_vs_PBS_p.val
#> 1    Acp5 Q05117     1.415141e-05    5.919033e-04    4.783118e-03
#> 2 Adamts8 P57110     2.345582e-01    3.067337e-02    2.095571e-02
#> 3    Add2 Q9QYB8     2.630809e-04    7.354807e-03    6.517427e-05
#> 4    Aif1 O70200     1.087675e-05    1.699023e-07    3.484965e-07
#> 5  Alox12 P39655     3.542542e-03    3.936133e-03    4.803149e-03
#> 6    Ank1 Q02357     2.105076e-04    4.835279e-04    1.669377e-05
#>   W6_vs_PBS_p.val W9_vs_PBS_p.val W10_vs_PBS_p.adj W2_vs_PBS_p.adj
#> 1    2.103349e-04    3.200817e-04         0.000671        0.002380
#> 2    7.457791e-04    8.558215e-03         0.185000        0.036300
#> 3    1.776733e-03    1.461579e-02         0.003200        0.013100
#> 4    9.224154e-06    5.011573e-04         0.000578        0.000015
#> 5    1.479979e-04    5.415674e-03         0.012700        0.008430
#> 6    7.328290e-05    7.969721e-05         0.002780        0.002070
#>   W4_vs_PBS_p.adj W6_vs_PBS_p.adj W9_vs_PBS_p.adj W10_vs_PBS_significant
#> 1        1.32e-02        0.001090         0.00282                   TRUE
#> 2        3.46e-02        0.002360         0.02000                  FALSE
#> 3        1.02e-03        0.004320         0.02830                   TRUE
#> 4        4.76e-05        0.000177         0.00362                   TRUE
#> 5        1.32e-02        0.000874         0.01480                  FALSE
#> 6        4.76e-04        0.000569         0.00130                   TRUE
#>   W2_vs_PBS_significant W4_vs_PBS_significant W6_vs_PBS_significant
#> 1                 FALSE                 FALSE                 FALSE
#> 2                 FALSE                 FALSE                  TRUE
#> 3                 FALSE                  TRUE                 FALSE
#> 4                  TRUE                  TRUE                  TRUE
#> 5                 FALSE                 FALSE                  TRUE
#> 6                 FALSE                  TRUE                  TRUE
#>   W9_vs_PBS_significant significant W10_vs_PBS_ratio W2_vs_PBS_ratio
#> 1                 FALSE        TRUE             2.26            1.29
#> 2                 FALSE        TRUE             1.21            1.89
#> 3                 FALSE        TRUE            -2.60           -1.40
#> 4                 FALSE        TRUE             2.84            3.21
#> 5                 FALSE        TRUE            -1.80           -1.45
#> 6                  TRUE        TRUE            -2.35           -1.76
#>   W4_vs_PBS_ratio W6_vs_PBS_ratio W9_vs_PBS_ratio PBS_centered W10_centered
#> 1           0.994            1.44            1.69        -1.14        1.120
#> 2           2.040            3.30            2.92        -1.86       -0.649
#> 3          -2.430           -1.71           -1.53         1.52       -1.070
#> 4           3.040            2.35            1.98        -2.20        0.639
#> 5          -1.410           -2.12           -1.70         1.35       -0.457
#> 6          -2.420           -2.12           -2.58         1.75       -0.593
#>   W2_centered W4_centered W6_centered W9_centered
#> 1     0.15100     -0.1470       0.300      0.5490
#> 2     0.03150      0.1820       1.440      1.0600
#> 3     0.11800     -0.9080      -0.187     -0.0131
#> 4     1.01000      0.8400       0.150     -0.2260
#> 5    -0.10500     -0.0643      -0.773     -0.3510
#> 6    -0.00249     -0.6710      -0.370     -0.8260