Signalling analysis of Insr positive vs. Insr negative astrocytes

Author

Evgenii O. Tretiakov

Published

July 29, 2023

Load data and setup parameters

Code
# Load tidyverse infrastructure packages
suppressPackageStartupMessages({
  library(reticulate)
  library(future)
  library(here)
  library(tidyverse)
  library(magrittr)
  library(stringr)
  library(skimr)
  library(RColorBrewer)
})


# Load packages for scRNA-seq analysis and visualisation
suppressPackageStartupMessages({
  library(ggplot2)
  library(ggrepel)
  library(cowplot)
  library(patchwork)
  library(ggstatsplot)
  library(ggupset)
  library(ComplexUpset)
  library(dabestr)
})

Set paths

Code
src_dir <- here("code")
data_dir <- here("data")
output_dir <- here("output")
plots_dir <- here(output_dir, "figures")
tables_dir <- here(output_dir, "tables")

Load helper functions and gene-sets

Code
source(here(src_dir, "genes.R"))
source(here(src_dir, "functions.R"))

Set fixed variables

Code
# set seed
reseed <- 42
set.seed(seed = reseed)

# Parameters for parallel execution
n_cores <- 8
plan("multisession", workers = n_cores)
options(
  future.globals.maxSize = 100000 * 1024^2,
  future.rng.onMisuse = "ignore"
)
plan()
multisession:
- args: function (..., workers = 8, envir = parent.frame())
- tweaked: TRUE
- call: plan("multisession", workers = n_cores)
Code
# ggplot2 theme
theme_set(ggmin::theme_powerpoint())

Load selected astrocytes signalling data estimated using Liana-py and Rank Aggregation method (including CellPhoneDB, CellChat, ICELLNET, connectomeDB2020, and CellTalkDB)

Code
lutomska_norm <-
  read_csv(here(
    data_dir,
    "signalling", "lutomska",
    "arc_astro-with_npy_pomc-liana-res.csv"
  )
)

lutomska_hfhsd <-
  read_csv(here(
    data_dir,
    "signalling", "lutomska",
    "hfd-arc_astro-with_npy_pomc-liana-res.csv"
  )
)

deng_norm <-
  read_csv(here(
    data_dir,
    "signalling", "deng",
    "arc_astro-with_npy_pomc-liana-res.csv"
  )
)

deng_hfd <-
  read_csv(here(
    data_dir,
    "signalling", "deng",
    "hfd-arc_astro-with_npy_pomc-liana-res.csv"
  )
)

lopez_norm <-
  read_csv(here(
    data_dir,
    "signalling", "lopez",
    "pvn_astro-with_npy_pomc-liana-res.csv"
  )
)

lopez_csds <-
  read_csv(here(
    data_dir,
    "signalling", "lopez",
    "chronic-stress-pvn_astro-with_npy_pomc-liana-res.csv"
  )
)
Code
skim(lutomska_norm)
Data summary
Name lutomska_norm
Number of rows 40496
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 1 16 0 572 0
receptor_complex 0 1 2 19 0 627 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 20247.50 11690.33 0.00 10123.75 20247.50 30371.25 40495.00 ▇▇▇▇▇
lr_means 0 1 0.20 0.34 0.00 0.00 0.06 0.27 3.69 ▇▁▁▁▁
cellphone_pvals 0 1 0.64 0.43 0.00 0.09 0.98 1.00 1.00 ▅▁▁▁▇
expr_prod 0 1 0.08 0.44 0.00 0.00 0.00 0.02 13.31 ▇▁▁▁▁
scaled_weight 0 1 0.10 0.40 -1.89 -0.07 0.01 0.19 4.34 ▁▇▁▁▁
lr_logfc 0 1 -0.06 0.40 -3.98 -0.12 -0.01 0.06 3.74 ▁▁▇▁▁
spec_weight 0 1 0.06 0.11 0.00 0.00 0.01 0.09 1.00 ▇▁▁▁▁
lrscore 0 1 0.25 0.27 0.00 0.00 0.17 0.46 0.96 ▇▃▂▂▁
lr_probs 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.32 ▇▁▁▁▁
cellchat_pvals 0 1 0.92 0.26 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.76 0.38 0.00 0.51 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.76 0.39 0.00 0.47 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.88 0.29 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
Code
skim(lutomska_hfhsd)
Data summary
Name lutomska_hfhsd
Number of rows 45104
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 1 16 0 627 0
receptor_complex 0 1 2 19 0 684 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 22551.50 13020.55 0.00 11275.75 22551.50 33827.25 45103.00 ▇▇▇▇▇
lr_means 0 1 0.19 0.33 0.00 0.00 0.05 0.26 3.71 ▇▁▁▁▁
cellphone_pvals 0 1 0.63 0.45 0.00 0.02 1.00 1.00 1.00 ▅▁▁▁▇
expr_prod 0 1 0.07 0.39 0.00 0.00 0.00 0.01 13.41 ▇▁▁▁▁
scaled_weight 0 1 0.09 0.42 -2.02 -0.07 0.01 0.19 4.68 ▁▇▁▁▁
lr_logfc 0 1 -0.06 0.42 -4.21 -0.13 0.00 0.06 4.15 ▁▁▇▁▁
spec_weight 0 1 0.06 0.11 0.00 0.00 0.01 0.09 1.00 ▇▁▁▁▁
lrscore 0 1 0.24 0.27 0.00 0.00 0.14 0.42 0.96 ▇▂▂▂▁
lr_probs 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.33 ▇▁▁▁▁
cellchat_pvals 0 1 0.93 0.25 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.76 0.38 0.00 0.51 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.76 0.38 0.00 0.44 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.89 0.29 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
Code
skim(deng_norm)
Data summary
Name deng_norm
Number of rows 44128
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 1 16 0 612 0
receptor_complex 0 1 2 19 0 682 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 22063.50 12738.80 0.00 11031.75 22063.50 33095.25 44127.00 ▇▇▇▇▇
lr_means 0 1 0.22 0.36 0.00 0.00 0.09 0.29 3.74 ▇▁▁▁▁
cellphone_pvals 0 1 0.60 0.43 0.00 0.07 0.86 1.00 1.00 ▅▁▁▁▇
expr_prod 0 1 0.09 0.47 0.00 0.00 0.00 0.02 13.45 ▇▁▁▁▁
scaled_weight 0 1 0.07 0.29 -1.42 -0.08 0.02 0.18 2.55 ▁▇▃▁▁
lr_logfc 0 1 -0.04 0.40 -3.86 -0.08 0.00 0.06 5.31 ▁▂▇▁▁
spec_weight 0 1 0.06 0.09 0.00 0.00 0.03 0.09 1.00 ▇▁▁▁▁
lrscore 0 1 0.27 0.26 0.00 0.00 0.22 0.46 0.95 ▇▃▂▂▁
lr_probs 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.32 ▇▁▁▁▁
cellchat_pvals 0 1 0.90 0.29 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.76 0.39 0.00 0.48 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.74 0.39 0.00 0.41 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.86 0.31 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
Code
skim(deng_hfd)
Data summary
Name deng_hfd
Number of rows 45408
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 1 16 0 611 0
receptor_complex 0 1 2 19 0 697 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 22703.50 13108.30 0.00 11351.75 22703.50 34055.25 45407.00 ▇▇▇▇▇
lr_means 0 1 0.22 0.35 0.00 0.00 0.08 0.27 3.75 ▇▁▁▁▁
cellphone_pvals 0 1 0.62 0.42 0.00 0.13 0.85 1.00 1.00 ▅▁▁▁▇
expr_prod 0 1 0.09 0.48 0.00 0.00 0.00 0.02 13.79 ▇▁▁▁▁
scaled_weight 0 1 0.08 0.32 -1.31 -0.06 0.01 0.16 3.53 ▁▇▁▁▁
lr_logfc 0 1 -0.03 0.32 -2.51 -0.09 0.00 0.05 3.63 ▁▃▇▁▁
spec_weight 0 1 0.06 0.10 0.00 0.00 0.03 0.09 1.00 ▇▁▁▁▁
lrscore 0 1 0.26 0.26 0.00 0.00 0.19 0.45 0.96 ▇▃▂▂▁
lr_probs 0 1 0.00 0.02 0.00 0.00 0.00 0.00 0.39 ▇▁▁▁▁
cellchat_pvals 0 1 0.91 0.28 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.77 0.38 0.00 0.52 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.75 0.38 0.00 0.45 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.87 0.31 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
Code
skim(lopez_norm)
Data summary
Name lopez_norm
Number of rows 102600
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 10 16 0 6 0
target 0 1 10 16 0 6 0
ligand_complex 0 1 1 16 0 629 0
receptor_complex 0 1 2 19 0 694 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 51299.50 29618.21 0.00 25649.75 51299.50 76949.25 102599.00 ▇▇▇▇▇
lr_means 0 1 0.18 0.34 0.00 0.00 0.04 0.24 3.74 ▇▁▁▁▁
cellphone_pvals 0 1 0.61 0.44 0.00 0.06 0.96 1.00 1.00 ▅▁▁▁▇
expr_prod 0 1 0.07 0.43 0.00 0.00 0.00 0.01 13.45 ▇▁▁▁▁
scaled_weight 0 1 0.15 0.38 -1.69 -0.04 0.05 0.23 4.55 ▁▇▁▁▁
lr_logfc 0 1 -0.03 0.39 -3.65 -0.09 0.00 0.07 6.05 ▁▇▁▁▁
spec_weight 0 1 0.03 0.06 0.00 0.00 0.01 0.03 1.00 ▇▁▁▁▁
lrscore 0 1 0.26 0.29 0.00 0.00 0.15 0.48 0.97 ▇▂▂▂▁
lr_probs 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.31 ▇▁▁▁▁
cellchat_pvals 0 1 0.93 0.25 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.77 0.38 0.00 0.57 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.77 0.38 0.00 0.53 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.89 0.29 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
Code
skim(lopez_csds)
Data summary
Name lopez_csds
Number of rows 106524
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 10 16 0 6 0
target 0 1 10 16 0 6 0
ligand_complex 0 1 1 16 0 640 0
receptor_complex 0 1 2 19 0 714 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 53261.50 30750.97 0.00 26630.75 53261.50 79892.25 106523.00 ▇▇▇▇▇
lr_means 0 1 0.18 0.34 0.00 0.00 0.02 0.22 3.75 ▇▁▁▁▁
cellphone_pvals 0 1 0.64 0.43 0.00 0.11 1.00 1.00 1.00 ▃▁▁▁▇
expr_prod 0 1 0.07 0.43 0.00 0.00 0.00 0.01 13.78 ▇▁▁▁▁
scaled_weight 0 1 0.13 0.40 -1.51 -0.05 0.03 0.17 5.86 ▃▇▁▁▁
lr_logfc 0 1 -0.02 0.34 -3.19 -0.09 0.00 0.06 4.05 ▁▁▇▁▁
spec_weight 0 1 0.03 0.06 0.00 0.00 0.00 0.03 1.00 ▇▁▁▁▁
lrscore 0 1 0.23 0.28 0.00 0.00 0.09 0.44 0.97 ▇▂▂▂▁
lr_probs 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.31 ▇▁▁▁▁
cellchat_pvals 0 1 0.93 0.24 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇
steady_rank 0 1 0.78 0.37 0.00 0.62 1.00 1.00 1.00 ▂▁▁▁▇
specificity_rank 0 1 0.78 0.37 0.00 0.59 1.00 1.00 1.00 ▂▁▁▁▇
magnitude_rank 0 1 0.89 0.28 0.00 1.00 1.00 1.00 1.00 ▁▁▁▁▇

Filter by p-values

Code
lutomska_norm <-
  lutomska_norm |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )

lutomska_hfhsd <-
  lutomska_hfhsd |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )

deng_norm <-
  deng_norm |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )

deng_hfd <-
  deng_hfd |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )

lopez_norm <-
  lopez_norm |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )

lopez_csds <-
  lopez_csds |>
  filter(
    specificity_rank <= 0.05,
    magnitude_rank <= 0.05
  )
Code
skim(lutomska_norm)
Data summary
Name lutomska_norm
Number of rows 1641
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 2 8 0 164 0
receptor_complex 0 1 2 13 0 194 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 18103.21 11035.58 20.00 7901.00 18566.00 27036.00 40473.00 ▇▆▆▇▃
lr_means 0 1 1.01 0.54 0.45 0.61 0.85 1.26 3.69 ▇▃▁▁▁
cellphone_pvals 0 1 0.01 0.03 0.00 0.00 0.00 0.00 0.93 ▇▁▁▁▁
expr_prod 0 1 0.97 1.32 0.10 0.29 0.55 1.06 13.31 ▇▁▁▁▁
scaled_weight 0 1 0.71 0.68 0.05 0.22 0.46 0.99 4.34 ▇▂▁▁▁
lr_logfc 0 1 0.44 0.48 -0.07 0.15 0.28 0.58 3.74 ▇▂▁▁▁
spec_weight 0 1 0.16 0.08 0.02 0.10 0.14 0.18 0.95 ▇▂▁▁▁
lrscore 0 1 0.83 0.06 0.67 0.78 0.83 0.87 0.96 ▁▆▇▇▃
lr_probs 0 1 0.03 0.04 0.00 0.01 0.01 0.03 0.32 ▇▁▁▁▁
cellchat_pvals 0 1 0.03 0.15 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.02 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.01 0.02 0.05 ▇▂▂▁▁
Code
skim(lutomska_hfhsd)
Data summary
Name lutomska_hfhsd
Number of rows 1558
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 2 8 0 172 0
receptor_complex 0 1 2 13 0 192 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 20202.67 12167.60 79.00 8826.00 20827.00 29949.75 45074.00 ▇▆▆▇▃
lr_means 0 1 1.01 0.53 0.44 0.60 0.86 1.24 3.71 ▇▂▁▁▁
cellphone_pvals 0 1 0.00 0.01 0.00 0.00 0.00 0.00 0.14 ▇▁▁▁▁
expr_prod 0 1 0.95 1.29 0.10 0.29 0.53 1.10 13.41 ▇▁▁▁▁
scaled_weight 0 1 0.73 0.74 0.02 0.22 0.44 0.98 4.68 ▇▂▁▁▁
lr_logfc 0 1 0.46 0.52 -0.03 0.15 0.29 0.59 4.15 ▇▁▁▁▁
spec_weight 0 1 0.16 0.09 0.03 0.10 0.14 0.19 0.90 ▇▂▁▁▁
lrscore 0 1 0.84 0.06 0.69 0.79 0.84 0.88 0.96 ▂▆▇▇▂
lr_probs 0 1 0.03 0.04 0.00 0.01 0.01 0.03 0.33 ▇▁▁▁▁
cellchat_pvals 0 1 0.03 0.15 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.02 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.02 0.05 ▇▂▁▁▁
Code
skim(deng_norm)
Data summary
Name deng_norm
Number of rows 1796
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 2 16 0 187 0
receptor_complex 0 1 2 13 0 212 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 19375.81 12096.10 22.00 9536.00 18041.00 28294.75 44009.00 ▇▇▆▅▅
lr_means 0 1 1.11 0.61 0.47 0.63 0.92 1.39 3.74 ▇▃▂▁▁
cellphone_pvals 0 1 0.01 0.03 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
expr_prod 0 1 1.04 1.51 0.01 0.28 0.53 1.22 13.45 ▇▁▁▁▁
scaled_weight 0 1 0.55 0.40 0.00 0.23 0.44 0.80 2.55 ▇▅▂▁▁
lr_logfc 0 1 0.53 0.72 -1.08 0.19 0.32 0.58 5.31 ▃▇▁▁▁
spec_weight 0 1 0.14 0.08 0.02 0.09 0.12 0.17 0.81 ▇▂▁▁▁
lrscore 0 1 0.80 0.07 0.39 0.75 0.81 0.86 0.95 ▁▁▂▇▅
lr_probs 0 1 0.03 0.04 0.00 0.01 0.01 0.04 0.32 ▇▁▁▁▁
cellchat_pvals 0 1 0.06 0.22 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.02 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.01 0.02 0.05 ▇▂▂▂▁
Code
skim(deng_hfd)
Data summary
Name deng_hfd
Number of rows 1750
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 11 16 0 4 0
target 0 1 11 16 0 4 0
ligand_complex 0 1 2 8 0 166 0
receptor_complex 0 1 2 13 0 193 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 19761.75 12493.86 20.00 8853.25 18523.50 29188.25 45383.00 ▇▇▆▆▅
lr_means 0 1 1.13 0.57 0.48 0.69 0.98 1.43 3.75 ▇▃▂▁▁
cellphone_pvals 0 1 0.02 0.05 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
expr_prod 0 1 1.17 1.62 0.09 0.33 0.61 1.38 13.79 ▇▁▁▁▁
scaled_weight 0 1 0.60 0.47 0.05 0.24 0.51 0.82 3.53 ▇▃▁▁▁
lr_logfc 0 1 0.45 0.43 -0.49 0.16 0.30 0.64 3.63 ▇▆▁▁▁
spec_weight 0 1 0.13 0.06 0.02 0.09 0.12 0.16 0.61 ▇▃▁▁▁
lrscore 0 1 0.82 0.07 0.63 0.77 0.82 0.87 0.96 ▁▅▇▇▃
lr_probs 0 1 0.04 0.06 0.00 0.01 0.02 0.06 0.39 ▇▁▁▁▁
cellchat_pvals 0 1 0.04 0.14 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.02 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.02 0.05 ▇▂▁▁▁
Code
skim(lopez_norm)
Data summary
Name lopez_norm
Number of rows 3441
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 10 16 0 6 0
target 0 1 10 16 0 6 0
ligand_complex 0 1 2 16 0 205 0
receptor_complex 0 1 2 13 0 230 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 53797.03 32923.79 21.00 18237.00 60858.00 83786.00 102596.00 ▇▃▃▆▇
lr_means 0 1 1.08 0.63 0.42 0.60 0.88 1.37 3.74 ▇▃▁▁▁
cellphone_pvals 0 1 0.01 0.05 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
expr_prod 0 1 1.04 1.51 0.07 0.28 0.52 1.19 13.45 ▇▁▁▁▁
scaled_weight 0 1 0.82 0.66 0.05 0.34 0.57 1.18 4.55 ▇▃▁▁▁
lr_logfc 0 1 0.52 0.58 -1.01 0.17 0.35 0.68 6.05 ▇▆▁▁▁
spec_weight 0 1 0.07 0.06 0.01 0.04 0.06 0.09 0.58 ▇▁▁▁▁
lrscore 0 1 0.85 0.06 0.67 0.81 0.85 0.90 0.97 ▁▃▇▇▅
lr_probs 0 1 0.03 0.04 0.00 0.00 0.01 0.03 0.31 ▇▁▁▁▁
cellchat_pvals 0 1 0.05 0.21 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.02 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.02 0.05 ▇▂▁▁▁
Code
skim(lopez_csds)
Data summary
Name lopez_csds
Number of rows 3476
Number of columns 17
_______________________
Column type frequency:
character 4
numeric 13
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
source 0 1 10 16 0 6 0
target 0 1 10 16 0 6 0
ligand_complex 0 1 2 10 0 193 0
receptor_complex 0 1 2 13 0 214 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
…1 0 1 57214.53 33490.74 81.00 21402.00 64002.50 86963.75 106518.00 ▇▃▅▇▇
lr_means 0 1 1.11 0.62 0.43 0.64 0.93 1.41 3.75 ▇▃▁▁▁
cellphone_pvals 0 1 0.01 0.04 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
expr_prod 0 1 1.12 1.54 0.05 0.31 0.57 1.25 13.78 ▇▁▁▁▁
scaled_weight 0 1 0.82 0.72 0.05 0.30 0.54 1.17 5.86 ▇▂▁▁▁
lr_logfc 0 1 0.52 0.48 -0.33 0.17 0.37 0.73 4.05 ▇▃▁▁▁
spec_weight 0 1 0.07 0.05 0.01 0.04 0.06 0.08 0.59 ▇▁▁▁▁
lrscore 0 1 0.85 0.06 0.63 0.80 0.85 0.89 0.97 ▁▂▆▇▅
lr_probs 0 1 0.03 0.04 0.00 0.00 0.01 0.03 0.31 ▇▁▁▁▁
cellchat_pvals 0 1 0.05 0.21 0.00 0.00 0.00 0.00 1.00 ▇▁▁▁▁
steady_rank 0 1 0.00 0.00 0.00 0.00 0.00 0.00 0.04 ▇▁▁▁▁
specificity_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▁▁▁▁
magnitude_rank 0 1 0.01 0.01 0.00 0.00 0.00 0.01 0.05 ▇▂▁▁▁

Merge datasets

Code
lutomska_norm <-
  lutomska_norm |>
  mutate(
    region = "ARC",
    condition = "HFHSD",
    control = TRUE
  )

lutomska_hfhsd <-
  lutomska_hfhsd |>
  mutate(
    region = "ARC",
    condition = "HFHSD",
    control = FALSE
  )

deng_norm <-
  deng_norm |>
  mutate(
    region = "ARC",
    condition = "HFD",
    control = TRUE
  )

deng_hfd <-
  deng_hfd |>
  mutate(
    region = "ARC",
    condition = "HFD",
    control = FALSE
  )

lopez_norm <-
  lopez_norm |>
  mutate(
    region = "PVN",
    condition = "CSDS",
    control = TRUE
  )

lopez_csds <-
  lopez_csds |>
  mutate(
    region = "PVN",
    condition = "CSDS",
    control = FALSE
  )

df_complex_conditions <-
  bind_rows(
    lutomska_norm,
    lutomska_hfhsd,
    deng_norm,
    deng_hfd,
    lopez_norm,
    lopez_csds
  )
df_complex_conditions <-
  df_complex_conditions |>
  mutate(pairs = str_c(source, target, sep = "==>")) |>
  filter(pairs %in% c(
    "Astro_INSR+==>POMC neurons",
    "Astro_INSR-==>POMC neurons",
    "Astro_INSR+==>AGRP/NPY neurons",
    "Astro_INSR-==>AGRP/NPY neurons",
    "POMC neurons==>Astro_INSR+",
    "AGRP/NPY neurons==>Astro_INSR+",
    "POMC neurons==>Astro_INSR-",
    "AGRP/NPY neurons==>Astro_INSR-"
  ))

Intersection sets analysis

Code
df_complex_conditions2 <- df_complex_conditions %>%
  mutate(Label = pmap(list(region, condition, control, pairs), function(region, condition, control, pairs) {
    c(
      str_c(region, condition, sep = "_"),
      if (control) {
        "Control"
      },
      pairs
    )
  }))

df_complex_conditions2 %>%
  ggplot(aes(x = Label)) +
  geom_bar() +
  scale_x_upset(
    order_by = "degree",
    sets = c(
      "ARC_HFHSD",
      "ARC_HFD",
      "PVN_CSDS",
      "Control",
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons",
      "POMC neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR-"
    ),
    name = ""
  ) +
  theme_combmatrix(
    combmatrix.label.text = element_text(size = 12),
    combmatrix.label.extra_spacing = 5
  )

Code
df_complex_conditions2 |>
  filter(pairs %in% c(
    "Astro_INSR+==>POMC neurons",
    "Astro_INSR-==>POMC neurons",
    "Astro_INSR+==>AGRP/NPY neurons",
    "Astro_INSR-==>AGRP/NPY neurons"
  )) %>%
  ggplot(aes(x = Label, y = -log10(magnitude_rank))) +
  geom_boxplot() +
  geom_jitter(aes(color = region), width = 0.1) +
  scale_x_upset(
    order_by = "degree",
    sets = c(
      "ARC_HFHSD",
      "ARC_HFD",
      "PVN_CSDS",
      "Control",
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
      # "POMC neurons==>Astro_INSR+",
      # "AGRP/NPY neurons==>Astro_INSR+",
      # "POMC neurons==>Astro_INSR-",
      # "AGRP/NPY neurons==>Astro_INSR-"
    ),
    position = "top",
    name = ""
  ) +
  theme_combmatrix(
    combmatrix.label.text = element_text(size = 12),
    combmatrix.label.extra_spacing = 5
  )

Code
df_details <- df_complex_conditions |>
    filter(pairs %in% c(
        "Astro_INSR+==>POMC neurons",
        "Astro_INSR-==>POMC neurons",
        "Astro_INSR+==>AGRP/NPY neurons",
        "Astro_INSR-==>AGRP/NPY neurons"
    )) |> mutate(filler = 1) |>
    pivot_wider(
        names_from = condition,
        values_from = filler,
        values_fill = 0) |>
    mutate(filler = 1) |>
    pivot_wider(
        names_from = pairs,
        values_from = filler,
        values_fill = 0) |>
    mutate(control = as.integer(control))

upset(
    df_details,
    c("HFHSD",
      "HFD",
      "CSDS",
      'control',
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"),
    annotations = list(
        'Magnitude' = list(
            aes = aes(
                x = intersection,
                y = -log10(magnitude_rank
                )),
            geom = geom_boxplot(na.rm = TRUE)
        ),
        'LogFoldChange' = list(
            aes = aes(
                x = intersection,
                y = lr_logfc
            ),
            geom = list(
                geom_jitter(aes(color = -log10(specificity_rank)), na.rm = TRUE),
                geom_violin(alpha = 0.5, na.rm = TRUE)
            )
        )
    ),
    min_degree = 3,
    min_size = 10,
    width_ratio = 0.1,
    themes = modifyList(upset_themes,
                        list(
                            Magnitude = theme(), LogFoldChange = theme()
                        )),
    group_by = 'sets',
    queries = list(
        upset_query(
            group = "Astro_INSR+==>POMC neurons",
            color = 'blue'
        ),
        upset_query(
            group = "Astro_INSR-==>POMC neurons",
            color = 'orange'
        ),
        upset_query(
            group = "Astro_INSR+==>AGRP/NPY neurons",
            color = 'purple'
        ),
        upset_query(
            group = "Astro_INSR-==>AGRP/NPY neurons",
            color = 'cyan'
        ),
        upset_query(
            set = "Astro_INSR+==>POMC neurons",
            fill = 'blue'
        ),
        upset_query(
            set = "Astro_INSR-==>POMC neurons",
            fill = 'orange'
        ),
        upset_query(
            set = "Astro_INSR+==>AGRP/NPY neurons",
            fill = 'purple'
        ),
        upset_query(
            set = "Astro_INSR-==>AGRP/NPY neurons",
            fill = 'cyan'
        )),
    set_sizes = (
        upset_set_size(
            # geom=geom_bar(
            #     aes(fill=control, x=group),
            #     width=0.8
            # ),
            # position='right'
        )
        + geom_text(aes(label = ..count..), hjust = 1.1, stat = 'count')
        + theme(axis.text.x = element_text(angle = 90))
    ),
    stripes = upset_stripes(
        geom = geom_segment(size = 5),
        colors = c('cornsilk1', 'deepskyblue1')
    )
)

Code
df <- df_complex_conditions %>%
  filter(
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    ),
    condition == "HFD"
  ) %>%
  mutate(
    neg_log10_specificity_rank = -log10(specificity_rank),
    neg_log10_magnitude_rank = -log10(magnitude_rank),
    lr_complex = str_c(ligand_complex, receptor_complex, sep = "–>")
  ) %>%
  select(pairs, lr_complex, ligand_complex, receptor_complex, neg_log10_specificity_rank, neg_log10_magnitude_rank, control)


top_bot_10 <- df %>%
  group_by(pairs, control) %>%
  slice_max(order_by = neg_log10_specificity_rank, n = 20)
Code
pr <- ggplot(df, aes(x = pairs, y = neg_log10_specificity_rank, color = as.factor(control), size = neg_log10_magnitude_rank)) +
  geom_jitter(width = 0.1) +
  geom_line(aes(group = lr_complex), linetype = "solid", alpha = 0.2) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) +
  facet_wrap(~control)

# Add text labels for min and max 5 values within each group using ggrepel
pr <- pr + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR+==>POMC neurons"),
  aes(
    label = receptor_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = 0.2, direction = "y", hjust = "left",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
) + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR-==>POMC neurons"),
  aes(
    label = receptor_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = -.2, direction = "y", hjust = "right",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
)

print(pr)

Code
pl <- ggplot(df, aes(x = pairs, y = neg_log10_specificity_rank, color = as.factor(control), size = neg_log10_magnitude_rank)) +
  geom_jitter(width = 0.1) +
  geom_line(aes(group = lr_complex), linetype = "solid", alpha = 0.2) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) +
  facet_wrap(~control)

# Add text labels for min and max 5 values within each group using ggrepel
pl <- pl + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR+==>POMC neurons"),
  aes(
    label = ligand_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = 0.2, direction = "y", hjust = "left",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
) + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR-==>POMC neurons"),
  aes(
    label = ligand_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = -.2, direction = "y", hjust = "right",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
)
print(pl)

Code
plr <- ggplot(df, aes(x = pairs, y = neg_log10_specificity_rank, color = as.factor(control), size = neg_log10_magnitude_rank)) +
  geom_jitter(width = 0.1) +
  geom_line(aes(group = lr_complex), linetype = "solid", alpha = 0.2) +
  theme_minimal() +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) +
  facet_wrap(~control)

# Add text labels for min and max 5 values within each group using ggrepel
plr <- plr + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR+==>POMC neurons"),
  aes(
    label = lr_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = 0.2, direction = "y", hjust = "left",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
) + geom_text_repel(
  data = top_bot_10 %>% filter(pairs == "Astro_INSR-==>POMC neurons"),
  aes(
    label = lr_complex,
    point.size = neg_log10_magnitude_rank
  ), # data point size
  nudge_x = -.2, direction = "y", hjust = "right",
  size = 6, # font size in the text labels
  point.padding = 0, # additional padding around each point
  min.segment.length = 0, # draw all line segments
  max.time = 5, max.iter = 1e6, # stop after 1 second, or after 100,000 iterations
  seed = reseed,
  max.overlaps = Inf,
  box.padding = 0.5
)
print(plr)

Astrocytes >>> Neurons

Arcuate

Specificity

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_specificity_rank,
    idx = c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:39 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired mean difference of Astro_INSR-==>POMC neurons (n = 377) minus Astro_INSR+==>POMC neurons (n = 454)
 -0.222 [95CI  -0.37; -0.0832]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:39 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired Cohen's d of Astro_INSR-==>POMC neurons (n = 377) minus Astro_INSR+==>POMC neurons (n = 454)
 -0.213 [95CI  -0.356; -0.0781]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(
    neg_log10_specificity_rank = -log10(specificity_rank),
    control = if_else(
      control,
      "Norm",
      "HFD"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "Norm: Astro_INSR+==>POMC neurons",
        "Norm: Astro_INSR-==>POMC neurons",
        "Norm: Astro_INSR+==>AGRP/NPY neurons",
        "Norm: Astro_INSR-==>AGRP/NPY neurons"
      ),
      c(
        "HFD: Astro_INSR+==>POMC neurons",
        "HFD: Astro_INSR-==>POMC neurons",
        "HFD: Astro_INSR+==>AGRP/NPY neurons",
        "HFD: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff, color.column = condition)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d, color.column = condition)

Magnitude

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_magnitude_rank,
    idx = c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:40 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired mean difference of Astro_INSR-==>POMC neurons (n = 377) minus Astro_INSR+==>POMC neurons (n = 454)
 -0.0276 [95CI  -0.216; 0.154]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:40 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired Cohen's d of Astro_INSR-==>POMC neurons (n = 377) minus Astro_INSR+==>POMC neurons (n = 454)
 -0.0205 [95CI  -0.157; 0.118]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(
    neg_log10_magnitude_rank = -log10(magnitude_rank),
    control = if_else(
      control,
      "Norm",
      "HFD"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "Norm: Astro_INSR+==>POMC neurons",
        "Norm: Astro_INSR-==>POMC neurons",
        "Norm: Astro_INSR+==>AGRP/NPY neurons",
        "Norm: Astro_INSR-==>AGRP/NPY neurons"
      ),
      c(
        "HFD: Astro_INSR+==>POMC neurons",
        "HFD: Astro_INSR-==>POMC neurons",
        "HFD: Astro_INSR+==>AGRP/NPY neurons",
        "HFD: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

PVN

Specificity

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_specificity_rank,
    idx = c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:40 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired mean difference of Astro_INSR-==>POMC neurons (n = 146) minus Astro_INSR+==>POMC neurons (n = 175)
 -0.023 [95CI  -0.246; 0.198]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:40 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired Cohen's d of Astro_INSR-==>POMC neurons (n = 146) minus Astro_INSR+==>POMC neurons (n = 175)
 -0.0235 [95CI  -0.25; 0.203]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(
    neg_log10_specificity_rank = -log10(specificity_rank),
    control = if_else(
      control,
      "Norm",
      "CSDS"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "Norm: Astro_INSR+==>POMC neurons",
        "Norm: Astro_INSR-==>POMC neurons",
        "Norm: Astro_INSR+==>AGRP/NPY neurons",
        "Norm: Astro_INSR-==>AGRP/NPY neurons"
      ),
      c(
        "CSDS: Astro_INSR+==>POMC neurons",
        "CSDS: Astro_INSR-==>POMC neurons",
        "CSDS: Astro_INSR+==>AGRP/NPY neurons",
        "CSDS: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d)

Magnitude

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_magnitude_rank,
    idx = c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:41 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired mean difference of Astro_INSR-==>POMC neurons (n = 146) minus Astro_INSR+==>POMC neurons (n = 175)
 0.0631 [95CI  -0.222; 0.338]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:41 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired Cohen's d of Astro_INSR-==>POMC neurons (n = 146) minus Astro_INSR+==>POMC neurons (n = 175)
 0.0491 [95CI  -0.175; 0.265]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(
    neg_log10_magnitude_rank = -log10(magnitude_rank),
    control = if_else(
      control,
      "Norm",
      "CSDS"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "Norm: Astro_INSR+==>POMC neurons",
        "Norm: Astro_INSR-==>POMC neurons",
        "Norm: Astro_INSR+==>AGRP/NPY neurons",
        "Norm: Astro_INSR-==>AGRP/NPY neurons"
      ),
      c(
        "CSDS: Astro_INSR+==>POMC neurons",
        "CSDS: Astro_INSR-==>POMC neurons",
        "CSDS: Astro_INSR+==>AGRP/NPY neurons",
        "CSDS: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d)

Neurons >>> Astrocyte

Arcuate

Specificity

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_specificity_rank,
    idx = c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:41 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired mean difference of POMC neurons==>Astro_INSR- (n = 424) minus POMC neurons==>Astro_INSR+ (n = 533)
 -0.257 [95CI  -0.401; -0.105]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:41 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired Cohen's d of POMC neurons==>Astro_INSR- (n = 424) minus POMC neurons==>Astro_INSR+ (n = 533)
 -0.224 [95CI  -0.35; -0.0902]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(
    neg_log10_specificity_rank = -log10(specificity_rank),
    control = if_else(
      control,
      "Norm",
      "HFD"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "Norm: POMC neurons==>Astro_INSR+",
        "Norm: POMC neurons==>Astro_INSR-",
        "Norm: AGRP/NPY neurons==>Astro_INSR+",
        "Norm: AGRP/NPY neurons==>Astro_INSR-"
      ),
      c(
        "HFD: POMC neurons==>Astro_INSR+",
        "HFD: POMC neurons==>Astro_INSR-",
        "HFD: AGRP/NPY neurons==>Astro_INSR+",
        "HFD: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff, color.column = condition)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d, color.column = condition)

Magnitude

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_magnitude_rank,
    idx = c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:42 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired mean difference of POMC neurons==>Astro_INSR- (n = 424) minus POMC neurons==>Astro_INSR+ (n = 533)
 -0.0905 [95CI  -0.24; 0.0532]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:42 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired Cohen's d of POMC neurons==>Astro_INSR- (n = 424) minus POMC neurons==>Astro_INSR+ (n = 533)
 -0.0787 [95CI  -0.203; 0.048]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "ARC",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(
    neg_log10_magnitude_rank = -log10(magnitude_rank),
    control = if_else(
      control,
      "Norm",
      "HFD"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "Norm: POMC neurons==>Astro_INSR+",
        "Norm: POMC neurons==>Astro_INSR-",
        "Norm: AGRP/NPY neurons==>Astro_INSR+",
        "Norm: AGRP/NPY neurons==>Astro_INSR-"
      ),
      c(
        "HFD: POMC neurons==>Astro_INSR+",
        "HFD: POMC neurons==>Astro_INSR-",
        "HFD: AGRP/NPY neurons==>Astro_INSR+",
        "HFD: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

PVN

Specificity

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_specificity_rank,
    idx = c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:42 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired mean difference of POMC neurons==>Astro_INSR- (n = 142) minus POMC neurons==>Astro_INSR+ (n = 190)
 -0.0763 [95CI  -0.32; 0.188]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:43 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_specificity_rank

Unpaired Cohen's d of POMC neurons==>Astro_INSR- (n = 142) minus POMC neurons==>Astro_INSR+ (n = 190)
 -0.0656 [95CI  -0.278; 0.162]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(
    neg_log10_specificity_rank = -log10(specificity_rank),
    control = if_else(
      control,
      "Norm",
      "CSDS"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "Norm: POMC neurons==>Astro_INSR+",
        "Norm: POMC neurons==>Astro_INSR-",
        "Norm: AGRP/NPY neurons==>Astro_INSR+",
        "Norm: AGRP/NPY neurons==>Astro_INSR-"
      ),
      c(
        "CSDS: POMC neurons==>Astro_INSR+",
        "CSDS: POMC neurons==>Astro_INSR-",
        "CSDS: AGRP/NPY neurons==>Astro_INSR+",
        "CSDS: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d)

Magnitude

Code
df.two.group.unpaired <-
  df_complex_conditions |>
  select(
    `...1`,
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank))

two.group.unpaired <-
  df.two.group.unpaired |>
  dabest(
    x = pairs,
    y = neg_log10_magnitude_rank,
    idx = c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-"
    ),
    paired = FALSE,
    id.column = "...1"
  )

two.group.unpaired.meandiff <- mean_diff(two.group.unpaired)
two.group.unpaired.meandiff
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:43 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired mean difference of POMC neurons==>Astro_INSR- (n = 142) minus POMC neurons==>Astro_INSR+ (n = 190)
 -0.171 [95CI  -0.406; 0.0574]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.meandiff,
  slopegraph = FALSE, color.column = control
)

Code
two.group.unpaired.cohens_d <- cohens_d(two.group.unpaired)
two.group.unpaired.cohens_d
dabestr (Data Analysis with Bootstrap Estimation in R) v0.3.0
=============================================================

Good afternoon!
The current time is 13:43 PM on Saturday July 29, 2023.

Dataset    :  df.two.group.unpaired
X Variable :  pairs
Y Variable :  neg_log10_magnitude_rank

Unpaired Cohen's d of POMC neurons==>Astro_INSR- (n = 142) minus POMC neurons==>Astro_INSR+ (n = 190)
 -0.154 [95CI  -0.356; 0.0602]


5000 bootstrap resamples.
All confidence intervals are bias-corrected and accelerated.
Code
plot(two.group.unpaired.cohens_d,
  slopegraph = FALSE, color.column = control
)

Multi-two group

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    region == "PVN",
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(
    neg_log10_magnitude_rank = -log10(magnitude_rank),
    control = if_else(
      control,
      "Norm",
      "CSDS"
    )
  ) |>
  unite(
    control,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "Norm: POMC neurons==>Astro_INSR+",
        "Norm: POMC neurons==>Astro_INSR-",
        "Norm: AGRP/NPY neurons==>Astro_INSR+",
        "Norm: AGRP/NPY neurons==>Astro_INSR-"
      ),
      c(
        "CSDS: POMC neurons==>Astro_INSR+",
        "CSDS: POMC neurons==>Astro_INSR-",
        "CSDS: AGRP/NPY neurons==>Astro_INSR+",
        "CSDS: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d)

Arcuate + Paraventricular nuclei

Astrocytes >>> Neurons

Specificity

Treatment

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    !control,
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "ARC: Astro_INSR+==>POMC neurons",
        "ARC: Astro_INSR-==>POMC neurons",
        "PVN: Astro_INSR+==>POMC neurons",
        "PVN: Astro_INSR-==>POMC neurons"
      ),
      c(
        "ARC: Astro_INSR+==>AGRP/NPY neurons",
        "ARC: Astro_INSR-==>AGRP/NPY neurons",
        "PVN: Astro_INSR+==>AGRP/NPY neurons",
        "PVN: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Control

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    control,
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "ARC: Astro_INSR+==>POMC neurons",
        "ARC: Astro_INSR-==>POMC neurons",
        "PVN: Astro_INSR+==>POMC neurons",
        "PVN: Astro_INSR-==>POMC neurons"
      ),
      c(
        "ARC: Astro_INSR+==>AGRP/NPY neurons",
        "ARC: Astro_INSR-==>AGRP/NPY neurons",
        "PVN: Astro_INSR+==>AGRP/NPY neurons",
        "PVN: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Magnitude

Treatment

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    !control,
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "ARC: Astro_INSR+==>POMC neurons",
        "ARC: Astro_INSR-==>POMC neurons",
        "PVN: Astro_INSR+==>POMC neurons",
        "PVN: Astro_INSR-==>POMC neurons"
      ),
      c(
        "ARC: Astro_INSR+==>AGRP/NPY neurons",
        "ARC: Astro_INSR-==>AGRP/NPY neurons",
        "PVN: Astro_INSR+==>AGRP/NPY neurons",
        "PVN: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Control

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    control,
    pairs %in% c(
      "Astro_INSR+==>POMC neurons",
      "Astro_INSR-==>POMC neurons",
      "Astro_INSR+==>AGRP/NPY neurons",
      "Astro_INSR-==>AGRP/NPY neurons"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "ARC: Astro_INSR+==>POMC neurons",
        "ARC: Astro_INSR-==>POMC neurons",
        "PVN: Astro_INSR+==>POMC neurons",
        "PVN: Astro_INSR-==>POMC neurons"
      ),
      c(
        "ARC: Astro_INSR+==>AGRP/NPY neurons",
        "ARC: Astro_INSR-==>AGRP/NPY neurons",
        "PVN: Astro_INSR+==>AGRP/NPY neurons",
        "PVN: Astro_INSR-==>AGRP/NPY neurons"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Neurons >>> Astrocyte

Specificity

Treatment

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    !control,
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "ARC: POMC neurons==>Astro_INSR+",
        "ARC: POMC neurons==>Astro_INSR-",
        "PVN: POMC neurons==>Astro_INSR+",
        "PVN: POMC neurons==>Astro_INSR-"
      ),
      c(
        "ARC: AGRP/NPY neurons==>Astro_INSR+",
        "ARC: AGRP/NPY neurons==>Astro_INSR-",
        "PVN: AGRP/NPY neurons==>Astro_INSR+",
        "PVN: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Control

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    specificity_rank
  ) |>
  filter(
    control,
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_specificity_rank = -log10(specificity_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_specificity_rank,
    idx = list(
      c(
        "ARC: POMC neurons==>Astro_INSR+",
        "ARC: POMC neurons==>Astro_INSR-",
        "PVN: POMC neurons==>Astro_INSR+",
        "PVN: POMC neurons==>Astro_INSR-"
      ),
      c(
        "ARC: AGRP/NPY neurons==>Astro_INSR+",
        "ARC: AGRP/NPY neurons==>Astro_INSR-",
        "PVN: AGRP/NPY neurons==>Astro_INSR+",
        "PVN: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Magnitude

Treatment

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    !control,
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "ARC: POMC neurons==>Astro_INSR+",
        "ARC: POMC neurons==>Astro_INSR-",
        "PVN: POMC neurons==>Astro_INSR+",
        "PVN: POMC neurons==>Astro_INSR-"
      ),
      c(
        "ARC: AGRP/NPY neurons==>Astro_INSR+",
        "ARC: AGRP/NPY neurons==>Astro_INSR-",
        "PVN: AGRP/NPY neurons==>Astro_INSR+",
        "PVN: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Control

Code
df.multi.group <-
  df_complex_conditions |>
  select(
    pairs,
    ligand_complex,
    receptor_complex,
    region,
    condition,
    control,
    magnitude_rank
  ) |>
  filter(
    control,
    pairs %in% c(
      "POMC neurons==>Astro_INSR+",
      "POMC neurons==>Astro_INSR-",
      "AGRP/NPY neurons==>Astro_INSR+",
      "AGRP/NPY neurons==>Astro_INSR-"
    )
  ) |>
  mutate(neg_log10_magnitude_rank = -log10(magnitude_rank)) |>
  unite(
    region,
    pairs,
    col = "case",
    sep = ": "
  ) |>
  unite(
    ligand_complex,
    receptor_complex,
    col = "signal"
  )

multi.group <-
  df.multi.group %>%
  dabest(
    x = case,
    y = neg_log10_magnitude_rank,
    idx = list(
      c(
        "ARC: POMC neurons==>Astro_INSR+",
        "ARC: POMC neurons==>Astro_INSR-",
        "PVN: POMC neurons==>Astro_INSR+",
        "PVN: POMC neurons==>Astro_INSR-"
      ),
      c(
        "ARC: AGRP/NPY neurons==>Astro_INSR+",
        "ARC: AGRP/NPY neurons==>Astro_INSR-",
        "PVN: AGRP/NPY neurons==>Astro_INSR+",
        "PVN: AGRP/NPY neurons==>Astro_INSR-"
      )
    ),
    paired = FALSE,
    id.column = "signal"
  )

multi.group.mean_diff <- multi.group %>% mean_diff()
plot(multi.group.mean_diff,
  color.column = condition
)

Code
multi.group.cohens_d <- multi.group %>% cohens_d()
plot(multi.group.cohens_d,
  color.column = condition
)

Session info

Code
sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.3 (2023-03-15)
 os       macOS 14.0
 system   aarch64, darwin20
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Vienna
 date     2023-07-29
 pandoc   2.19.2 @ /opt/homebrew/Caskroom/mambaforge/base/bin/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 package          * version    date (UTC) lib source
 base64enc          0.1-3      2015-07-28 [1] CRAN (R 4.2.0)
 bayestestR         0.13.1     2023-04-07 [1] RSPM (R 4.2.3)
 beeswarm           0.4.0      2021-06-01 [1] CRAN (R 4.2.0)
 bit                4.0.5      2022-11-15 [1] CRAN (R 4.2.0)
 bit64              4.0.5      2020-08-30 [1] CRAN (R 4.2.0)
 boot               1.3-28.1   2022-11-22 [1] CRAN (R 4.2.3)
 cli                3.6.1      2023-03-23 [1] RSPM (R 4.2.3)
 coda               0.19-4     2020-09-30 [1] CRAN (R 4.2.0)
 codetools          0.2-19     2023-02-01 [1] CRAN (R 4.2.3)
 colorspace         2.1-0      2023-01-23 [1] CRAN (R 4.2.0)
 ComplexUpset     * 1.3.5      2022-11-28 [1] Github (krassowski/complex-upset@bb3f10a)
 correlation        0.8.4      2023-04-06 [1] RSPM (R 4.2.3)
 cowplot          * 1.1.1      2020-12-30 [1] CRAN (R 4.2.0)
 crayon             1.5.2      2022-09-29 [1] CRAN (R 4.2.0)
 dabestr          * 0.3.0      2022-05-21 [1] Github (ACCLAB/dabestr@8775899)
 datawizard         0.7.1      2023-04-03 [1] RSPM (R 4.2.3)
 digest             0.6.31     2022-12-11 [1] CRAN (R 4.2.0)
 dplyr            * 1.1.2      2023-04-20 [1] RSPM (R 4.2.3)
 effsize            0.8.1      2020-10-05 [1] CRAN (R 4.2.0)
 ellipsis           0.3.2      2021-04-29 [1] CRAN (R 4.2.0)
 emmeans            1.8.5      2023-03-08 [1] RSPM (R 4.2.3)
 estimability       1.4.1      2022-08-05 [1] CRAN (R 4.2.0)
 evaluate           0.20       2023-01-17 [1] CRAN (R 4.2.0)
 fansi              1.0.4      2023-01-22 [1] CRAN (R 4.2.0)
 farver             2.1.1      2022-07-06 [1] CRAN (R 4.2.0)
 fastmap            1.1.1      2023-02-24 [1] RSPM (R 4.2.3)
 forcats          * 1.0.0      2023-01-29 [1] CRAN (R 4.2.0)
 future           * 1.32.0     2023-03-07 [1] RSPM (R 4.2.3)
 generics           0.1.3      2022-07-05 [1] CRAN (R 4.2.0)
 ggbeeswarm         0.7.1.9000 2023-02-08 [1] Github (eclarke/ggbeeswarm@5dc91cc)
 ggmin              0.0.0.9000 2022-08-12 [1] Github (sjessa/ggmin@8ada274)
 ggplot2          * 3.4.2      2023-04-03 [1] RSPM (R 4.2.3)
 ggrepel          * 0.9.3      2023-02-03 [1] RSPM (R 4.2.3)
 ggstatsplot      * 0.11.1     2023-04-14 [1] RSPM (R 4.2.3)
 ggupset          * 0.3.0.9002 2022-05-21 [1] Github (const-ae/ggupset@2a03c58)
 globals            0.16.2     2022-11-21 [1] CRAN (R 4.2.0)
 glue               1.6.2      2022-02-24 [1] CRAN (R 4.2.0)
 gtable             0.3.3      2023-03-21 [1] RSPM (R 4.2.3)
 here             * 1.0.1      2020-12-13 [1] CRAN (R 4.2.0)
 hms                1.1.3      2023-03-21 [1] RSPM (R 4.2.3)
 htmltools          0.5.5      2023-03-23 [1] RSPM (R 4.2.3)
 htmlwidgets        1.6.2      2023-03-17 [1] RSPM (R 4.2.3)
 insight            0.19.1     2023-03-18 [1] RSPM (R 4.2.3)
 jsonlite           1.8.4      2022-12-06 [1] CRAN (R 4.2.0)
 knitr              1.42       2023-01-25 [1] RSPM
 labeling           0.4.2      2020-10-20 [1] CRAN (R 4.2.0)
 lattice            0.21-8     2023-04-05 [1] RSPM (R 4.2.3)
 lifecycle          1.0.3      2022-10-07 [1] CRAN (R 4.2.0)
 listenv            0.9.0      2022-12-16 [1] CRAN (R 4.2.0)
 lubridate        * 1.9.2      2023-02-10 [1] RSPM (R 4.2.3)
 magrittr         * 2.0.3      2022-03-30 [1] CRAN (R 4.2.0)
 MASS               7.3-58.3   2023-03-07 [1] RSPM (R 4.2.3)
 Matrix             1.5-4      2023-04-04 [1] RSPM (R 4.2.3)
 multcomp           1.4-23     2023-03-09 [1] RSPM (R 4.2.3)
 munsell            0.5.0      2018-06-12 [1] CRAN (R 4.2.0)
 mvtnorm            1.1-3      2021-10-08 [1] CRAN (R 4.2.0)
 paletteer          1.5.0      2022-10-19 [1] CRAN (R 4.2.0)
 parallelly         1.35.0     2023-03-23 [1] RSPM (R 4.2.3)
 parameters         0.21.0     2023-04-19 [1] RSPM (R 4.2.3)
 patchwork        * 1.1.2.9000 2023-02-08 [1] Github (thomasp85/patchwork@c14c960)
 pillar             1.9.0      2023-03-22 [1] RSPM (R 4.2.3)
 pkgconfig          2.0.3      2019-09-22 [1] CRAN (R 4.2.0)
 plyr               1.8.8      2022-11-11 [1] CRAN (R 4.2.0)
 png                0.1-8      2022-11-29 [1] CRAN (R 4.2.0)
 purrr            * 1.0.1      2023-01-10 [1] CRAN (R 4.2.0)
 R6                 2.5.1      2021-08-19 [1] CRAN (R 4.2.0)
 RColorBrewer     * 1.1-3      2022-04-03 [1] CRAN (R 4.2.0)
 Rcpp               1.0.10     2023-01-22 [1] CRAN (R 4.2.0)
 readr            * 2.1.4      2023-02-10 [1] RSPM (R 4.2.3)
 rematch2           2.1.2      2020-05-01 [1] CRAN (R 4.2.0)
 repr               1.1.6      2023-01-26 [1] CRAN (R 4.2.0)
 reticulate       * 1.28-9000  2023-04-22 [1] Github (rstudio/reticulate@63a5c3e)
 rlang              1.1.0      2023-03-14 [1] RSPM (R 4.2.3)
 rmarkdown          2.21       2023-03-26 [1] RSPM (R 4.2.3)
 rprojroot          2.0.3      2022-04-02 [1] CRAN (R 4.2.0)
 sandwich           3.0-2      2022-06-15 [1] CRAN (R 4.2.0)
 scales             1.2.1      2022-08-20 [1] CRAN (R 4.2.0)
 sessioninfo        1.2.2      2021-12-06 [1] CRAN (R 4.2.0)
 skimr            * 2.1.5      2023-02-08 [1] Github (ropensci/skimr@d5126aa)
 statsExpressions   1.5.0      2023-02-19 [1] RSPM (R 4.2.3)
 stringi            1.7.12     2023-01-11 [1] CRAN (R 4.2.0)
 stringr          * 1.5.0      2022-12-02 [1] CRAN (R 4.2.0)
 survival           3.5-5      2023-03-12 [1] RSPM (R 4.2.3)
 TH.data            1.1-2      2023-04-17 [1] RSPM (R 4.2.3)
 tibble           * 3.2.1      2023-03-20 [1] RSPM (R 4.2.3)
 tidyr            * 1.3.0      2023-01-24 [1] CRAN (R 4.2.0)
 tidyselect         1.2.0      2022-10-10 [1] CRAN (R 4.2.0)
 tidyverse        * 2.0.0      2023-02-22 [1] RSPM (R 4.2.3)
 timechange         0.2.0      2023-01-11 [1] CRAN (R 4.2.0)
 tzdb               0.3.0      2022-03-28 [1] CRAN (R 4.2.0)
 utf8               1.2.3      2023-01-31 [1] CRAN (R 4.2.0)
 vctrs              0.6.2      2023-04-19 [1] RSPM (R 4.2.3)
 vipor              0.4.5      2017-03-22 [1] CRAN (R 4.2.0)
 vroom              1.6.1      2023-01-22 [1] CRAN (R 4.2.0)
 withr              2.5.0      2022-03-03 [1] CRAN (R 4.2.0)
 xfun               0.39       2023-04-20 [1] RSPM (R 4.2.3)
 xtable             1.8-4      2019-04-21 [1] CRAN (R 4.2.0)
 yaml               2.3.7      2023-01-23 [1] RSPM
 zeallot            0.1.0      2018-01-28 [1] CRAN (R 4.2.0)
 zoo                1.8-12     2023-04-13 [1] RSPM (R 4.2.3)

 [1] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library

──────────────────────────────────────────────────────────────────────────────