2.4 Main Theme: Accessing KPMP Data
library("dplyr")
library("Seurat")
library("knitr")
library("ggplot2")
library("BiocManager")
library("here")
#BiocManager::install("EnhancedVolcano")
library("EnhancedVolcano") #volcano plot
#install.packages('DESeq2') #for DEG
library("DESeq2")
library("tidyverse") #tidy up data
library("styler") #tidy up data
library("scCustomize") #for color scales)
if (!require("kableExtra")) {install.packages("kableExtra"); require("kableExtra")} # for color brewer
if (!require("RColorBrewer")) {install.packages("RColorBrewer"); require("RColorBrewer")} # for color brewer
if (!require("sctransform")) {install.packages("sctransform"); require("sctransform")} # for data normalization
if (!require("glmGamPoi")) {BiocManager::install('glmGamPoi'); require("glmGamPoi")} # for data normalization, sctransform
if (!require("cowplot")) {install.packages("cowplot"); require("cowplot")} # for figure layout
if (!require("patchwork")) {install.packages("patchwork"); require("patchwork")} # for figure patching
if (!require("openxlsx")) {install.packages("openxlsx"); require("openxlsx")} # to save .xlsx files
# install.packages("styler")
set.seed(12345)
# here()
Welcome to the Single-Cell Omics Research and Education Club!
If this is your time to the club, I want to extend and extra-special welcome to you!
I’m Jonathan Nelson, an Assistant Professor at the University of Southern California. I’m a wet scientist turned wet+dry scientist. I’ve been working with single-cell RNAseq data for the past 5 years and I’m excited to share what I’ve learned with you.
We believe that bioinformatics is a constantly evolving field, and that ongoing learning and professional development is essential to staying up-to-date. We encourage members to share their knowledge and experiences with each other, and to seek out opportunities for continued learning.
We believe that access to bioinformatics support should be available to everyone. We strive to create a welcoming and inclusive environment where all members can feel comfortable asking for help and contributing to the group.
We believe that working together is key to achieving success in bioinformatics. We value the diversity of perspectives and backgrounds that each member brings, and we encourage open communication and the sharing of ideas.
We believe in conducting ourselves with honesty and professionalism in all our interactions. We hold ourselves to high ethical standards and respect the privacy and confidentiality of all members.
We believe in approaching each other with empathy and kindness. We understand that bioinformatics can be a challenging and sometimes frustrating field, and we strive to support each other through these difficulties.
I know a lot of this has been going on in the background for everyeone and I wanted to bring it to the forefront. My expectation is that we have about 6 of these meetings together and then we can re-evaluate if we want to continue as a group or not.
Email me you would like me to add anyone: j.nelson@med.usc.edu
Today’s code (this html file) will be posted to the SCORE website (https://usckrc.github.io/website/score.html)
https://open.spotify.com/album/1zHR48K6XtWYm6bhrw4J6C?si=y4Jy1TloTuuRLYQLkyDgRg
https://rstudio.github.io/renv/articles/renv.html
https://pubmed.ncbi.nlm.nih.gov/39982410/
SO <- readRDS(here("Week 4 CellChat", "data", "CACPR_integrated.rds"))
DimPlot(SO, group.by = "subclass.CACPR") + ggtitle("")
DefaultAssay(SO) <- "RNA"
SO@meta.data
markers.to.plot1 <- c("Lrp2", # PT
"Slc5a12", # PT-S1
"Slc13a3", # PT-S2
"Slc16a9", # PT-S3
"Havcr1", # Injured PT
"Epha7", # dTL
"Slc12a1", # TAL
"Cldn10", # TAL
"Cldn16", # TAL
"Nos1", # MD
"Slc12a3", # DCT
"Pvalb", # DCT1
"Slc8a1", # DCT2, CNT
"Aqp2", # PC
"Slc4a1", # IC-A
"Slc26a4", # IC-B
"Upk1b", # Uro
"Ncam1", # PEC
"Pdgfrb", # Perivascular
"Piezo2", # Mesangial
"Pdgfra", # Fib
"Acta2", # Mural
"Nphs1", # Podo
"Kdr", # Capillary Endo
"Lyve1", # Lymph
"Ptprc", # Immune
"Cd74", # Macrophage
"Skap1" # B/T Cells
)
DotPlot(SO,
features = markers.to.plot1,
dot.scale = 8,
dot.min = 0,
scale.max = 100,
scale.min = 0,
col.min = -2.5,
col.max = 2.5,
group.by = "class.CACPR") +
coord_flip() +
theme_classic() +
theme(axis.line = element_line(size = 1, colour = "black"),
axis.ticks.x = element_blank(),
panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
panel.border = element_blank(),
panel.background = element_blank(),
text = element_text(size=20),
axis.text.x = element_text(angle = 45, hjust = 1)) +
xlab(NULL) +
ylab(NULL)
https://pubmed.ncbi.nlm.nih.gov/33637194/
https://pubmed.ncbi.nlm.nih.gov/37468583/
https://www.kpmp.org/available-data
Participant ID
Tissue Source
Protocol
Sample Type
Enrollment Category
Primary Adjudicated Category
Sex
Age (Years) (Binned)
Race
KDIGO Stage
Baseline eGFR (ml/min/1.73m2) (Binned)
Proteinuria (mg) (Binned)
A1c (%) (Binned)
Albuminuria (mg) (Binned)
Diabetes
History
Diabetes Duration (Years)
Hypertension History
Hypertension Duration (Years)
On RAAS Blockade
https://www.kpmp.org/help-docs/study-overview?tabname=citingkpmpdata
Nikki Bonevich is a great point of contact for KPMP data questions
email: bonevicn@umich.edu
I hope that you found this session helpful.
Do you have a coding problem that you’d like some
support on?
Do you have a topic you’d like covered
at a future meeting?
Email me: j.nelson@med.usc.edu
## R version 4.4.3 (2025-02-28 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 22631)
##
## Matrix products: default
##
##
## locale:
## [1] LC_COLLATE=English_United States.utf8
## [2] LC_CTYPE=English_United States.utf8
## [3] LC_MONETARY=English_United States.utf8
## [4] LC_NUMERIC=C
## [5] LC_TIME=English_United States.utf8
##
## time zone: America/Los_Angeles
## tzcode source: internal
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] openxlsx_4.2.8 patchwork_1.3.0
## [3] cowplot_1.1.3 glmGamPoi_1.18.0
## [5] sctransform_0.4.1 RColorBrewer_1.1-3
## [7] kableExtra_1.4.0 scCustomize_3.0.1
## [9] styler_1.10.3 lubridate_1.9.4
## [11] forcats_1.0.0 stringr_1.5.1
## [13] purrr_1.0.4 readr_2.1.5
## [15] tidyr_1.3.1 tibble_3.2.1
## [17] tidyverse_2.0.0 DESeq2_1.46.0
## [19] SummarizedExperiment_1.36.0 Biobase_2.66.0
## [21] MatrixGenerics_1.18.1 matrixStats_1.5.0
## [23] GenomicRanges_1.58.0 GenomeInfoDb_1.42.3
## [25] IRanges_2.40.1 S4Vectors_0.44.0
## [27] BiocGenerics_0.52.0 EnhancedVolcano_1.24.0
## [29] ggrepel_0.9.6 here_1.0.1
## [31] BiocManager_1.30.25 ggplot2_3.5.1
## [33] knitr_1.50 SeuratObject_5.0.2
## [35] Seurat_4.4.0 dplyr_1.1.4
##
## loaded via a namespace (and not attached):
## [1] RcppAnnoy_0.0.22 splines_4.4.3 later_1.4.1
## [4] R.oo_1.27.0 polyclip_1.10-7 janitor_2.2.1
## [7] lifecycle_1.0.4 rprojroot_2.0.4 globals_0.16.3
## [10] lattice_0.22-6 MASS_7.3-64 magrittr_2.0.3
## [13] plotly_4.10.4 sass_0.4.9 rmarkdown_2.29
## [16] jquerylib_0.1.4 yaml_2.3.10 httpuv_1.6.15
## [19] zip_2.3.2 spam_2.11-1 sp_2.2-0
## [22] spatstat.sparse_3.1-0 reticulate_1.41.0.1 pbapply_1.7-2
## [25] abind_1.4-8 zlibbioc_1.52.0 Rtsne_0.17
## [28] R.cache_0.16.0 R.utils_2.13.0 circlize_0.4.16
## [31] GenomeInfoDbData_1.2.13 irlba_2.3.5.1 listenv_0.9.1
## [34] spatstat.utils_3.1-3 goftest_1.2-3 spatstat.random_3.3-2
## [37] fitdistrplus_1.2-2 parallelly_1.42.0 svglite_2.1.3
## [40] leiden_0.4.3.1 codetools_0.2-20 DelayedArray_0.32.0
## [43] xml2_1.3.8 shape_1.4.6.1 tidyselect_1.2.1
## [46] UCSC.utils_1.2.0 farver_2.1.2 spatstat.explore_3.3-4
## [49] jsonlite_1.9.1 progressr_0.15.1 ggridges_0.5.6
## [52] survival_3.8-3 systemfonts_1.2.1 tools_4.4.3
## [55] ica_1.0-3 Rcpp_1.0.14 glue_1.8.0
## [58] gridExtra_2.3 SparseArray_1.6.2 xfun_0.51
## [61] withr_3.0.2 fastmap_1.2.0 digest_0.6.37
## [64] timechange_0.3.0 R6_2.6.1 mime_0.12
## [67] ggprism_1.0.6 colorspace_2.1-1 scattermore_1.2
## [70] tensor_1.5 spatstat.data_3.1-6 R.methodsS3_1.8.2
## [73] generics_0.1.3 data.table_1.17.0 httr_1.4.7
## [76] htmlwidgets_1.6.4 S4Arrays_1.6.0 uwot_0.2.3
## [79] pkgconfig_2.0.3 gtable_0.3.6 lmtest_0.9-40
## [82] XVector_0.46.0 htmltools_0.5.8.1 dotCall64_1.2
## [85] scales_1.3.0 png_0.1-8 snakecase_0.11.1
## [88] spatstat.univar_3.1-2 rstudioapi_0.17.1 tzdb_0.5.0
## [91] reshape2_1.4.4 nlme_3.1-167 GlobalOptions_0.1.2
## [94] cachem_1.1.0 zoo_1.8-14 KernSmooth_2.23-26
## [97] parallel_4.4.3 miniUI_0.1.1.1 vipor_0.4.7
## [100] ggrastr_1.0.2 pillar_1.10.1 grid_4.4.3
## [103] vctrs_0.6.5 RANN_2.6.2 promises_1.3.2
## [106] xtable_1.8-4 cluster_2.1.8 paletteer_1.6.0
## [109] beeswarm_0.4.0 evaluate_1.0.3 cli_3.6.4
## [112] locfit_1.5-9.12 compiler_4.4.3 rlang_1.1.5
## [115] crayon_1.5.3 future.apply_1.11.3 rematch2_2.1.2
## [118] plyr_1.8.9 ggbeeswarm_0.7.2 stringi_1.8.4
## [121] viridisLite_0.4.2 deldir_2.0-4 BiocParallel_1.40.0
## [124] munsell_0.5.1 lazyeval_0.2.2 spatstat.geom_3.3-5
## [127] Matrix_1.7-2 hms_1.1.3 future_1.34.0
## [130] shiny_1.10.0 ROCR_1.0-11 igraph_2.1.4
## [133] bslib_0.9.0