--- title: "Analisi per paper" author: "Luca Vedovelli" date: "`r Sys.Date()`" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(tidyverse) library(readxl) library(gtsummary) library(ggstatsplot) library(Boruta) library(gt) ``` ## Data import ```{r} db <- read_excel(here::here("data-raw/Dati per statistica FL.xlsx")) |> janitor::clean_names() |> mutate(across(c(group_1_covid_2_transplant_3_donatore, sex_1_m_2_f, status_vivo_1_morto_0, ecmo_y_1_n_2, comorbidities_1_y_1_n_0, fibrin_y_1_n_2:fungal_infections_y_1_n_2), as.factor)) # dataReporter::makeDataReport(db,codebook = TRUE) ``` ## Infezione • Vi sono differenze di infezioni tra i tre gruppi ? Ho creato una nuova varaibile che si chiama `inf_score` che assume i valore `1` se c'è almeno una infezione, e `2` o `3` se ce ne sono più di una. Ovviamente `0` se non ce ne sono in quel paziente. ```{r} db_inf <- db |> select(group_1_covid_2_transplant_3_donatore, bacterial_infections_y_1_n_2, viral_infections_y_1_n_2, fungal_infections_y_1_n_2) |> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', group_1_covid_2_transplant_3_donatore == 2 ~ 'Transplant', TRUE ~ 'Donor')) |> mutate(inf_score = case_when( bacterial_infections_y_1_n_2 == 1 & viral_infections_y_1_n_2 == 1 & fungal_infections_y_1_n_2 == 1 ~ 3, bacterial_infections_y_1_n_2 == 1 & viral_infections_y_1_n_2 == 1 ~ 2, bacterial_infections_y_1_n_2 == 1 & fungal_infections_y_1_n_2 == 1 ~ 2, viral_infections_y_1_n_2 == 1 & fungal_infections_y_1_n_2 == 1 ~ 2, bacterial_infections_y_1_n_2 == 1 ~ 1, viral_infections_y_1_n_2 == 1 ~ 1, fungal_infections_y_1_n_2 == 1 ~ 1, TRUE ~ 0 )) ``` ```{r} t0 <- db_inf |> tbl_summary(by = group_1_covid_2_transplant_3_donatore) t1 <- db_inf |> filter(group_1_covid_2_transplant_3_donatore %in% c("COVID", "Transplant")) |> tbl_summary(by = group_1_covid_2_transplant_3_donatore) |> add_p() |> modify_header(p.value ~ gt::md("**COVID vs. Transplant**")) |> # hide summary stat columns modify_table_styling(all_stat_cols(), hide = TRUE) t2 <- db_inf |> filter(group_1_covid_2_transplant_3_donatore %in% c("COVID", "Donor")) |> tbl_summary(by = group_1_covid_2_transplant_3_donatore) |> add_p() |> modify_header(p.value ~ gt::md("**COVID vs. Donor**")) |> # hide summary stat columns modify_table_styling(all_stat_cols(), hide = TRUE) t3 <- db_inf |> filter(group_1_covid_2_transplant_3_donatore %in% c("Transplant", "Donor")) |> tbl_summary(by = group_1_covid_2_transplant_3_donatore) |> add_p() |> modify_header(p.value ~ gt::md("**Transplant vs. Donor**")) |> # hide summary stat columns modify_table_styling(all_stat_cols(), hide = TRUE) t_merge <- tbl_merge(list(t0, t1, t2, t3)) %>% modify_spanning_header( list( all_stat_cols() ~ "**Groups**", starts_with("p.value") ~ "**P-values**") ) t_merge ``` • L’associaz con gli i ag infettivi era maggiormente presente in paz COVID con lunga data di malattia Associazione di infezioni (si/no) con durata della malattia, i.e. gli infetti sono hanno ICU LOS o H LOS più lunghe? • La maggiore neutrofilia nei COVID era correlata con le infezioni o era presente a prescindere ? ### Solo COVID ```{r} db_los <- db |> select( icu_los, h_los, bacterial_infections_y_1_n_2, viral_infections_y_1_n_2, fungal_infections_y_1_n_2, group_1_covid_2_transplant_3_donatore, neutrophilic_granulocytes_percent ) |> mutate(across(c(bacterial_infections_y_1_n_2:fungal_infections_y_1_n_2), ~ifelse(.==1, 'Yes', 'No'))) tbl_summary(db_los |> select(icu_los, h_los, bacterial_infections_y_1_n_2, group_1_covid_2_transplant_3_donatore, neutrophilic_granulocytes_percent) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = bacterial_infections_y_1_n_2, missing = 'no', type = c(neutrophilic_granulocytes_percent) ~ 'continuous' ) |> add_p() |> modify_caption('**Bacterial**') tbl_summary(db_los |> select(icu_los, h_los, viral_infections_y_1_n_2, group_1_covid_2_transplant_3_donatore, neutrophilic_granulocytes_percent) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = viral_infections_y_1_n_2, missing = 'no', type = c(neutrophilic_granulocytes_percent) ~ 'continuous') |> add_p() |> modify_caption('**Viral**') tbl_summary(db_los |> select(icu_los, h_los, fungal_infections_y_1_n_2, group_1_covid_2_transplant_3_donatore, neutrophilic_granulocytes_percent) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = fungal_infections_y_1_n_2, missing = 'no', type = c(neutrophilic_granulocytes_percent) ~ 'continuous') |> add_p() |> modify_caption('**Fungal**') ``` C'è una tendenza per le infezioni fungine, non per il resto. ## Cellulare • Vi sono differenze di cellularità (macrofagi, neutrofili, linfociti, fibrina, sangue e pneumociti reattivi tra i due gruppi (COVID vs IC controls) ? ```{r} db_cel <- db |> select(group_1_covid_2_transplant_3_donatore, macrophages_percent:hyperplastic_pneumocytes_y_1_n_2) |> filter(group_1_covid_2_transplant_3_donatore == 1 | group_1_covid_2_transplant_3_donatore == 2) |> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', TRUE ~ 'Transplant')) |> droplevels() # altrimenti tieni anche i donatori anche se non ci sono più tbl_summary(db_cel, by = group_1_covid_2_transplant_3_donatore, type = c(lymphocytes_percent) ~ 'continuous') |> add_p() ``` E' tutto differente ## Immunologia ```{r} tbl_summary(db |> select(group_1_covid_2_transplant_3_donatore, ifna1_delta_ct:tnf_delta_ct ), by = group_1_covid_2_transplant_3_donatore, type = everything() ~ "continuous") |> add_p() ``` IFNA1 e IL1A non sono più significative (lo erano senza gli ultimi 4 aggiunti). Metto lo stesso i grafici ```{r} # graphs of significants -------------------------------------------------- out <- c('ifna1_delta_ct', 'ifna7_delta_ct', 'ifna8_delta_ct', 'ifng_delta_ct', 'il1a_delta_ct', 'il1b_delta_ct', 'il9_delta_ct') graphs<- function(out){ ggbetweenstats( data = db, x = group_1_covid_2_transplant_3_donatore, y = {{out}}, type = 'np', title = paste0(out) ) } map(out, graphs) ``` L'associazione più interessante sembre sia con IL9, che è completamente diversa nei COVID e quindi sembra "tipica" della malattia • (solo COVID) Le citochine alterate erano maggiormente o meno alterate nei pazienti COVID con agenti infettivi ( eventualmente differenziando per agente microbico) ```{r} db_cito <- db |> select( bacterial_infections_y_1_n_2, viral_infections_y_1_n_2, fungal_infections_y_1_n_2, group_1_covid_2_transplant_3_donatore, ifna1_delta_ct, ifna7_delta_ct, ifna8_delta_ct, ifng_delta_ct, il1a_delta_ct, il1b_delta_ct, il9_delta_ct, bmi, age_years ) |> mutate(across(c(bacterial_infections_y_1_n_2:fungal_infections_y_1_n_2), ~ifelse(.==1, 'Yes', 'No'))) tbl_summary(db_cito |> select(-viral_infections_y_1_n_2, -fungal_infections_y_1_n_2) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = bacterial_infections_y_1_n_2, missing = 'no', type = c(ifng_delta_ct, il1a_delta_ct) ~ 'continuous' ) |> add_p() |> modify_caption('**Bacterial**') tbl_summary(db_cito |> select(-bacterial_infections_y_1_n_2, -fungal_infections_y_1_n_2) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = viral_infections_y_1_n_2, missing = 'no', type = c(ifng_delta_ct, il1a_delta_ct) ~ 'continuous' ) |> add_p() |> modify_caption('**Viral**') tbl_summary(db_cito |> select(-viral_infections_y_1_n_2, -bacterial_infections_y_1_n_2) |> filter(group_1_covid_2_transplant_3_donatore == '1'), by = fungal_infections_y_1_n_2, missing = 'no', type = c(ifng_delta_ct, il1a_delta_ct) ~ 'continuous' ) |> add_p() |> modify_caption('**Fungal**') ``` No, nessuna differenza di espressione delle citochine in infetti e non (gruppo COVID) ## Classificazione • Relativamente ai pazienti COVID: Quale fattore era maggiormente predittivo di cattiva outcome: partern citochinico; coinfezioni ? caratteristiche del paz , pattern di citologiase puo applicare qualche algoritmo di machine learning sarebbe carino ) Gli outcome sono:  Mortalità  Long stay ICU  Utilizzo di ECMO  Ospedalizzazione ```{r} db_boruta <- db |> filter(group_1_covid_2_transplant_3_donatore ==1) |> droplevels() |> select(sex_1_m_2_f, age_years, bmi, comorbidities_1_y_1_n_0:tnf_delta_ct, status_vivo_1_morto_0, icu_los, h_los, ecmo_y_1_n_2) ``` ### Mortalità ```{r} # Boruta non vuole missing, li imputo sempre con RF db_imp <- randomForestSRC::impute(data = as.data.frame(db_boruta)) # seed <- c(1, 23, 3011, 12345, 654321) #ne laascio solo uno perché sono consistenti seed <- c(1, 23, 3011, 12345, 654321) # creo una funzione per far girare boruta in automatico con tutti i seed boruta_fun <- function(seed){ set.seed(seed) boruta.lungs_train <- Boruta(status_vivo_1_morto_0 ~ . , maxRuns = 1000, # aumento il numero per includere le variabili escluse data = db_imp |> select(-icu_los, -h_los, -ecmo_y_1_n_2)) print(boruta.lungs_train) boruta.lungs <- TentativeRoughFix(boruta.lungs_train) print(boruta.lungs) plot <- plot(boruta.lungs, xlab = "", las = 3, cex.axis = 0.8, whichShadow = c(FALSE, FALSE, FALSE), pars = par(mar = c(9.5,4,2,1))) lungs_df <- attStats(boruta.lungs) %>% relocate(decision) %>% dplyr::select(-normHits) %>% # così ci sta nella pagina arrange(decision, desc(meanImp)) return(list(lungs_df, plot)) } boruta_res <- map(seed, ~ boruta_fun(.x)) # extract the results table in the 'boruta_res' object extraction <- function(x) { ext <- boruta_res[[x]][[1]] %>% rownames_to_column(var ='variable') %>% select(variable, decision, meanImp) %>% filter(decision == 'Confirmed') return(ext) } extracted_res <- map(1:5, ~extraction(.x)) # create a dataframe of the common boruta results in all the three results lists boruta_final <- function(extracted_res){ extraction_merged <- inner_join(extracted_res[[1]], extracted_res[[2]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_2 <- inner_join(extraction_merged, extracted_res[[3]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_3 <- inner_join(extraction_merged_2, extracted_res[[4]], by = 'variable') %>% select(-starts_with('decision')) extraction_final <- inner_join(extraction_merged_3, extracted_res[[5]], by = 'variable') %>% select(-starts_with('decision')) return(extraction_final) } # pretty table with the results boruta_final(extracted_res) |> gt() |> cols_label( variable = md('__Variable__'), meanImp.x = md('__MeanImp 1__'), meanImp.y = md('__MeanImp 2__'), meanImp.x.x = md('__MeanImp 3__'), meanImp.y.y = md('__MeanImp 4__'), meanImp = md('__MeanImp 5__') ) |> tab_header( title = md("**Common important variables**"), #use md() to specify rmkdn formatting subtitle = md(glue::glue("_Boruta iteration on 5 seeds_")) ) ``` ### ICU Stay ```{r} # creo una funzione per far girare boruta in automatico con tutti i seed boruta_fun <- function(seed){ set.seed(seed) boruta.lungs_train <- Boruta(icu_los~ . , maxRuns = 1000, # aumento il numero per includere le variabili escluse data = db_imp |> select(-status_vivo_1_morto_0, -h_los, -ecmo_y_1_n_2)) print(boruta.lungs_train) boruta.lungs <- TentativeRoughFix(boruta.lungs_train) print(boruta.lungs) plot <- plot(boruta.lungs, xlab = "", las = 3, cex.axis = 0.8, whichShadow = c(FALSE, FALSE, FALSE), pars = par(mar = c(9.5,4,2,1))) lungs_df <- attStats(boruta.lungs) %>% relocate(decision) %>% dplyr::select(-normHits) %>% # così ci sta nella pagina arrange(decision, desc(meanImp)) return(list(lungs_df, plot)) } boruta_res <- map(seed, ~ boruta_fun(.x)) # extract the results table in the 'boruta_res' object extraction <- function(x) { ext <- boruta_res[[x]][[1]] %>% rownames_to_column(var ='variable') %>% select(variable, decision, meanImp) %>% filter(decision == 'Confirmed') return(ext) } extracted_res <- map(1:5, ~extraction(.x)) # create a dataframe of the common boruta results in all the three results lists boruta_final <- function(extracted_res){ extraction_merged <- inner_join(extracted_res[[1]], extracted_res[[2]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_2 <- inner_join(extraction_merged, extracted_res[[3]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_3 <- inner_join(extraction_merged_2, extracted_res[[4]], by = 'variable') %>% select(-starts_with('decision')) extraction_final <- inner_join(extraction_merged_3, extracted_res[[5]], by = 'variable') %>% select(-starts_with('decision')) return(extraction_final) } # pretty table with the results boruta_final(extracted_res) |> gt() |> cols_label( variable = md('__Variable__'), meanImp.x = md('__MeanImp 1__'), meanImp.y = md('__MeanImp 2__'), meanImp.x.x = md('__MeanImp 3__'), meanImp.y.y = md('__MeanImp 4__'), meanImp = md('__MeanImp 5__') ) |> tab_header( title = md("**Common important variables**"), #use md() to specify rmkdn formatting subtitle = md(glue::glue("_Boruta iteration on 5 seeds_")) ) ``` ### Hospital LOS ```{r} # creo una funzione per far girare boruta in automatico con tutti i seed boruta_fun <- function(seed){ set.seed(seed) boruta.lungs_train <- Boruta(h_los~ . , maxRuns = 1000, # aumento il numero per includere le variabili escluse data = db_imp |> select(-status_vivo_1_morto_0, -icu_los, -ecmo_y_1_n_2)) print(boruta.lungs_train) boruta.lungs <- TentativeRoughFix(boruta.lungs_train) print(boruta.lungs) plot <- plot(boruta.lungs, xlab = "", las = 3, cex.axis = 0.8, whichShadow = c(FALSE, FALSE, FALSE), pars = par(mar = c(9.5,4,2,1))) lungs_df <- attStats(boruta.lungs) %>% relocate(decision) %>% dplyr::select(-normHits) %>% # così ci sta nella pagina arrange(decision, desc(meanImp)) return(list(lungs_df, plot)) } boruta_res <- map(seed, ~ boruta_fun(.x)) # extract the results table in the 'boruta_res' object extraction <- function(x) { ext <- boruta_res[[x]][[1]] %>% rownames_to_column(var ='variable') %>% select(variable, decision, meanImp) %>% filter(decision == 'Confirmed') return(ext) } extracted_res <- map(1:5, ~extraction(.x)) # create a dataframe of the common boruta results in all the three results lists boruta_final <- function(extracted_res){ extraction_merged <- inner_join(extracted_res[[1]], extracted_res[[2]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_2 <- inner_join(extraction_merged, extracted_res[[3]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_3 <- inner_join(extraction_merged_2, extracted_res[[4]], by = 'variable') %>% select(-starts_with('decision')) extraction_final <- inner_join(extraction_merged_3, extracted_res[[5]], by = 'variable') %>% select(-starts_with('decision')) return(extraction_final) } # pretty table with the results boruta_final(extracted_res) |> gt() |> cols_label( variable = md('__Variable__'), meanImp.x = md('__MeanImp 1__'), meanImp.y = md('__MeanImp 2__'), meanImp.x.x = md('__MeanImp 3__'), meanImp.y.y = md('__MeanImp 4__'), meanImp = md('__MeanImp 5__') ) |> tab_header( title = md("**Common important variables**"), #use md() to specify rmkdn formatting subtitle = md(glue::glue("_Boruta iteration on 5 seeds_")) ) ``` ### Grafico IL18 Non mi convince molto ```{r} cor.test(db_boruta$h_los, db_boruta$il18_delta_ct, method = "spearman") b <- ggplot(db_boruta, aes(x = h_los, y = il18_delta_ct)) #initiate plot b + geom_point(aes(color = il18_delta_ct), size = 4) + geom_smooth(method = lm) + scale_color_gradientn(colors = c("#00AFBB", "#E7B800", "#FC4E07")) + theme(legend.position = "right") + theme_classic(base_size = 15) + xlab(' Hospital Stay (days)') + ylab('IL-18 expression (ΔCt)') + theme(legend.title = element_blank()) + geom_text(x=90, y=0, label="Rho = 0.68") + geom_text(aes(fontface = 3), x=90, y=-5, label="p = ") + geom_text(x=95, y=-5, label="0.003") ``` ### ECMO ```{r} # creo una funzione per far girare boruta in automatico con tutti i seed boruta_fun <- function(seed){ set.seed(seed) boruta.lungs_train <- Boruta(ecmo_y_1_n_2~ . , maxRuns = 1000, # aumento il numero per includere le variabili escluse data = db_imp |> select(-status_vivo_1_morto_0, -h_los, -icu_los)) print(boruta.lungs_train) boruta.lungs <- TentativeRoughFix(boruta.lungs_train) print(boruta.lungs) plot <- plot(boruta.lungs, xlab = "", las = 3, cex.axis = 0.8, whichShadow = c(FALSE, FALSE, FALSE), pars = par(mar = c(9.5,4,2,1))) lungs_df <- attStats(boruta.lungs) %>% relocate(decision) %>% dplyr::select(-normHits) %>% # così ci sta nella pagina arrange(decision, desc(meanImp)) return(list(lungs_df, plot)) } boruta_res <- map(seed, ~ boruta_fun(.x)) # extract the results table in the 'boruta_res' object extraction <- function(x) { ext <- boruta_res[[x]][[1]] %>% rownames_to_column(var ='variable') %>% select(variable, decision, meanImp) %>% filter(decision == 'Confirmed') return(ext) } extracted_res <- map(1:5, ~extraction(.x)) # create a dataframe of the common boruta results in all the three results lists boruta_final <- function(extracted_res){ extraction_merged <- inner_join(extracted_res[[1]], extracted_res[[2]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_2 <- inner_join(extraction_merged, extracted_res[[3]], by = 'variable') %>% select(-starts_with('decision')) extraction_merged_3 <- inner_join(extraction_merged_2, extracted_res[[4]], by = 'variable') %>% select(-starts_with('decision')) extraction_final <- inner_join(extraction_merged_3, extracted_res[[5]], by = 'variable') %>% select(-starts_with('decision')) return(extraction_final) } # pretty table with the results boruta_final(extracted_res) |> gt() |> cols_label( variable = md('__Variable__'), meanImp.x = md('__MeanImp 1__'), meanImp.y = md('__MeanImp 2__'), meanImp.x.x = md('__MeanImp 3__'), meanImp.y.y = md('__MeanImp 4__'), meanImp = md('__MeanImp 5__') ) |> tab_header( title = md("**Common important variables**"), #use md() to specify rmkdn formatting subtitle = md(glue::glue("_Boruta iteration on 5 seeds_")) ) ``` ### Grafico Neutrofili-granulociti Non mi convince molto neanche questo ```{r} ggbetweenstats( data = db_boruta, x = ecmo_y_1_n_2, y = neutrophilic_granulocytes_percent, type = 'np' ) ``` ## Correlazioni citochine-clinica gruppo COVID Non ho messo nessun aggiustamento per molteplicità (visto che non lo abbiamo messo neanche prima) ```{r} db_cor <- db |> filter(group_1_covid_2_transplant_3_donatore == '1') |> select(age_years, bmi, icu_los, h_los, ifna1_delta_ct, ifna7_delta_ct, ifna8_delta_ct, ifng_delta_ct, il1a_delta_ct, il1b_delta_ct, il9_delta_ct, il18_delta_ct, neutrophilic_granulocytes_percent) ggcorrmat(db_cor, type = 'np', p.adjust.method = 'none') ``` ### Plot significative Dai plot non sembra niente di allarmante, le correlazioni sembrano più dovute al caso che a qualche effetto biologico ```{r} cor.test(db_cor$age_years, db_cor$il18_delta_ct, method = "spearman") b <- ggplot(db_cor, aes(x = age_years, y = il18_delta_ct)) #initiate plot b + geom_point(aes(color = il18_delta_ct), size = 4) + geom_smooth(method = lm) + scale_color_gradientn(colors = c("#00AFBB", "#E7B800", "#FC4E07")) + theme(legend.position = "right") + theme_classic(base_size = 15) + xlab(' Age (years)') + ylab('IL-18 expression (ΔCt)') + theme(legend.title = element_blank()) #+ # # geom_text(x=90, y=0, label="Rho = 0.68") + # # geom_text(aes(fontface = 3), x=90, y=-5, label="p = ") + # # geom_text(x=95, y=-5, label="0.003") b <- ggplot(db_cor, aes(x = icu_los, y = il18_delta_ct)) #initiate plot b + geom_point(aes(color = il18_delta_ct), size = 4) + geom_smooth(method = lm) + scale_color_gradientn(colors = c("#00AFBB", "#E7B800", "#FC4E07")) + theme(legend.position = "right") + theme_classic(base_size = 15) + xlab(' ICU LOS (years)') + ylab('IL-18 expression (ΔCt)') + theme(legend.title = element_blank()) b <- ggplot(db_cor, aes(x = h_los, y = ifna7_delta_ct)) #initiate plot b + geom_point(aes(color = ifna7_delta_ct), size = 4) + geom_smooth(method = lm) + scale_color_gradientn(colors = c("#00AFBB", "#E7B800", "#FC4E07")) + theme(legend.position = "right") + theme_classic(base_size = 15) + xlab(' Hospital LOS (years)') + ylab('IFN-A7 expression (ΔCt)') + theme(legend.title = element_blank()) ``` ## Plot richiesti per articolo ```{r, eval=FALSE} # il9_delta_ct ggbetweenstats( data = db|> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', group_1_covid_2_transplant_3_donatore == 2 ~ 'Transplant', group_1_covid_2_transplant_3_donatore == 3 ~ 'Donor')), x = group_1_covid_2_transplant_3_donatore, y = il9_delta_ct, type = 'np', xlab = '', ylab = 'IL-9 (Δct)' ) ggsave('IL9.tiff', device = 'tiff', dpi = 600, compression = 'lzw') # ifng_delta_ct ggbetweenstats( data = db|> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', group_1_covid_2_transplant_3_donatore == 2 ~ 'Transplant', group_1_covid_2_transplant_3_donatore == 3 ~ 'Donor')), x = group_1_covid_2_transplant_3_donatore, y = ifng_delta_ct, type = 'np', xlab = '', ylab = 'IFN-γ (Δct)' ) ggsave('IFNg.tiff', device = 'tiff', dpi = 600, compression = 'lzw') # il6_delta_ct ggbetweenstats( data = db|> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', group_1_covid_2_transplant_3_donatore == 2 ~ 'Transplant', group_1_covid_2_transplant_3_donatore == 3 ~ 'Donor')), x = group_1_covid_2_transplant_3_donatore, y = il6_delta_ct, type = 'np', xlab = '', ylab = 'IL-6 (Δct)' ) ggsave('IL6.tiff', device = 'tiff', dpi = 600, compression = 'lzw') # il1b_delta_ct ggbetweenstats( data = db|> mutate(group_1_covid_2_transplant_3_donatore = case_when( group_1_covid_2_transplant_3_donatore == 1 ~ 'COVID', group_1_covid_2_transplant_3_donatore == 2 ~ 'Transplant', group_1_covid_2_transplant_3_donatore == 3 ~ 'Donor')), x = group_1_covid_2_transplant_3_donatore, y = il1b_delta_ct, type = 'np', xlab = '', ylab = 'IL-1β (Δct)' ) ggsave('IL1b.tiff', device = 'tiff', dpi = 600, compression = 'lzw') # neutrophilic_granulocytes_percent ggbetweenstats( data = db_cel, x = group_1_covid_2_transplant_3_donatore, y = neutrophilic_granulocytes_percent, type = 'np', xlab = '', ylab = 'Neutrophils-granulocytes (%)' ) ggsave('neutro.tiff', device = 'tiff', dpi = 600, compression = 'lzw') ```