Skip to contents

Use this method to reconstitute the annotation tables into the format of the original resources. With the `wide=TRUE` option import_omnipath_annotations applies this function to the downloaded data.

Usage

pivot_annotations(annotations)

Arguments

annotations

A data frame of annotations downloaded from the OmniPath web service by import_omnipath_annotations.

Value

A wide format data frame (tibble) if the provided data contains annotations from one resource, otherwise a list of wide format tibbles.

Examples

# single resource: the result is a data frame
disgenet <- import_omnipath_annotations(resources = 'DisGeNet')
disgenet <- pivot_annotations(disgenet)
disgenet
#> # A tibble: 126,906 × 11
#>    uniprot genesymbol entity_t…¹ disease type  score   dsi   dpi nof_p…² nof_s…³
#>    <chr>   <chr>      <chr>      <chr>   <chr> <dbl> <dbl> <dbl>   <dbl>   <dbl>
#>  1 P04217  A1BG       protein    Schizo… dise…  0.3  0.7   0.538       1       0
#>  2 P04217  A1BG       protein    Hepato… phen…  0.3  0.7   0.538       1       0
#>  3 P01023  A2M        protein    Acute … dise…  0.3  0.529 0.769       1       0
#>  4 P01023  A2M        protein    Alzhei… dise…  0.3  0.529 0.769       3       0
#>  5 P01023  A2M        protein    Presen… dise…  0.3  0.529 0.769       3       0
#>  6 P01023  A2M        protein    Hepato… dise…  0.5  0.529 0.769       1       0
#>  7 P01023  A2M        protein    Alzhei… dise…  0.37 0.529 0.769       3       0
#>  8 P01023  A2M        protein    Famili… dise…  0.31 0.529 0.769       3       0
#>  9 P01023  A2M        protein    Acute … dise…  0.3  0.529 0.769       3       0
#> 10 P01023  A2M        protein    Coloni… group  0.3  0.529 0.769       1       0
#> # … with 126,896 more rows, 1 more variable: source <chr>, and abbreviated
#> #   variable names ¹​entity_type, ²​nof_pmids, ³​nof_snps
# # A tibble: 126,588 × 11
#    uniprot genesymbol entity_type disease      type  score   dsi   dpi
#    <chr>   <chr>      <chr>       <chr>        <chr> <dbl> <dbl> <dbl>
#  1 P04217  A1BG       protein     Schizophren. dise.  0.3  0.7   0.538
#  2 P04217  A1BG       protein     Hepatomegaly phen.  0.3  0.7   0.538
#  3 P01023  A2M        protein     Fibrosis, L. dise.  0.3  0.529 0.769
#  4 P01023  A2M        protein     Acute kidne. dise.  0.3  0.529 0.769
#  5 P01023  A2M        protein     Mental Depr. dise.  0.3  0.529 0.769
# # . with 126,583 more rows, and 3 more variables: nof_pmids <dbl>,
# #   nof_snps <dbl>, source <chr>

# multiple resources: the result is a list
annotations <- import_omnipath_annotations(
    resources = c('DisGeNet', 'SignaLink_function', 'DGIdb', 'kinase.com')
)
annotations <- pivot_annotations(annotations)
names(annotations)
#> [1] "DGIdb"              "DisGeNet"           "SignaLink_function"
#> [4] "kinase.com"        
# [1] "DGIdb"              "DisGeNet"           "kinase.com"
# [4] "SignaLink_function"
annotations$kinase.com
#> # A tibble: 864 × 6
#>    uniprot genesymbol entity_type group family subfamily
#>    <chr>   <chr>      <chr>       <chr> <chr>  <chr>    
#>  1 P31749  AKT1       protein     AGC   Akt    NA       
#>  2 P31751  AKT2       protein     AGC   Akt    NA       
#>  3 Q9Y243  AKT3       protein     AGC   Akt    NA       
#>  4 O14578  CIT        protein     AGC   DMPK   CRIK     
#>  5 Q09013  DMPK       protein     AGC   DMPK   GEK      
#>  6 Q5VT25  CDC42BPA   protein     AGC   DMPK   GEK      
#>  7 Q9Y5S2  CDC42BPB   protein     AGC   DMPK   GEK      
#>  8 Q6DT37  CDC42BPG   protein     AGC   DMPK   GEK      
#>  9 Q13464  ROCK1      protein     AGC   DMPK   ROCK     
#> 10 O75116  ROCK2      protein     AGC   DMPK   ROCK     
#> # … with 854 more rows
# # A tibble: 825 x 6
#    uniprot genesymbol entity_type group family subfamily
#    <chr>   <chr>      <chr>       <chr> <chr>  <chr>
#  1 P31749  AKT1       protein     AGC   Akt    NA
#  2 P31751  AKT2       protein     AGC   Akt    NA
#  3 Q9Y243  AKT3       protein     AGC   Akt    NA
#  4 O14578  CIT        protein     AGC   DMPK   CRIK
#  5 Q09013  DMPK       protein     AGC   DMPK   GEK
# # . with 815 more rows