CSF Bulk 2. Differential Expression CSF vs PBMC

Author

Lindsay N Hayes

Published

November 26, 2025

About the Data

DESeq2 analysis of CSF and PBMC myeloid and lymphoid cells with design = ~ 0 + group the groups include: PBMC_Myel, PBMC_Lym, CSF_Myel, CSF_Lym. Differential expression between CSF and PBMC in either myeloid cells or lymphoid cells. n = 6 CSF samples and 6 PBMC samples each bulk sorted for myeloid and lymphoid cells.

library(DESeq2)
library(ggplot2)
library(cowplot)
library(pheatmap)
library(ggrepel)
library(grid)
library(rstatix)

Load Data

load("data/filt_dds_env.rda")
resultsNames(dds)

Euclidean Distance for sample to sample variance

vsd <- vst(dds, blind=FALSE)
rownames(vsd) <- rowData(dds)$gene_name
sampleDists <- dist(t(assay(vsd)))

library("RColorBrewer")
sampleDistMatrix <- as.matrix(sampleDists)
rownames(sampleDistMatrix) <- paste(vsd$tissue, vsd$cell, sep="-")
colnames(sampleDistMatrix) <- NULL
colors <- colorRampPalette( rev(brewer.pal(9, "Blues")) )(255)
pheatmap(sampleDistMatrix,
         clustering_distance_rows=sampleDists,
         clustering_distance_cols=sampleDists,
         col=colors)
sessionInfo()