
Helper function to get all annotations for a given term
Source:R/get_annotations.R
get_annotations.RdHelper function to get all annotations for a given term
Usage
get_annotations(data = NULL, term = NULL, format = c("table", "vector"))Arguments
- data
tidyproteomics data object
- term
a character string
- format
a character string specifying the return format: "table" (default) or "vector"
Examples
library(tidyproteomics)
get_annotations(hela_proteins, "biological_process")
#> # A tibble: 20,468 × 2
#> protein annotation
#> <chr> <chr>
#> 1 Q15149 cell differentiation
#> 2 Q15149 cell growth
#> 3 Q15149 cellular homeostasis
#> 4 Q15149 coagulation
#> 5 Q15149 defense response
#> 6 Q15149 metabolic process
#> 7 Q09666 metabolic process
#> 8 H0YDN1 cell growth
#> 9 Q14204 cell differentiation
#> 10 Q14204 cell growth
#> # ℹ 20,458 more rows
get_annotations(hela_proteins, "biological_process", format = "vector")
#> [1] "cell differentiation" "cell growth"
#> [3] "cellular homeostasis" "coagulation"
#> [5] "defense response" "metabolic process"
#> [7] "conjugation" "cell organization and biogenesis"
#> [9] "cell proliferation" "cellular component movement"
#> [11] "development" "cell communication"
#> [13] "cell death"