Snippets

Dénes Türei Collect BMP & TGFB receptors and SMAD TFs from OmniPath

Created by Dénes Türei last modified
#!/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)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.