Snippets
Created by
Dénes Türei
last modified
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | #!/usr/bin/env Rscript
# collect BMP receptors from OmniPath
# turei.denes@gmail.com
library(OmnipathR)
library(dplyr)
library(stringr)
library(magrittr)
# only those that are definitely not BMP receptors
EXCLUDE <- c('ESR1', 'NR2C1')
print_result <- function(x) {print(sprintf('%s (%i proteins)', paste(x, collapse = ', '), length(x)))}
gomf_bmp_receptor_activity <-
import_omnipath_annotations(resources = 'MSigDB', wide = TRUE) %>%
filter(geneset == 'GOMF_BMP_RECEPTOR_ACTIVITY' & entity_type == 'protein') %>%
pull(genesymbol) %T>%
print_result
surfaceome_receptor_act_tgfb <-
import_omnipath_intercell(categories = 'act_tgfb', parent = 'receptor', entity_type = 'protein') %>%
pull(genesymbol) %T>%
print_result
hpmr_receptor_tgfb_st_kinase <-
import_omnipath_intercell(categories = 'alk_serine_threonine_kinase_tgf_beta_serine_threonine_kinase', parent = 'receptor') %>%
pull(genesymbol) %T>%
print_result
hpmr_receptor_tgfb_t2_st_kinase <-
import_omnipath_intercell(categories = 'type_2_receptor_serine_threonine_kinase_tgf_beta_serine_threonine_kinase', parent = 'receptor') %>%
pull(genesymbol) %T>%
print_result
cellphonedb_receptor_tgfb <-
import_omnipath_intercell(categories = 'tgfbeta_receptor', parent = 'receptor', entity_type = 'protein') %>%
pull(genesymbol) %T>%
print_result
signalink_receptor_tgf <-
import_omnipath_annotations(resources = 'SignaLink_pathway', wide = TRUE, entity_type = 'protein') %>%
filter(pathway == 'TGF') %>%
pull(genesymbol) %>%
intersect(
import_omnipath_intercell(parent = 'receptor', resources = 'SignaLink_function', entity_type = 'protein') %>%
pull(genesymbol)
) %T>%
print_result
all_receptor_tgf_bmp <-
c(
gomf_bmp_receptor_activity,
surfaceome_receptor_act_tgfb,
hpmr_receptor_tgfb_st_kinase,
hpmr_receptor_tgfb_t2_st_kinase,
cellphonedb_receptor_tgfb,
signalink_receptor_tgf
) %>%
unique %>%
setdiff(EXCLUDE) %T>%
print_result
# Outputs:
# --------
# [2023-10-04 13:16:23] [SUCCESS] [OmnipathR] Loaded 11044532 annotation records from cache.
# [1] "BMPR1A, BMPR2, ACVRL1, BMPR1B, ACVR2A, HJV, SOSTDC1 (7 proteins)"
# [2023-10-04 13:16:35] [SUCCESS] [OmnipathR] Downloaded 11 intercellular communication role records.
# [1] "ACVR1B, TGFBR2, BMPR2, ACVRL1, ACVR1, TGFBR1, ACVR2B, AMHR2, BMPR1A, ACVR2A, ACVR1C (11 proteins)"
# [2023-10-04 13:16:35] [SUCCESS] [OmnipathR] Loaded 7 intercellular communication role records from cache.
# [1] "ACVR1B, BMPR1A, ACVRL1, BMPR1B, TGFBR1, ACVR1C, BAMBI (7 proteins)"
# [2023-10-04 13:16:36] [SUCCESS] [OmnipathR] Loaded 5 intercellular communication role records from cache.
# [1] "ACVR2B, AMHR2, TGFBR2, BMPR2, ACVR2A (5 proteins)"
# [2023-10-04 13:16:36] [SUCCESS] [OmnipathR] Loaded 5 intercellular communication role records from cache.
# [1] "TGFBR2, BMPR2, ACVRL1, TGFBR1, BMPR1B (5 proteins)"
# [2023-10-04 13:16:36] [SUCCESS] [OmnipathR] Loaded 1144 annotation records from cache.
# [2023-10-04 13:16:36] [SUCCESS] [OmnipathR] Loaded 122 intercellular communication role records from cache.
# [1] "TGFBR2, BMPR2, ACVR2B, ACVR1B, ESR1, TGFBR1, ACVR1, ACVRL1, BMPR1B, BMPR1A, ROR2, AMHR2, ACVR1C, NR3C1 (14 proteins)"
# [1] "BMPR1A, BMPR2, ACVRL1, BMPR1B, ACVR2A, HJV, SOSTDC1, ACVR1B, TGFBR2, ACVR1, TGFBR1, ACVR2B, AMHR2, ACVR1C, BAMBI, ROR2, NR3C1 (17 proteins)"
hgnc_smad_family <-
import_omnipath_annotations(resources = 'HGNC', entity_type = 'protein', wide = TRUE) %>%
filter(mainclass == 'SMAD family') %>%
pull(genesymbol) %T>%
print_result
lambert2018_smad_binding_domain <-
import_omnipath_annotations(resources = 'Lambert2018', entity_type = 'protein') %>%
filter(label != 'genesymbol') %>%
pivot_annotations %>%
filter(binding_domain == 'SMAD') %>%
pull(genesymbol) %T>%
print_result
uniprot_smad_family <-
import_omnipath_annotations(resources = 'UniProt_family', entity_type = 'protein', wide = TRUE) %>%
filter(family == 'Dwarfin/SMAD') %>%
pull(genesymbol) %T>%
print_result
all_tf_smad <-
c(
hgnc_smad_family,
lambert2018_smad_binding_domain,
uniprot_smad_family
) %>%
unique %T>%
print_result
# Outputs:
# --------
# [2023-10-04 14:07:19] [SUCCESS] [OmnipathR] Loaded 20086 annotation records from cache.
# [1] "SMAD1, SMAD2, SMAD3, SMAD4, SMAD5, SMAD6, SMAD7, SMAD9 (8 proteins)"
# [2023-10-04 14:07:19] [SUCCESS] [OmnipathR] Loaded 47919 annotation records from cache.
# [1] "NFIA, NFIB, NFIC, NFIX, SMAD1, SMAD2, SMAD3, SMAD4, SMAD5, SMAD6, SMAD7, SMAD9 (12 proteins)"
# [2023-10-04 14:07:19] [SUCCESS] [OmnipathR] Loaded 16589 annotation records from cache.
# [1] "SMAD6, SMAD7, SMAD1, SMAD3, SMAD2, SMAD4, SMAD9, SMAD5 (8 proteins)"
# [1] "SMAD1, SMAD2, SMAD3, SMAD4, SMAD5, SMAD6, SMAD7, SMAD9, NFIA, NFIB, NFIC, NFIX (12 proteins)"
|
Comments (0)
You can clone a snippet to your computer for local editing. Learn more.