Skip to contents

summary() is an analysis function that computes the protein summary statistics for a given tidyproteomics data object. This is a passthrough function as it returns the original tidyproteomics data-object.

Usage

# S3 method for tidyproteomics
summary(object, ...)

Arguments

object

tidyproteomics data object

...

passthrough arguments

Value

a tibble on print, a tidyproteomics data-object on save

Examples

library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)

# subset to minimize compute time
hela_subset <- hela_proteins %>% subset(description %like% 'ribosome')
#> 
#> ℹ Subsetting data: description %like% ribosome
#> ✔ Subsetting data: description %like% ribosome ... done
#> 

# a global summary
hela_subset %>% summary()
#> 
#> ── Summary: global ──
#> 
#>  proteins peptides peptides_unique quantifiable   CV  PC1  PC2
#>        17      224             224        0.986 0.24 0.62 0.21
#> 

# a summary by sample
hela_subset %>% summary("sample")
#> 
#> ── Summary: sample ──
#> 
#>     sample proteins peptides peptides_unique quantifiable    CV  PC1  PC2
#>    control       17      224             224        0.976 0.094 0.56 0.44
#>  knockdown       17      224             224        0.996 0.170 0.75 0.25
#> 

# \donttest{
# a summary by sample with imputations removed
hela_subset %>%
   subset(imputed == 0) %>%
   summary("sample")
#> 
#> ℹ Subsetting data: imputed == 0
#> ✔ Subsetting data: imputed == 0 ... done
#> 
#> 
#> ── Summary: sample ──
#> 
#>     sample proteins peptides peptides_unique quantifiable    CV  PC1  PC2
#>    control       17      223             223        0.976 0.097 0.61 0.39
#>  knockdown       17      224             224        0.996 0.170 0.75 0.25
#> 

# a summary of imputation
hela_subset %>% summary("imputed")
#> 
#> ── Summary: imputed ──
#> 
#>  imputed proteins peptides peptides_unique quantifiable  PC1  PC2   CV
#>        1        1        3               3        1.000   NA   NA   NA
#>        0       17      224             224        0.984 0.63 0.17 0.24
#> 

hela_subset %>% summary("cellular_component")
#> 
#> ── Summary: cellular_component ──
#> 
#>  cellular_component proteins peptides peptides_unique quantifiable   CV  PC1
#>               Golgi       17      224             224        0.986 0.24 0.62
#>        cytoskeleton       17      224             224        0.986 0.24 0.62
#>             cytosol       17      224             224        0.986 0.24 0.62
#>            endosome        3       23              23        0.978 0.14 0.72
#>       extracellular       17      224             224        0.986 0.24 0.62
#>            membrane       17      224             224        0.986 0.24 0.62
#>             nucleus       17      224             224        0.986 0.24 0.62
#>   PC2
#>  0.21
#>  0.21
#>  0.21
#>  0.27
#>  0.21
#>  0.21
#>  0.21
#> 

hela_subset %>% summary("biological_process")
#> 
#> ── Summary: biological_process ──
#> 
#>                biological_process proteins peptides peptides_unique
#>              cell differentiation       17      224             224
#>                       cell growth       17      224             224
#>  cell organization and biogenesis       17      224             224
#>                cell proliferation       17      224             224
#>       cellular component movement       17      224             224
#>              cellular homeostasis       17      224             224
#>                       coagulation       17      224             224
#>                       conjugation       17      224             224
#>                       development       17      224             224
#>                 metabolic process        1       11              11
#>  quantifiable   CV  PC1  PC2
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.986 0.24 0.62 0.21
#>         0.758 0.48   NA   NA
#> 
# }