Assemble a data.frame containing raw abundances of features that are significant in at least one comparison.

makeAbundanceExport(testresList, abundancePrefix)

Arguments

testresList

List of data.frames with test results, typically generated by runTest().

abundancePrefix

Character vector giving the prefix(es) of the columns in the test result tables that contain abundance information.

Value

A data.frame with abundances for significant features.

Author

Charlotte Soneson

Examples

sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds",
                           package = "einprot"))
names(S4Vectors::metadata(sce)$testres$tests)
#> [1] "Chd4BF_vs_Adnp"     "Adnp_vs_RBC_ctrl"   "Chd4BF_vs_RBC_ctrl"
abExp <- makeAbundanceExport(S4Vectors::metadata(sce)$testres$tests,
                             abundancePrefix = "iBAQ")
head(abExp)
#>      pid showInVolcano_Chd4BF_vs_Adnp showInVolcano_Adnp_vs_RBC_ctrl
#> 1   Dhx9                        FALSE                           TRUE
#> 2 Zmynd8                        FALSE                          FALSE
#> 3  Zmym4                        FALSE                           TRUE
#> 4    Rlf                        FALSE                           TRUE
#> 5 Atp5c1                         TRUE                             NA
#> 6   Adnp                        FALSE                           TRUE
#>   showInVolcano_Chd4BF_vs_RBC_ctrl iBAQ.Adnp.avg iBAQ.Chd4BF.avg
#> 1                             TRUE  7.048067e+05        121103.0
#> 2                             TRUE  4.112933e+03        159303.3
#> 3                             TRUE  2.005813e+06      11268213.3
#> 4                            FALSE  3.704467e+05        942932.0
#> 5                             TRUE  0.000000e+00       1174223.3
#> 6                             TRUE  2.954467e+08     189706666.7
#>   iBAQ.RBC_ctrl.avg iBAQ.Adnp.sd iBAQ.Chd4BF.sd iBAQ.RBC_ctrl.sd iBAQ.Adnp_IP04
#> 1                 0 4.332023e+05       79277.34              0.0     4.1330e+05
#> 2                 0 3.805447e+03       53932.13              0.0     4.8299e+03
#> 3                 0 2.066075e+06    19263730.12              0.0     8.7657e+05
#> 4                 0 3.949380e+05     1617559.84              0.0     1.8078e+05
#> 5                 0 0.000000e+00     1142004.04              0.0     0.0000e+00
#> 6           1222710 1.349137e+08    77346910.30         207015.6     2.0709e+08
#>   iBAQ.Adnp_IP05 iBAQ.Adnp_IP06 iBAQ.Chd4BF_IP07 iBAQ.Chd4BF_IP08
#> 1        1202600     4.9852e+05            30009           174480
#> 2              0     7.5089e+03           215090           155380
#> 3         750470     4.3904e+06           188320         33512000
#> 4         106120     8.2444e+05                0          2810700
#> 5              0     0.0000e+00           624740          2487100
#> 6      228510000     4.5074e+08        154760000        278360000
#>   iBAQ.Chd4BF_IP09 iBAQ.RBC_ctrl_IP01 iBAQ.RBC_ctrl_IP02 iBAQ.RBC_ctrl_IP03
#> 1           158820                  0                  0                  0
#> 2           107440                  0                  0                  0
#> 3           104320                  0                  0                  0
#> 4            18096                  0                  0                  0
#> 5           410830                  0                  0                  0
#> 6        136000000             987130            1375600            1305400