# BulkSignalR : Inference of ligand-receptor interactions from bulk data or spatial transcriptomics

#### Jean-Philippe Villemin

#### Jacques Colinge

#### 05/18/2026

Code

    library(BulkSignalR)

## Configure local cache and hidden environment variables

`BulkSignalR` donwloads resource files just once after the first installation.

A mecanism handled by `BioCFileCache` package informs the user if the local files are up to date. Several functions as `cacheVersion` and `cacheInfo` give informations about the content of the local cache and its synchronization state with its remote source.

Cache directory can be cleaned by `cacheClear` function and and forced to be created again using `createResources(onRequest=TRUE)`. Otherwise it will be automatically recreated when the package is next loaded.

The knowledge database (pathways - GO-BP / Reactome, Ligand & recepors - LRdb, and gene Network are handled inside a hidden environment variable called `.SignalR`)

The sources can be rewritten using `resetPathways`, `resetLRdb` and `resetNetwork`.

Several data versions can be access remotely from : here These datasets can be used to reset the sources locally.

Code

    # You can see hidden environment variable list as follows.
    ls(BulkSignalR:::.SignalR)

    # Setup Pathways for reactome (can be done for GO-BP also)

    subset <- c("REACTOME_BASIGIN_INTERACTIONS",
    "REACTOME_SYNDECAN_INTERACTIONS",
    "REACTOME_ECM_PROTEOGLYCANS",
    "REACTOME_CELL_JUNCTION_ORGANIZATION")

    reactSubset <- BulkSignalR:::.SignalR$BulkSignalR_Reactome[
    BulkSignalR:::.SignalR$BulkSignalR_Reactome$`Reactome name` %in% subset,]

    resetPathways(dataframe = reactSubset,
    resourceName = "Reactome")

    cacheInfo()
    cacheVersion()

    cacheClear()

    # Ask to download again
    createResources(onRequest=TRUE)

    # Set up LRdb
    df <- data.frame(
      ligand    = c("A2M", "AANAT", "AANAT", "ACE", "ACE"),
      receptor  = c("LRP1", "MTNR1A", "MTNR1B", "AGTR2", "BDKRB2")
    )
    resetLRdb(df,switch=TRUE)

    # Set up Network
    df <- data.frame(
      a.gn   = c("A2M", "AANAT", "AANAT", "ACE", "ACE"),
      type  = c("regulates-transcription-of",
       "regulates-transcription-of",
       "regulates-transcription-of",
       "regulates-transcription-of",
       "regulates-transcription-of"),
      b.gn  = c("LRP1", "MTNR1A", "MTNR1B", "AGTR2", "BDKRB2")
    )

    resetNetwork(df)

Thank you for reading this guide and for using `BulkSignalR`.

## Session Information

Code

    sessionInfo()

    ## R version 4.6.0 Patched (2026-05-01 r89994)
    ## Platform: aarch64-apple-darwin23
    ## Running under: macOS Tahoe 26.3.1
    ##
    ## Matrix products: default
    ## BLAS:   /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRblas.0.dylib
    ## LAPACK: /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
    ##
    ## locale:
    ## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    ##
    ## time zone: America/New_York
    ## tzcode source: internal
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] BulkSignalR_1.5.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] RColorBrewer_1.1-3          jsonlite_2.0.0
    ##   [3] shape_1.4.6.1               magrittr_2.0.5
    ##   [5] magick_2.9.1                farver_2.1.2
    ##   [7] rmarkdown_2.31              GlobalOptions_0.1.4
    ##   [9] fs_2.1.0                    vctrs_0.7.3
    ##  [11] multtest_2.69.0             memoise_2.0.1
    ##  [13] RCurl_1.98-1.18             ggtree_4.3.0
    ##  [15] rstatix_0.7.3               htmltools_0.5.9
    ##  [17] S4Arrays_1.13.0             curl_7.1.0
    ##  [19] broom_1.0.13                SparseArray_1.13.2
    ##  [21] Formula_1.2-5               gridGraphics_0.5-1
    ##  [23] sass_0.4.10                 bslib_0.11.0
    ##  [25] htmlwidgets_1.6.4           httr2_1.2.2
    ##  [27] plotly_4.12.0               cachem_1.1.0
    ##  [29] igraph_2.3.1                lifecycle_1.0.5
    ##  [31] iterators_1.0.14            pkgconfig_2.0.3
    ##  [33] Matrix_1.7-5                R6_2.6.1
    ##  [35] fastmap_1.2.0               MatrixGenerics_1.25.0
    ##  [37] clue_0.3-68                 digest_0.6.39
    ##  [39] aplot_0.2.9                 colorspace_2.1-2
    ##  [41] patchwork_1.3.2             S4Vectors_0.51.2
    ##  [43] GenomicRanges_1.65.0        RSQLite_3.52.0
    ##  [45] ggpubr_0.6.3                filelock_1.0.3
    ##  [47] httr_1.4.8                  abind_1.4-8
    ##  [49] compiler_4.6.0              withr_3.0.2
    ##  [51] bit64_4.8.0                 fontquiver_0.2.1
    ##  [53] doParallel_1.0.17           S7_0.2.2
    ##  [55] backports_1.5.1             orthogene_1.19.3
    ##  [57] carData_3.0-6               DBI_1.3.0
    ##  [59] homologene_1.4.68.19.3.27   ggsignif_0.6.4
    ##  [61] MASS_7.3-65                 rappdirs_0.3.4
    ##  [63] DelayedArray_0.39.2         rjson_0.2.23
    ##  [65] tools_4.6.0                 otel_0.2.0
    ##  [67] ape_5.8-1                   glue_1.8.1
    ##  [69] stabledist_0.7-2            nlme_3.1-169
    ##  [71] grid_4.6.0                  Rtsne_0.17
    ##  [73] cluster_2.1.8.2             generics_0.1.4
    ##  [75] gtable_0.3.6                tidyr_1.3.2
    ##  [77] data.table_1.18.4           car_3.1-5
    ##  [79] XVector_0.53.0              BiocGenerics_0.59.2
    ##  [81] ggrepel_0.9.8               RANN_2.6.2
    ##  [83] foreach_1.5.2               pillar_1.11.1
    ##  [85] yulab.utils_0.2.4           babelgene_22.9
    ##  [87] circlize_0.4.18             splines_4.6.0
    ##  [89] dplyr_1.2.1                 treeio_1.37.0
    ##  [91] BiocFileCache_3.3.0         lattice_0.22-9
    ##  [93] survival_3.8-6              bit_4.6.0
    ##  [95] tidyselect_1.2.1            fontLiberation_0.1.0
    ##  [97] ComplexHeatmap_2.29.0       SingleCellExperiment_1.35.1
    ##  [99] knitr_1.51                  fontBitstreamVera_0.1.1
    ## [101] gridExtra_2.3               IRanges_2.47.1
    ## [103] Seqinfo_1.3.0               SummarizedExperiment_1.43.0
    ## [105] stats4_4.6.0                xfun_0.57
    ## [107] Biobase_2.73.1              matrixStats_1.5.0
    ## [109] lazyeval_0.2.3              ggfun_0.2.0
    ## [111] yaml_2.3.12                 evaluate_1.0.5
    ## [113] codetools_0.2-20            gdtools_0.5.0
    ## [115] tibble_3.3.1                ggplotify_0.1.3
    ## [117] cli_3.6.6                   systemfonts_1.3.2
    ## [119] jquerylib_0.1.4             dichromat_2.0-0.1
    ## [121] Rcpp_1.1.1-1.1              gprofiler2_0.2.4
    ## [123] dbplyr_2.5.2                png_0.1-9
    ## [125] parallel_4.6.0              ggplot2_4.0.3
    ## [127] blob_1.3.0                  ggalluvial_0.12.6
    ## [129] bitops_1.0-9                glmnet_5.0
    ## [131] SpatialExperiment_1.23.0    viridisLite_0.4.3
    ## [133] tidytree_0.4.7              ggiraph_0.9.6
    ## [135] scales_1.4.0                purrr_1.2.2
    ## [137] crayon_1.5.3                GetoptLong_1.1.1
    ## [139] rlang_1.2.0