Last updated: 2025-04-16

Checks: 6 1

Knit directory: multigroup_ctwas_analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20231112) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version a57369f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    cv/

Unstaged changes:
    Modified:   analysis/comparing_differnt_settings_ldmm.Rmd
    Modified:   analysis/comparing_differnt_settings_susieST.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/comparing_differnt_settings_susieST.Rmd) and HTML (docs/comparing_differnt_settings_susieST.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd b815d3b XSun 2025-04-09 update
html b815d3b XSun 2025-04-09 update
Rmd bda6e43 XSun 2025-04-09 update
Rmd f119060 XSun 2025-04-05 update
html f119060 XSun 2025-04-05 update

Introduction

Settings are:

  • THINS = [“0.1”,“0.5”,“1”]
  • GROUP_PRIOR_VAR_STRUCTURES = [“shared_all”, “shared_type”]
  • NUMBER_OF_SIGNALS = [“1”,“5”]
  • WITH_ST = [“with_ST”, “without_ST”,“with_susieST”]
library(ctwas)
library(ggplot2)
library(dplyr)
library(tidyr)
library(scales)

source("/project/xinhe/xsun/multi_group_ctwas/data/samplesize.R")

mapping_predictdb <- readRDS("/project2/xinhe/shared_data/multigroup_ctwas/weights/mapping_files/PredictDB_mapping.RDS")
mapping_munro <- readRDS("/project2/xinhe/shared_data/multigroup_ctwas/weights/mapping_files/Munro_mapping.RDS")
mapping_two <- rbind(mapping_predictdb,mapping_munro)

traits_silver <- c("T2D","LDL","BMI","RBC","IBD","SCZ","aFib")
names(traits_silver) <- c("T2D-panukb","LDL-ukb-d-30780_irnt","BMI-panukb","RBC-panukb","IBD-ebi-a-GCST004131","SCZ-ieu-b-5102","aFib-ebi-a-GCST006414")


folder_results_old <- "/project/xinhe/shengqian/ctwas_GWAS_analysis/snakemake_outputs/"
folder_results_susieST <- "/project/xinhe/xsun/multi_group_ctwas/15.susie_weights/snakemake_outputs/"

thins <- c("0.1", "0.5", "1")
var_strucs <- c("shared_all", "shared_type")
Ls <- c("5","1")
sts <- c("without_ST","with_ST","with_susieST")

# st <- "without_ST"
# var_struc  <- "shared_all"
# L  <- 5
# thin  <- 0.1

create_summary_plot_withTP <- function(df, columns_to_plot, x_var = "setting", x_order = NULL, title = NULL) {

  # Reshape data
  df_long <- df %>%
    pivot_longer(
      cols = all_of(columns_to_plot),
      names_to = "variable",
      values_to = "value"
    )
  
  # Convert to factor with specified order if x_order is provided
  if (!is.null(x_order)) {
    df_long <- df_long %>%
      mutate(across(all_of(x_var), ~factor(., levels = x_order)))
  }
  
  # Identify the max value for scaling
  max_main <- max(df_long$value[df_long$variable != "TP_rate"], na.rm = TRUE)
  max_tp_rate <- max(df_long$value[df_long$variable == "TP_rate"], na.rm = TRUE)
  
  if(max_tp_rate ==0) {
    max_tp_rate <- 1
  }
  
  # Rescale TP_rate
  df_long <- df_long %>%
    mutate(scaled_value = ifelse(variable == "TP_rate", 
                                 value * (max_main / max_tp_rate), value))
  
  # Create plot
  ggplot(df_long, aes(x = .data[[x_var]], y = scaled_value, color = variable, shape = variable)) +
    #geom_point(size = 3, position = position_jitter(width = 0.2)) +
    geom_point(size = 3) + 
    scale_y_continuous(
      name = "Count",
      sec.axis = sec_axis(~ . * (max_tp_rate / max_main), name = "TP Rate")
    ) +
    labs(x = "Settings", title = title) +
    theme_minimal() +
    theme(
      axis.text.x = element_text(angle = 45, hjust = 1, size = 10),
      legend.position = "right",
      legend.title = element_blank()
    ) +
    scale_color_brewer(palette = "Set1")
}


create_summary_plot <- function(df, columns_to_plot, x_var = "setting", x_order = NULL, title = NULL) {
  # Reshape data
  df_long <- df %>%
    pivot_longer(
      cols = all_of(columns_to_plot),
      names_to = "variable",
      values_to = "value"
    )
  
  # Convert to factor with specified order if x_order is provided
  if (!is.null(x_order)) {
    df_long <- df_long %>%
      mutate(across(all_of(x_var), ~factor(., levels = x_order)))
  }
  
  # Create plot
  ggplot(df_long, aes(x = .data[[x_var]], y = value, color = variable)) +
    #geom_point(size = 3, position = position_jitter(width = 0.2)) +
    geom_point(size = 3) + 
    labs(x = "Settings", y = "Count/Value", title = title) +
    theme_minimal() +
    theme(
      axis.text.x = element_text(angle = 45, hjust = 1, size = 10),
      legend.position = "right",
      legend.title = element_blank()
    ) +
    scale_color_brewer(palette = "Set1")
}

LDL-ukb-d-30780_irnt

trait <- "LDL-ukb-d-30780_irnt"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {
        
        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))
        
        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)
        
        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bygroup_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]
        
        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))
        
        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))
        
        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")
        
        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))
        
      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
# 
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
# 
# ## bystander genes
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
# 
# ## tp
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05

IBD-ebi-a-GCST004131

trait <- "IBD-ebi-a-GCST004131"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))
        
        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)
        
        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bygroup_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]
        
        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))
        
        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))
        
        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")
        
        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))
        
      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
# 
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
# 
# ## bystander genes
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
# 
# ## tp
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05

T2D-panukb

trait <- "T2D-panukb"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {
        
        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }

        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))

        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))

        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)

        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bygroup_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]

        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))

        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))

        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")

        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))

      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names,
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
#
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
#
# ## bystander genes
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
#
# ## tp
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names,
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

Version Author Date
f119060 XSun 2025-04-05
DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {
        
        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }

        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05

BMI-panukb

trait <- "BMI-panukb"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))

        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))

        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)

        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bygroup_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]

        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))

        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))

        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")

        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))

      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names,
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
#
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
#
# ## bystander genes
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
#
# ## tp
# create_summary_plot(df,x_order = setting_names,
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names,
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

Version Author Date
b815d3b XSun 2025-04-09
f119060 XSun 2025-04-05
DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
f119060 XSun 2025-04-05

aFib-ebi-a-GCST006414

trait <- "aFib-ebi-a-GCST006414"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()

sts_noother <- "with_susieST"

for (st in sts_noother) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {
        
        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))
        
        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)
        
        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bytype_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]
        
        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))
        
        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))
        
        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")
        
        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))
        
      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
# 
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
# 
# ## bystander genes
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
# 
# ## tp
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

Version Author Date
b815d3b XSun 2025-04-09
DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts_noother) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
b815d3b XSun 2025-04-09

SCZ-ieu-b-5102

trait <- "SCZ-ieu-b-5102"

setting_names <- c()
prop_h2g_nonsnp_all <- c()
num_gene_pip08_all <- c()
num_silver_pip08_all <- c()
num_bystander_pip08_all <- c()
imputable_known_all <- c()
imputable_bystander_all <- c()


sts_noother <- "with_susieST"

for (st in sts_noother) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {
        
        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        # non-snp %h2g
        param <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".param.RDS"))
        
        ctwas_parameters <- summarize_param(param, samplesize[trait])
        prop_h2g <- ctwas_parameters$prop_heritability
        prop_h2g_nonsnp <- 1 - ctwas_parameters$prop_heritability["SNP"]
        prop_h2g_nonsnp_all <- c(prop_h2g_nonsnp_all,prop_h2g_nonsnp)
        
        # num_gene_pip08
        combined_pip_by_group <- readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".combined_pip_bytype_final.RDS"))
        combined_pip_sig <- combined_pip_by_group[combined_pip_by_group$combined_pip > 0.8,]
        
        num_gene_pip08_all <- c(num_gene_pip08_all, nrow(combined_pip_sig))
        
        # silver_standard genes
        known <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/known_annotations_",traits_silver[trait],".RDS"))
        bystander <- readRDS(paste0("/project/xinhe/xsun/multi_group_ctwas/data/silverstandard/bystanders_",traits_silver[trait],".RDS"))

        num_silver_pip08_all <- c(num_silver_pip08_all,sum(combined_pip_sig$gene_name %in% known))
        num_bystander_pip08_all <- c(num_bystander_pip08_all,sum(combined_pip_sig$gene_name %in% bystander))
        
        # imputable genes
        z_gene <-  readRDS(paste0(folder_results,"/",trait,"/",trait,".",st,".z_gene.RDS"))
        z_gene <- z_gene %>%
                  mutate(molecular_id = sub("\\|.*", "", id)) %>%  # Extract ENSG ID from id
                  left_join(mapping_two %>% dplyr::select(molecular_id, gene_name), by = "molecular_id")
        
        imputable_known_all <- c(imputable_known_all,sum(unique(z_gene$gene_name) %in% known))
        imputable_bystander_all <- c(imputable_bystander_all,sum(unique(z_gene$gene_name) %in% bystander))
        
      }
    }
  }
}


df <- data.frame(setting = setting_names,prop_h2g_nonsnp = prop_h2g_nonsnp_all ,num_gene_pip08 = num_gene_pip08_all,
                 num_silver_total = rep(length(known),length(setting_names)), num_imputable_silver = imputable_known_all, num_silver_pip08 = num_silver_pip08_all,
                 num_bystander_total = rep(length(bystander),length(setting_names)), num_imputable_bystander = imputable_bystander_all, num_bystander_pip08 = num_bystander_pip08_all,
                 TP_rate = num_silver_pip08_all/(num_silver_pip08_all+num_bystander_pip08_all))

## plot Non-SNP %h2g
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("prop_h2g_nonsnp"), title = "%h2g -- NON-SNP")

Version Author Date
b815d3b XSun 2025-04-09
# 
# ## silver standard gene
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_imputable_silver","num_silver_pip08"),
#                     title = "Silver standard genes")
# 
# ## bystander genes
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_gene_pip08","num_bystander_pip08"),
#                     title = "Bystander genes")
# 
# ## tp
# create_summary_plot(df,x_order = setting_names, 
#                     columns_to_plot = c("num_silver_pip08"),
#                     title = "True positive rate")

create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_gene_pip08","num_silver_pip08","TP_rate","num_imputable_silver"))

Version Author Date
b815d3b XSun 2025-04-09
if(max(as.numeric(df$num_bystander_pip08)) != 0){
  create_summary_plot_withTP(df,x_order = setting_names, 
                    columns_to_plot =  c("num_bystander_pip08","TP_rate"))
}

Version Author Date
b815d3b XSun 2025-04-09
DT::datatable(df,caption = htmltools::tags$caption( style = 'caption-side: left; text-align: left; color:black;  font-size:150% ;',trait),options = list(pageLength = 10) )
db <- "GO_Biological_Process_2023"

num_go_adj005 <- c()
setting_names <- c()
for (st in sts_noother) {
  for (thin in thins) {
    for (var_struc in var_strucs) {
      for (L in Ls) {

        if(st == "with_susieST"){
          folder_results <- folder_results_susieST
        }else{
          folder_results <- folder_results_old
        }
        
        setting_names <- c(setting_names, paste0(st,"_thin",thin,"_",var_struc,"_L",L))
        
        file_enrich <- paste0(folder_results,trait,"/",trait,".",st,".thin",thin,".",var_struc,".L",L, ".enrichr_",db,".RDS")
        if(file.exists(file_enrich)) {
          
          enrich_results <- readRDS(file_enrich)
          num_go_adj005 <- c(num_go_adj005,nrow(enrich_results))
        }else{
          num_go_adj005 <- c(num_go_adj005,0)
        }
        
        
        
      }
    }
  }
}


df <- data.frame(setting = setting_names, num_go_adj005 = num_go_adj005)
create_summary_plot(df,x_order = setting_names, 
                    columns_to_plot = c("num_go_adj005"), title = "Number of enriched GO terms, adj_p < 0.05")

Version Author Date
b815d3b XSun 2025-04-09

sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux 8.4 (Ootpa)

Matrix products: default
BLAS/LAPACK: /software/openblas-0.3.13-el8-x86_64/lib/libopenblas_skylakexp-r0.3.13.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] scales_1.2.0     tidyr_1.3.0      dplyr_1.1.2      ggplot2_3.4.2   
[5] ctwas_0.5.5.9001 workflowr_1.7.1 

loaded via a namespace (and not attached):
  [1] colorspace_2.0-3            rjson_0.2.21               
  [3] ellipsis_0.3.2              rprojroot_2.0.3            
  [5] XVector_0.38.0              locuszoomr_0.1.5           
  [7] GenomicRanges_1.50.2        base64enc_0.1-3            
  [9] fs_1.5.2                    rstudioapi_0.14            
 [11] farver_2.1.0                DT_0.22                    
 [13] ggrepel_0.9.3               bit64_4.0.5                
 [15] AnnotationDbi_1.60.2        fansi_1.0.3                
 [17] xml2_1.3.3                  logging_0.10-108           
 [19] codetools_0.2-18            cachem_1.0.6               
 [21] knitr_1.42                  jsonlite_1.8.9             
 [23] Rsamtools_2.14.0            dbplyr_2.3.2               
 [25] png_0.1-7                   readr_2.1.4                
 [27] compiler_4.2.0              httr_1.4.7                 
 [29] Matrix_1.6-1.1              fastmap_1.1.0              
 [31] lazyeval_0.2.2              cli_3.6.2                  
 [33] later_1.3.0                 htmltools_0.5.7            
 [35] prettyunits_1.1.1           tools_4.2.0                
 [37] gtable_0.3.0                glue_1.6.2                 
 [39] GenomeInfoDbData_1.2.9      rappdirs_0.3.3             
 [41] Rcpp_1.0.14                 Biobase_2.58.0             
 [43] jquerylib_0.1.4             vctrs_0.6.1                
 [45] Biostrings_2.66.0           rtracklayer_1.58.0         
 [47] crosstalk_1.2.0             xfun_0.38                  
 [49] stringr_1.5.0               ps_1.7.0                   
 [51] irlba_2.3.5                 lifecycle_1.0.4            
 [53] restfulr_0.0.15             ensembldb_2.22.0           
 [55] XML_3.99-0.9                getPass_0.2-2              
 [57] zlibbioc_1.44.0             gggrid_0.2-0               
 [59] hms_1.1.3                   promises_1.2.0.1           
 [61] MatrixGenerics_1.10.0       ProtGenerics_1.30.0        
 [63] parallel_4.2.0              SummarizedExperiment_1.28.0
 [65] RColorBrewer_1.1-3          AnnotationFilter_1.22.0    
 [67] LDlinkR_1.3.0               yaml_2.3.5                 
 [69] curl_4.3.2                  memoise_2.0.1              
 [71] sass_0.4.1                  biomaRt_2.54.1             
 [73] stringi_1.7.6               RSQLite_2.3.1              
 [75] highr_0.9                   S4Vectors_0.36.2           
 [77] BiocIO_1.8.0                GenomicFeatures_1.50.4     
 [79] BiocGenerics_0.44.0         filelock_1.0.2             
 [81] BiocParallel_1.32.6         repr_1.1.4                 
 [83] GenomeInfoDb_1.34.9         rlang_1.1.2                
 [85] pkgconfig_2.0.3             matrixStats_1.2.0          
 [87] bitops_1.0-7                evaluate_0.15              
 [89] lattice_0.20-45             purrr_1.0.1                
 [91] labeling_0.4.2              GenomicAlignments_1.34.1   
 [93] htmlwidgets_1.6.2           cowplot_1.1.1              
 [95] bit_4.0.4                   processx_3.5.3             
 [97] tidyselect_1.2.0            magrittr_2.0.3             
 [99] AMR_2.1.1                   R6_2.5.1                   
[101] IRanges_2.32.0              generics_0.1.3             
[103] DelayedArray_0.24.0         DBI_1.1.2                  
[105] withr_2.5.0                 pgenlibr_0.3.6             
[107] pillar_1.9.0                whisker_0.4                
[109] mixsqp_0.3-48               KEGGREST_1.38.0            
[111] RCurl_1.98-1.12             tibble_3.2.1               
[113] crayon_1.5.1                utf8_1.2.2                 
[115] BiocFileCache_2.6.1         plotly_4.10.0              
[117] tzdb_0.3.0                  rmarkdown_2.21             
[119] progress_1.2.2              grid_4.2.0                 
[121] data.table_1.14.4           blob_1.2.3                 
[123] callr_3.7.0                 git2r_0.30.1               
[125] digest_0.6.29               httpuv_1.6.5               
[127] stats4_4.2.0                munsell_0.5.0              
[129] viridisLite_0.4.0           skimr_2.1.4                
[131] bslib_0.3.1