Create a data subset
intersection.Rd
intersection()
is a specalized function for sub-setting quantitative data
from a tidyproteomics data-object based data overlapping between sample groups.
Arguments
- data
tidyproteomics data object
- .include
when exporting the "intersection" this is the set of proteins contained within the intersection of these samples
- .exclude
when exporting the "intersection" this is the set of proteins found in these samples to exclude
Examples
library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)
# creates a subset of just the proteins found in 'control'
hela_proteins %>%
subset(imputed == 0) %>%
intersection(.include = c('control'), .exclude = c('knockdown'))
#>
#> ℹ Subsetting data: imputed == 0
#> ✔ Subsetting data: imputed == 0 ... done
#>
#> ℹ Intersection subset containing 60 proteins
#>
#> ── Quantitative Proteomics Data Object ──
#>
#> Origin ProteomeDiscoverer
#> proteins (78.40 kB)
#> Composition 3 files
#> 1 samples (control)
#> Quantitation 60 proteins
#> 2.9 log10 dynamic range
#> 9.47% missing values
#> *imputed
#> Accounting (4) num_peptides num_psms num_unique_peptides imputed
#> Annotations (9) description biological_process cellular_component molecular_function
#> gene_name wiki_pathway gene_id_ensemble gene_id_entrez
#> reactome_pathway
#>