Last updated: 2021-03-17

Checks: 5 2

Knit directory: CLLproteomics_batch13/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). 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 is untracked by Git. 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(20200227) 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.

The following chunks had caches available:
  • unnamed-chunk-12
  • unnamed-chunk-13
  • unnamed-chunk-48
  • unnamed-chunk-5
  • unnamed-chunk-6

To ensure reproducibility of the results, delete the cache directory manuscript_S3_trisomy12_cache and re-run the analysis. To have workflowr automatically delete the cache directory prior to building the file, set delete_cache = TRUE when running wflow_build() or wflow_publish().

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 3fb50c5. 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:    .DS_Store
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    analysis/.DS_Store
    Ignored:    analysis/.Rhistory
    Ignored:    analysis/manuscript_S1_Overview_cache/
    Ignored:    analysis/manuscript_S3_trisomy12_cache/
    Ignored:    analysis/manuscript_S4_trisomy19_cache/
    Ignored:    analysis/manuscript_S5_IGHV_cache/
    Ignored:    analysis/manuscript_S9_STAT2_cache/
    Ignored:    code/.DS_Store
    Ignored:    code/.Rhistory
    Ignored:    data/.DS_Store
    Ignored:    output/.DS_Store

Untracked files:
    Untracked:  analysis/.trisomy12_norm.pdf
    Untracked:  analysis/STAT2splicing.Rmd
    Untracked:  analysis/analysisBatch2.Rmd
    Untracked:  analysis/annotateSampleUpload.Rmd
    Untracked:  analysis/bufferAnalysis.Rmd
    Untracked:  analysis/cohortComposition.pdf
    Untracked:  analysis/cohortComposition_batch2.pdf
    Untracked:  analysis/compareBatchClinics.Rmd
    Untracked:  analysis/compareBatchGenomics.Rmd
    Untracked:  analysis/compareTreatment.Rmd
    Untracked:  analysis/complexAnalysis_overall.Rmd
    Untracked:  analysis/corumPairs.csv
    Untracked:  analysis/manuscript_S1_Overview.Rmd
    Untracked:  analysis/manuscript_S2_genomicAssociation.Rmd
    Untracked:  analysis/manuscript_S3_trisomy12.Rmd
    Untracked:  analysis/manuscript_S4_trisomy19.Rmd
    Untracked:  analysis/manuscript_S5_IGHV.Rmd
    Untracked:  analysis/manuscript_S6_del11q.Rmd
    Untracked:  analysis/manuscript_S7_SF3B1.Rmd
    Untracked:  analysis/manuscript_S8_drugResponse_Outcomes.Rmd
    Untracked:  analysis/manuscript_S9_STAT2.Rmd
    Untracked:  analysis/patAnno_exploration.csv
    Untracked:  analysis/patAnno_independent.csv
    Untracked:  analysis/patInfoTab.csv
    Untracked:  analysis/patInfoTab.tex
    Untracked:  analysis/protRNACor_eachPat.pdf
    Untracked:  analysis/test.pdf
    Untracked:  code/utils.R
    Untracked:  data/Annotation file March 2021.xlsx
    Untracked:  data/CNV_onChrom.RData
    Untracked:  data/ComplexParticipantsPubMedIdentifiers_human.txt
    Untracked:  data/Fig1A.png
    Untracked:  data/Western_blot_results_20210309_short.csv
    Untracked:  data/allComplexes.txt
    Untracked:  data/ddsrna_enc.RData
    Untracked:  data/exprCNV_enc.RData
    Untracked:  data/geneAnno.RData
    Untracked:  data/gmts/
    Untracked:  data/ic50.RData
    Untracked:  data/patMeta_enc.RData
    Untracked:  data/pepCLL_lumos_enc.RData
    Untracked:  data/proteins_in_complexes
    Untracked:  data/proteomic_explore_enc.RData
    Untracked:  data/proteomic_independent_enc.RData
    Untracked:  data/proteomic_timsTOF_enc.RData
    Untracked:  data/screenData_enc.RData
    Untracked:  data/survival_enc.RData
    Untracked:  manuscript_revision/
    Untracked:  output/MSH6_splicing.svg
    Untracked:  output/SUGP1_splicing.svg
    Untracked:  output/deResList.RData
    Untracked:  output/deResListBatch2.RData
    Untracked:  output/deResListRNA.RData
    Untracked:  output/deResList_WBC.RData
    Untracked:  output/deResList_batch1.RData
    Untracked:  output/deResList_batch3.RData
    Untracked:  output/deResList_timsTOF.RData
    Untracked:  output/dxdCLL.RData
    Untracked:  output/dxdCLL2.RData
    Untracked:  output/exprCNV.RData
    Untracked:  output/geneAnno.RData
    Untracked:  output/int_pairs.csv
    Untracked:  output/resOutcome_batch1.RData
    Untracked:  output/resOutcome_batch13.RData
    Untracked:  output/resOutcome_batch2.RData
    Untracked:  output/resOutcome_batch3.RData

Unstaged changes:
    Modified:   analysis/_site.yml
    Deleted:    analysis/analysisSF3B1.Rmd
    Deleted:    analysis/comparePlatforms.Rmd
    Deleted:    analysis/compareProteomicsRNAseq.Rmd
    Deleted:    analysis/correlateCLLPD.Rmd
    Deleted:    analysis/correlateGenomic.Rmd
    Deleted:    analysis/correlateGenomic_removePC.Rmd
    Deleted:    analysis/correlateMIR.Rmd
    Deleted:    analysis/correlateMethylationCluster.Rmd
    Modified:   analysis/index.Rmd
    Deleted:    analysis/predictOutcome.Rmd
    Deleted:    analysis/processProteomics_LUMOS.Rmd
    Deleted:    analysis/processProteomics_timsTOF.Rmd
    Deleted:    analysis/qualityControl_LUMOS.Rmd
    Deleted:    analysis/qualityControl_timsTOF.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.


There are no past versions. Publish this analysis with wflow_publish() to start tracking its development.


#Load packages and datasets

Overview of differentially expressed proteins

A table of associations with 5% FDR

resList <- filter(resList, Gene == "trisomy12") %>%
  #mutate(adj.P.Val = adj.P.global) %>% #use global corrected P-value
  mutate(Chr = rowData(protCLL[id,])$chromosome_name)
resList %>% filter(adj.P.Val <= 0.05) %>% 
  select(name, Chr,logFC, P.Value, adj.P.Val) %>%
  mutate_if(is.numeric, formatC, digits=2) %>%
  DT::datatable()

Heatmap of differentially expressed proteins (5% FDR)

proList <- filter(resList, !is.na(name), adj.P.Val < 0.01) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC_combat"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

colAnno <- filter(patMeta, Patient.ID %in% colnames(protCLL)) %>%
  select(Patient.ID, trisomy12, IGHV.status) %>%
  data.frame() %>% column_to_rownames("Patient.ID")
colAnno$trisomy12 <- ifelse(colAnno$trisomy12 %in% 1, "yes","no")

rowAnno <- rowData(protCLL)[proList,c("chromosome_name","hgnc_symbol"),drop=FALSE] %>% 
  data.frame(stringsAsFactors = FALSE) %>%
  mutate(onChr12 = ifelse(chromosome_name == "12","yes","no")) %>%
  select(hgnc_symbol, onChr12) %>% data.frame() %>% remove_rownames() %>% column_to_rownames("hgnc_symbol")

plotMat <- jyluMisc::mscale(plotMat, censor = 5)

annoCol <- list(trisomy12 = c(yes = "black",no = "grey80"),
                IGHV.status = c(M = colList[4], U = colList[3]),
                onChr12 = c(yes = colList[1],no = "white"))

pheatmap::pheatmap(plotMat, annotation_col = colAnno, scale = "none",
                   annotation_row = rowAnno,
                   clustering_method = "complete", clustering_distance_cols = "euclidean",
                   color = colorRampPalette(c(colList[2],"white",colList[1]))(100),
                   breaks = seq(-5,5, length.out = 101), annotation_colors = annoCol, 
                   show_rownames = FALSE, show_colnames = FALSE,
                   treeheight_row = 0)

Summary of chromosome distribution (5% FDR)

plotTab <- filter(resList, adj.P.Val <=0.05) %>% mutate(change = ifelse(logFC>0,"Up regulated","Down regulated"),
                              chromosome = ifelse(Chr %in% "12","chr12","other")) %>%
  group_by(change, chromosome) %>% summarise(n = length(id))

sigNumPlot <- ggplot(plotTab, aes(x=change, y=n, fill = chromosome)) + 
  geom_bar(stat = "identity", width = 0.8,
           position = position_dodge2(width = 6),
           col = "black") +
  geom_text(aes(label=n), 
            position = position_dodge(width = 0.9),
            size=4, hjust=-0.1)  +
  scale_fill_manual(name = "", labels = c("chr12","other"), values = colList) +
  coord_flip(ylim = c(0,700), expand = FALSE) + xlab("") + ylab("Number of significant associations (10% FDR)") + theme_half 
sigNumPlot

Volcano plot

plotTab <- resList 
nameList <- c("PTPN11", "GRB2", "SMAD2", "PYCARD", "STAT2","RAC2")
tri12Vocano <- plotVolcano(plotTab, fdrCut =0.05, x_lab="log2FoldChange", posCol = colList[1], negCol = colList[2],
            plotTitle = "trisomy12", ifLabel = TRUE, labelList = nameList)
tri12Vocano

PLCG1 is not significant anymore

Boxplot plot of selected genes

protTab <- sumToTidy(protCLL, rowID = "uniprotID", colID = "patID") %>%
  mutate(count = count_combat)
plotTab <- protTab %>% filter(hgnc_symbol %in% nameList) %>%
  mutate(trisomy12 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy12) %>%
  mutate(status = ifelse(trisomy12 %in% 1,"trisomy12","WT"),
         name = hgnc_symbol) %>%
  mutate(status = factor(status, levels = c("WT","trisomy12")))
pList <- plotBox(plotTab, pValTabel = resList, y_lab = "Protein expression")
protBoxplot <- cowplot::plot_grid(plotlist= pList, ncol=2)
protBoxplot

Enrichment analysis

Barplot of enriched pathways

gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
            KEGG = "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt",
            GO = "../data/gmts/c5.bp.v6.2.symbols.gmt")
inputTab <- resList %>% filter(adj.P.Val < 0.05, Gene == "trisomy12") %>%
  mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
  distinct(name, .keep_all = TRUE) %>%
  select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["Proteins associated with trisomy12"]] <- runGSEA(inputTab, gmts$H, "page")

p <- plotEnrichmentBar(enRes[[1]], pCut =0.1, ifFDR= TRUE, setName = "HALLMARK gene set", 
                       title = names(enRes)[1], removePrefix = "HALLMARK_", insideLegend=TRUE)
tri12Enrich <- cowplot::plot_grid(p)
tri12Enrich

Barplot of enriched pathways

inputTab <- resList %>% filter(adj.P.Val < 0.05, Gene == "trisomy12") %>%
  mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
  distinct(name, .keep_all = TRUE) %>%
  select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["Proteins associated with trisomy12"]] <- runGSEA(inputTab, gmts$KEGG, "page")

p <- plotEnrichmentBar(enRes[[1]], pCut =0.05, ifFDR= TRUE, setName = "HALLMARK gene set", 
                       title = names(enRes)[1], removePrefix = "KEGG_", insideLegend=TRUE)
tri12EnrichKEGG <- cowplot::plot_grid(p)
tri12EnrichKEGG

Heatmaps of protein expression in enriched pathways

resList.sig <- filter(resList, !is.na(name), adj.P.Val < 0.05) %>% distinct(name, .keep_all = TRUE) 
plotMat <- assays(protCLL)[["QRILC_combat"]][resList.sig$id,]
rownames(plotMat) <- rowData(protCLL[rownames(plotMat),])$hgnc_symbol
colAnno <- filter(patMeta, Patient.ID %in% colnames(protCLL)) %>%
  select(Patient.ID, trisomy12) %>%
  data.frame() %>% column_to_rownames("Patient.ID")
colAnno$trisomy12 <- ifelse(colAnno$trisomy12 %in% 1, "yes","no")

rowAnno <- rowData(protCLL)[resList.sig$id,c("chromosome_name","hgnc_symbol"),drop=FALSE] %>% 
  data.frame(stringsAsFactors = FALSE) %>%
  mutate(onChr12 = ifelse(chromosome_name == "12","yes","no")) %>%
  select(hgnc_symbol, onChr12) %>% data.frame() %>% remove_rownames() %>% column_to_rownames("hgnc_symbol")

plotMat <- jyluMisc::mscale(plotMat, censor = 5)

annoCol <- list(trisomy12 = c(yes = "black",no = "grey80"),
                IGHV.status = c(M = colList[3], U = colList[4]),
                onChr12 = c(yes = colList[1],no = "white"))
plotSetHeatmap(resList.sig, gmts$H, "HALLMARK_PI3K_AKT_MTOR_SIGNALING", plotMat, 
               colAnno, rowAnno = rowAnno, annoCol = annoCol, highLight = nameList)

plotSetHeatmap(resList.sig, gmts$H, "HALLMARK_MTORC1_SIGNALING", plotMat, colAnno, rowAnno = rowAnno, annoCol = annoCol,
                highLight = nameList)

plotSetHeatmap(resList.sig, gmts$KEGG, "KEGG_B_CELL_RECEPTOR_SIGNALING_PATHWAY", plotMat, 
               colAnno, rowAnno = rowAnno, annoCol = annoCol)

Compare with RNA sequencing data

Buffering of gene dosage effect

Visualizing gene dosage effect on protein and RNA level

Log2 protein counts

protExprTab <- sumToTidy(protCLL) %>%
  filter(chromosome_name == "12") %>%
  mutate(id = ensembl_gene_id, patID = colID, expr = log2Norm_combat, type = "Protein") %>%
  select(id, patID, expr, type)

Log2 RNA seq counts

rnaExprTab <- counts(dds[rownames(dds) %in% protExprTab$id,
                            colnames(dds) %in% protExprTab$patID], normalized= TRUE) %>%
  as_tibble(rownames = "id") %>%
  pivot_longer(-id, names_to = "patID", values_to = "count") %>%
  mutate(expr = log2(count)) %>%
  select(id, patID, expr) %>% mutate(type = "RNA") 
comExprTab <- bind_rows(rnaExprTab, protExprTab) %>%
  mutate(trisomy12 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy12) %>%
  filter(!is.na(trisomy12)) %>% mutate(cnv = ifelse(trisomy12 %in% 1, "trisomy12","WT"))

Proteins/RNAs on Chr12 have higher expressions in trisomy12 samples compared to other samples

plotTab <- comExprTab %>%
  group_by(id,type) %>% mutate(zscore = (expr-mean(expr))/sd(expr)) %>%
  group_by(id, cnv, type) %>% summarise(meanExpr = mean(zscore, na.rm=TRUE)) %>%
  ungroup()

dosagePlot <- ggplot(plotTab, aes(x=meanExpr, fill = cnv, col=cnv)) + 
  geom_histogram(position = "identity", alpha=0.5, bins=30) + facet_wrap(~type, scale = "fixed") +
  scale_fill_manual(values = c(WT = "grey80", trisomy12 = colList[1]), name = "") +
  scale_color_manual(values = c(WT = "grey80", trisomy12 = colList[1]), name = "") +
  #xlim(-1,1) +
  theme_full + xlab("Mean Z-score") +
  theme(strip.text = element_text(size =20))

dosagePlot

The variation of expression is higher in RNA than protein

For proteins/RNA on chr12

plotTab <- comExprTab %>%
  group_by(id, type) %>% summarise(varExp = sd(expr, na.rm=TRUE)) %>%
  ungroup()

ggplot(plotTab, aes(x=varExp,  fill = type, col=type)) + 
  geom_histogram(position = "identity", alpha=0.5) + 
  scale_fill_manual(values = c(RNA = colList[4], Protein = colList[5]), name = "") +
  scale_color_manual(values = c(RNA = colList[4], Protein = colList[5]), name = "") +
  theme_full + xlab("Standard deviation of expression")

The overall scale of change is higher in RNA expression than protein expression

plotTab <- comExprTab%>%
  group_by(id, type, cnv) %>% summarise(meanExp = mean(expr, na.rm=TRUE)) %>%
  ungroup() %>% spread(key = cnv, value = meanExp) %>%
  mutate(log2FC = trisomy12-WT)

ggplot(plotTab, aes(x=log2FC, fill = type, col=type)) + 
  geom_histogram(position = "identity", alpha=0.5, bins = 100) + 
  scale_fill_manual(values = c(RNA = colList[3], Protein = colList[4]), name = "") +
  scale_color_manual(values = c(RNA = colList[3], Protein = colList[4]), name = "") +
  #coord_cartesian(xlim=c(-0.25,0.25))+
  geom_vline(xintercept = 0, col = colList[1], linetype = "dashed") +
  theme_full + xlab("log2 Fold Change")

Analyzing buffering effect

Detect buffered and non-buffered proteins

Preprocessing protein and RNA data

#subset samples and genes
overSampe <- intersect(colnames(ddsCLL), colnames(protCLL))
overGene <- intersect(rownames(ddsCLL), rowData(protCLL)$ensembl_gene_id)
ddsSub <- ddsCLL[overGene, overSampe]
protSub <- protCLL[match(overGene, rowData(protCLL)$ensembl_gene_id),overSampe]
rowData(ddsSub)$uniprotID <- rownames(protSub)[match(rownames(ddsSub),rowData(protSub)$ensembl_gene_id)]

#vst
ddsSub.vst <- ddsSub
assay(ddsSub.vst) <- log2(counts(ddsSub, normalized=TRUE) +1)
#ddsSub.vst <- varianceStabilizingTransformation(ddsSub)

Differential expression on RNA level

#design(ddsSub) <- ~ trisomy12 + IGHV
#deRes <- DESeq(ddsSub, betaPrior = TRUE)
rnaRes <- resListRNA %>% filter(Gene == "trisomy12") %>%
  mutate(Chr = rowData(dds[id,])$chromosome) %>%
  #filter(Chr == "12") %>%
  #mutate(adj.P.Val = p.adjust(P.Value, method = "BH")) %>%
  dplyr::rename(geneID = id, log2FC.rna = log2FC, 
                pvalue.rna = P.Value, padj.rna = adj.P.Val, stat.rna= t) %>%
  select(geneID, log2FC.rna, pvalue.rna, padj.rna, stat.rna)

Protein abundance changes related to trisomy12

protRes <- resList %>% filter(Gene == "trisomy12") %>%
    mutate(Chr = rowData(protCLL[id,])$chromosome_name) %>%
    #filter(Chr == "12") %>%
    #mutate(adj.P.Val = p.adjust(P.Value, method= "BH")) %>%
    dplyr::rename(uniprotID = id, 
                  pvalue = P.Value, padj = adj.P.global,
                  chrom = Chr) %>% 
    mutate(geneID = rowData(protCLL[uniprotID,])$ensembl_gene_id) %>%
    select(name, uniprotID, geneID, chrom, log2FC, pvalue, padj, t) %>%
    dplyr::rename(stat =t) %>%
    arrange(pvalue) %>% as_tibble() 

Combine

allRes <- left_join(protRes, rnaRes, by = "geneID") %>%
  filter(!is.na(stat), !is.na(stat.rna))

Only chr12 genes that are up-regulated are considered.

fdrCut <- 0.05

bufferTab <- allRes %>% filter(chrom %in% 12, stat.rna > 0, stat>0) %>%
  ungroup() %>%
  mutate(stat.prot.sqrt = sqrt(stat),
         stat.prot.center = stat.prot.sqrt - mean(stat.prot.sqrt,na.rm= TRUE)) %>%
  mutate(score = -stat.prot.center*stat.rna,
         diffFC = log2FC.rna-log2FC) %>%
  mutate(ifBuffer = case_when(
    padj < fdrCut & padj.rna < fdrCut & stat > 0 ~ "non-Buffered",
    padj > fdrCut & padj.rna < fdrCut ~ "Buffered",
    padj < fdrCut & padj.rna > fdrCut & stat > 0 ~ "Enhanced",
    TRUE ~ "Undetermined"
  )) %>%
  arrange(desc(score))

Table

bufferTab %>% select(name, geneID, chrom, ifBuffer, score, log2FC, padj, log2FC.rna, padj.rna) %>%
  mutate_if(is.numeric, formatC, digits=2) %>%
  DT::datatable()

Summary plot

sumTab <- bufferTab %>% group_by(ifBuffer) %>%
  summarise(n = length(name))

bufferPlot <- ggplot(sumTab, aes(x=ifBuffer, y = n)) + 
  geom_bar(aes(fill = ifBuffer), stat="identity", width = 0.7) + 
  geom_text(aes(label = paste0("n=", n)),vjust=-1,col=colList[1]) +
  scale_fill_manual(values =c(Buffered = colList[1],
                              Enhanced = colList[4],
                              `non-Buffered` = colList[2],
                              Undetermined = "grey50")) +
  theme_half + theme(axis.text.x = element_text(angle = 90, hjust=1, vjust=0.5),
                     legend.position = "none") +
  ylab("Number of proteins") + ylim(0,120) +xlab("")
bufferPlot

Plot example cases of buffered and non-buffered proteins

protList <- c("PTPN11","STAT2","CD27","SUDS3")
geneList <- bufferTab[match(protList, bufferTab$name),]$geneID
pList <- lapply(geneList, function(i) {
  tabProt <- protExprTab %>% filter(id == i) %>%
    select(id, patID,expr) %>% dplyr::rename(protExpr = expr)
  tabRna <- rnaExprTab %>% filter(id == i) %>%
    select(id, patID, expr) %>% dplyr::rename(rnaExpr = expr)
  plotTab <- left_join(tabProt, tabRna, by = c("id","patID")) %>% 
    filter(!is.na(protExpr), !is.na(rnaExpr)) %>%
    mutate(trisomy12 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy12) %>%
    mutate(trisomy12 = ifelse(trisomy12 %in% 1, "yes","no")) %>%
    mutate(symbol = rowData(dds[id,])$symbol)
  p <- ggplot(plotTab, aes(x=rnaExpr, y = protExpr)) +
    geom_point(aes(col=trisomy12)) + 
    geom_smooth(formula =  y~x, method="lm",se=FALSE, color = "grey50", linetype ="dashed" ) + 
    ggtitle(unique(plotTab$symbol)) +
    ylab("Protein expression") + xlab("RNA expression") +
    scale_color_manual(values =c(yes = colList[1],no=colList[2])) +
    theme_full + theme(legend.position = "bottom")
  ggExtra::ggMarginal(p, type = "histogram", groupFill = TRUE)
  })
cowplot::plot_grid(plotlist = pList, ncol=2)

Enrichment of buffer and non-buffered proteins

Non-buffered prpteins

Using cancer hallmark genesets
rnaAll <- dds[rowData(dds)$biotype %in% "protein_coding" & !rowData(dds)$symbol %in% c("",NA),] #all protein coding gene as background

protList <- filter(bufferTab, ifBuffer == "non-Buffered")$name
refList <- rowData(rnaAll)$symbol
enRes <- runFisher(protList, refList, gmts$H, pCut =0.01, ifFDR = TRUE,removePrefix = "HALLMARK_",
                   plotTitle = "Non-buffered proteins", insideLegend = TRUE,
                   setName = "HALLMARK gene set")
bufferEnrich <- enRes$enrichPlot + theme(plot.margin = margin(1,3,1,1, unit = "cm"))
bufferEnrich

Buffered proteins

protList <- filter(bufferTab, ifBuffer == "Buffered")$name
enRes <- runFisher(protList, refList, gmts$H, pCut =0.1, ifFDR = TRUE)
[1] "No sets passed the criteria"

No enrichment

Compare buffering effect between trisomy19 and trisomy12

load("../output/deResList.RData")
load("../output/deResListRNA.RData")
testTabProt <- resList %>% mutate(chr = rowData(protCLL[id,])$chromosome_name) %>%
  filter(Gene == paste0("trisomy",chr)) %>%
  select(name, log2FC, Gene) %>% mutate(type = "Protein")
testTabRNA <- resListRNA %>% mutate(chr = rowData(dds[id,])$chromosome) %>%
  filter(Gene == paste0("trisomy",chr)) %>%
  select(name, log2FC, Gene) %>% mutate(type = "RNA")
overGene <- intersect(testTabProt$name, testTabRNA$name)
testTab <- bind_rows(testTabProt, testTabRNA) %>%
  filter(name %in% overGene)
plotTab <- lapply(seq(-2,2, length.out = 50), function(foldCut) {
  filTab <- mutate(testTab, pass = log2FC > foldCut) %>%
    group_by(Gene, type) %>% summarise(n = sum(pass),per = sum(pass)/length(pass)) %>% 
    mutate(cut = foldCut)
}) %>% bind_rows() %>%
  mutate(group =paste0(Gene,"_",type))

Cummulative plot

ggplot(plotTab, aes(x=cut, y = per))+ 
  geom_line(aes(col = Gene, linetype = type),size=1) +
  scale_color_manual(values = c(trisomy12 = colList[1],trisomy19=colList[2]), name = "") +
  scale_linetype_discrete(name = "") +
  coord_cartesian(xlim=c(1.5,-1)) +
  ylab("Cumulative fraction") +
  xlab("log2 (fold change)") +
  theme_full +
  theme(legend.position = c(0.8,0.3))

KS test

RNA level

testTab <- plotTab %>% filter(type == "RNA") %>%
  select(Gene, per,cut) %>% pivot_wider(names_from = Gene, values_from = per)
ks.test(testTab$trisomy12, testTab$trisomy19)

    Two-sample Kolmogorov-Smirnov test

data:  testTab$trisomy12 and testTab$trisomy19
D = 0.24, p-value = 0.1122
alternative hypothesis: two-sided

Protein level

testTab <- plotTab %>% filter(type == "Protein") %>%
  select(Gene, per,cut) %>% pivot_wider(names_from = Gene, values_from = per)
ks.test(testTab$trisomy12, testTab$trisomy19)

    Two-sample Kolmogorov-Smirnov test

data:  testTab$trisomy12 and testTab$trisomy19
D = 0.42, p-value = 0.0002955
alternative hypothesis: two-sided

Plot expression on genomic coordiate

patBack <- dplyr::filter(patMeta, Patient.ID %in% unique(allProtTab$patID)) %>%
  dplyr::select(Patient.ID, trisomy12) %>%
  dplyr::rename(patID = Patient.ID) %>%
  mutate_all(as.character) %>%
  mutate_at(vars(-patID),str_replace, "1","yes") %>%
  mutate_at(vars(-patID),str_replace, "0","no")
plotExprVar <- function(gene, chr, patBack, allBand, allLine, allProtTab, allRnaTab, protLine = NULL,
                        region = c(-Inf,Inf),ifTrend = FALSE, normalize = TRUE, maxVal =2, minVal=-2) {
  
  #table for cyto band
  bandTab <- filter(allBand, ChromID == chr, chromStart >= region[1], chromEnd <= region[2]) %>%
    mutate(chromMid = chromMid)
  
  #table for expression
  plotProtTab <- filter(allProtTab, ChromID == chr, start_position >= region[1], end_position <= region[2]) %>%
    mutate_if(is.factor,as.character)
  plotRnaTab <- filter(allRnaTab, ChromID == chr, start_position >= region[1], end_position <= region[2]) %>%
    mutate_if(is.factor,as.character)
  
  
  #summarise group mean
  plotProtTab <- plotProtTab %>% 
    mutate(group = patBack[match(patID, patBack$patID),][[gene]]) %>%
    filter(!is.na(group)) %>%
    group_by(id, group) %>% mutate(meanExpr = mean(expr, na.rm=TRUE)) %>%
    distinct(group, id,.keep_all = TRUE) %>% ungroup()

  plotRnaTab <- plotRnaTab %>%
    mutate(group = patBack[match(patID, patBack$patID),][[gene]]) %>%
    filter(!is.na(group)) %>%
    group_by(id, group) %>% mutate(meanExpr = mean(expr, na.rm=TRUE)) %>%
    distinct(group, id,.keep_all = TRUE) %>% ungroup()
  
  if (!is.null(protLine)) {
    bufferLineTab <- plotProtTab %>%
      select(symbol, mid_position, meanExpr, group) %>%
      filter(symbol %in% protLine) %>%
      pivot_wider(names_from = group, values_from = meanExpr) %>%
      mutate(lowVal = map2_dbl(yes, no, min),
             highVal = map2_dbl(yes, no, max))
  } else bufferLineTab <- NULL
  

  xMax <- max(bandTab$chromEnd, na.rm = T)
  
  #main plot for Protein
  gPro <- ggplot() + 
    geom_rect(data=bandTab, mapping=aes(xmin=chromStart, xmax=chromEnd, ymin=minVal+0.5, ymax=maxVal-0.5, 
                                        fill=Colour, label = band), alpha=0.1) +
    geom_text(data=bandTab, mapping=aes(label=band, x=chromMid), y=maxVal-0.5, hjust =1, angle = 90, size=2.5) 
    
  if (!is.null(protLine)) {
    gPro <- gPro + geom_segment(data = bufferLineTab, aes(x=mid_position, xend = mid_position, 
                                        y=lowVal, yend = highVal), linetype = "dashed") 
    
  }
  
  gPro <- gPro + geom_rect(data = plotProtTab, 
            mapping=aes(xmin=start_position,
                        xmax=end_position, ymin=meanExpr, ymax=meanExpr+0.1,
                        fill = group, label = symbol)) +
    scale_x_continuous(expand=c(0,0),limits = c(0,xMax)) +
    xlab("Genomic position [Mb]") + 
    ylab("Expression (normalized by length)") + 
    scale_fill_manual(values = c(even = "white",odd = "grey50",
                                yes = "darkred", no = "darkgreen")) +
    scale_color_manual(values = c(yes = "darkred",no = "darkgreen")) +
    ggtitle(paste0("Protein expression","(",chr,")")) +
    theme(plot.title = element_text(face = "bold", size = 10),
        legend.position = "none",
        panel.background = element_blank(),
        panel.grid.major = element_line(colour="grey90", size=0.1))
  
    if (ifTrend) {
      gPro <- gPro + geom_smooth(data =filter(plotProtTab, expr >0), 
                mapping = aes(y=meanExpr, x= mid_position,
                              color = group), 
                formula = y ~ x, method = "loess", se=FALSE, span=0.5,
                size =0.2, alpha=0.5)
    }
    
  #main plot for RNA
  gRna <- ggplot() + 
    geom_rect(data=bandTab, mapping=aes(xmin=chromStart, xmax=chromEnd, ymin=minVal, ymax=maxVal, 
                                        fill=Colour, label = band), alpha=0.1) +
    geom_text(data=bandTab, mapping=aes(label=band, x=chromMid), y=maxVal, hjust =1, angle = 90, size=2.5) +
    geom_rect(data = plotRnaTab, 
            mapping=aes(xmin=start_position,
                        xmax=end_position, ymin=meanExpr, ymax=meanExpr+0.1,
                        fill = group, label = symbol)) +
    scale_x_continuous(expand=c(0,0),limits = c(0,xMax)) +
    xlab("Genomic position [Mb]") + 
    ylab("Expression Z-score") + 
    scale_fill_manual(values = c(even = "white",odd = "grey50",
                                yes = "darkred", no = "darkgreen")) +
    scale_color_manual(values = c(yes = "darkred", no = "darkgreen")) +
    ggtitle(paste0("RNA expression","(",chr,")")) +
    theme(plot.title = element_text(face = "bold", size = 10),
        legend.position = "none",
        panel.background = element_blank(),
        panel.grid.major = element_line(colour="grey90", size=0.1))
  
    if (ifTrend) {
      gRna <- gRna + geom_smooth(data =filter(plotRnaTab), 
                mapping = aes(y=meanExpr, x= mid_position,
                              color = group), 
                formula = y ~ x, method = "loess", se=FALSE, span=0.2,
                size =0.2, alpha=0.5)
    }
    #for legend
    ## if the patient has CNV data
    lgTab <- tibble(x= seq(6),y=seq(6),
                    Expression = c(rep("yes",3), rep("no",3)))
  
    lg <- ggplot(lgTab, aes(x=x,y=y)) +
        geom_point(aes(fill = Expression), shape =22,size=3) +
        scale_fill_manual(values = c(yes = "darkred", no = "darkgreen"), name = gene) +
        theme(legend.position = "bottom")
    
    lg <- get_legend(lg)
    
    return(list(plotPro = gPro, plotRNA = gRna, legend = lg))
}

Normalize protein and RNA expression

normalized <- TRUE
#if perform normalization
if (normalized) {
  #for protein
  exprMat <- select(allProtTab,patID, id,expr) %>% 
    distinct(patID, id, .keep_all = TRUE) %>%
    spread(key = patID, value =expr) %>% data.frame() %>% 
    column_to_rownames("id") %>% as.matrix()
  qm <- jyluMisc::mscale(exprMat, useMad = F)
  normTab <- data.frame(qm) %>% rownames_to_column("id") %>%
    gather(key = "patID", value = "expr", -id)
  allProtTab <- select(allProtTab, -expr) %>% left_join(normTab, by = c("patID","id"))


  #for RNA
  exprMat <- select(allRnaTab,patID, id,expr) %>% 
    distinct(patID, id, .keep_all = TRUE) %>%
    spread(key = patID, value =expr) %>% data.frame() %>% 
    column_to_rownames("id") %>% as.matrix()
  qm <- jyluMisc::mscale(exprMat, useMad = F)
  normTab <- data.frame(qm) %>% rownames_to_column("id") %>%
    gather(key = "patID", value = "expr", -id)
  allRnaTab <- select(allRnaTab, -expr) %>% left_join(normTab, by = c("patID","id"))
}
g <- plotExprVar("trisomy12","chr12",patBack,allBand, allLine, 
                 allProtTab, allRnaTab, ifTrend = TRUE)
plot_grid(g$plotRNA, g$plotPro, g$legend, ncol = 1, rel_heights = c(1,1,0.2))

Protein complex analysis

Preprocessing

Processing protein complex data (not used)

int_pairs <- read_delim("../data/proteins_in_complexes", delim = "\t") %>%
  mutate(Reactome = grepl("Reactome",Evidence_supporting_the_interaction),
         Corum = grepl("Corum",Evidence_supporting_the_interaction)) %>%
  dplyr::filter(ProtA %in% rownames(protSub) & ProtB %in% rownames(protSub)) %>%
  mutate(pair=map2_chr(ProtA, ProtB, ~paste0(sort(c(.x,.y)), collapse = "-"))) %>%
  mutate(database = case_when(
    Reactome & Corum ~ "both",
    Reactome & !Corum ~ "Reactome",
    !Reactome & Corum ~ "Corum",
    TRUE ~ "other"
  )) %>% mutate(inComplex = "yes")

Use updated complex

int_pairs <- read_csv2("../output/int_pairs.csv")

Whether complex formation affects protein buffering?

Using buffering score

testTab <- bufferTab %>% mutate(inComplex = ifelse(uniprotID %in% c(int_pairs$ProtA,int_pairs$ProtB),
                                                   "complex in","complex out"))
tRes <- t.test(diffFC~inComplex, testTab)

ggplot(testTab, aes(x=inComplex, y=diffFC)) + 
  geom_boxplot(outlier.shape = NA) + ggbeeswarm::geom_quasirandom() + theme_full +
  xlab("") + ylab("log2(RNA fold change) - log2(protein fold change)") +
  annotate("text", label = sprintf("P = %s",formatC(tRes$p.value, digits = 2, format="e")), x=Inf, y=Inf, hjust=2, vjust=3)

Using buffering status

testTab <- bufferTab %>% mutate(inComplex = ifelse(uniprotID %in% c(int_pairs$ProtA,int_pairs$ProtB),
                                                   "complex_in","complex_out")) %>%
  filter(ifBuffer %in% c("Buffered","non-Buffered"))
tt <- table(testTab$ifBuffer, testTab$inComplex)
tt
              
               complex_in complex_out
  Buffered             32          11
  non-Buffered         62          41
fisher.test(tt)

    Fisher's Exact Test for Count Data

data:  tt
p-value = 0.1298
alternative hypothesis: true odds ratio is not equal to 1
95 percent confidence interval:
 0.8266201 4.7051365
sample estimates:
odds ratio 
  1.915435 

Construct protein-protein interaction network by connecting chr12 proteins and non-chr12 protein

comTab <- int_pairs %>% select(ProtA, ProtB, database) %>%
  mutate(chrA = rowData(protCLL[ProtA,])$chromosome_name,
         chrB = rowData(protCLL[ProtB,])$chromosome_name) %>%
  filter(!is.na(chrA), !is.na(chrB)) %>%
  filter((chrA == "12" & chrB != "12") | (chrA !="12" & chrB == "12")) %>%
  mutate(source = ifelse(chrA == 12, ProtA, ProtB),
         target = ifelse(chrA == 12, ProtB, ProtA)) %>%
  select(source, target, database)
fdrCut <- 0.05
resTab <- select(allRes, name, uniprotID, chrom, padj, padj.rna, log2FC,log2FC.rna) %>%
  mutate(sigProt = padj <= fdrCut,
         sigRna = padj.rna <=fdrCut,
         upProt = sigProt & log2FC > 0,
         upRna = sigRna & log2FC.rna > 0)
comTab <- comTab %>% 
  left_join(resTab, by = c(source = "uniprotID")) %>%
  left_join(resTab, by = c(target = "uniprotID")) %>%
  rename_all(funs(str_replace(., "x", "source"))) %>%
  rename_all(funs(str_replace(., "y", "target"))) 
comTab.filter <- filter(comTab, upRna.source, upProt.source, upProt.target)
#get node list
allNodes <- union(comTab.filter$name.source, comTab.filter$name.target) 

nodeList <- data.frame(id = seq(length(allNodes))-1, name = allNodes, stringsAsFactors = FALSE) %>%
  mutate(onChr12 = ifelse(rowData(protCLL[match(name, rowData(protCLL)$hgnc_symbol),])$chromosome_name %in% "12", 
                          "chr12","otherChr"))

#get edge list
edgeList <- select(comTab.filter, name.source, name.target, database, upRna.target) %>%
  dplyr::rename(Source = name.source, Target = name.target) %>% 
  mutate(Source = nodeList[match(Source,nodeList$name),]$id,
         Target = nodeList[match(Target, nodeList$name),]$id,
         sigRNA = ifelse(upRna.target,"yes","no")) %>%
  data.frame(stringsAsFactors = FALSE)

net <- graph_from_data_frame(vertices = nodeList, d=edgeList, directed = FALSE)
tidyNet <- as_tbl_graph(net)
complexNet <- ggraph(tidyNet, layout = "igraph", algorithm = "nicely") + 
  geom_edge_link(color = colList[3], width=1, aes(linetype = sigRNA)) + 
  geom_node_point(aes(color =onChr12, shape = onChr12), size=6) + 
  geom_node_text(aes(label = name), repel = TRUE, size=6) +
  scale_edge_linetype_manual(values = c(no = "dashed", yes = "solid"))+
  scale_color_manual(values = c(chr12 = colList[1],otherChr = colList[2])) +
  scale_edge_color_brewer(palette = "Set2") +
  theme_graph(base_family = "sans") + theme(legend.position = "bottom") 
complexNet

Whether forming complex with trisomy12 proteins explains the up-regulation of non-trisomy12 at protein levels?

Get non-chr12 proteins that from complexes with chr12 proteins

nonChr12Prot <- unique(filter(comTab, upProt.source)$target)
length(nonChr12Prot)
[1] 866

Proteins that only show expression change at protein level

upProtList <- filter(allRes, chrom != "12", padj.rna > fdrCut) %>%
  mutate(inComplex = ifelse(uniprotID %in% nonChr12Prot,"complex_in","complex_out"))
ggplot(upProtList, aes(x=inComplex, y = log2FC)) +
  geom_boxplot() +
  ggbeeswarm::geom_quasirandom(aes(col = padj < fdrCut))

Proteins that only show expression change at protein level

upProtList <- filter(allRes, chrom != "12", padj.rna > fdrCut, padj<fdrCut) %>%
  mutate(inComplex = ifelse(uniprotID %in% nonChr12Prot,"complex_in","complex_out"))
table(upProtList$inComplex)

 complex_in complex_out 
         83         203 

There’s not clear indication that formaing complex with trisomy12 proteins can explain overall the unexpected protein up-regulation

Heatmap of BCR complex proteins

seedProt <- c("CD79B","CD22","GRB2","PLCG1")
seedID <- rownames(protCLL[match(seedProt,rowData(protCLL)$hgnc_symbol),])
complexID <- filter(int_pairs, ProtA %in% seedID | ProtB %in% seedID)
resList.BCR <- filter(resList, id %in% c(complexID$ProtA, complexID$ProtB), Gene == "trisomy12",
                      adj.P.Val <= 0.05)
protList <- resList.BCR$id
plotMat <- assays(protCLL)[["QRILC_combat"]][protList,]
rownames(plotMat) <- rowData(protCLL[protList,])$hgnc_symbol

colAnno <- filter(patMeta, Patient.ID %in% colnames(protCLL)) %>%
  select(Patient.ID, trisomy12, IGHV.status) %>%
  data.frame() %>% column_to_rownames("Patient.ID") %>%
  arrange(trisomy12)
colAnno$trisomy12 <- ifelse(colAnno$trisomy12 %in% 1, "yes","no")

plotMat <- jyluMisc::mscale(plotMat, censor = 5)
plotMat <- plotMat[,rownames(colAnno)]


rowAnno <- rowData(protCLL)[,c("chromosome_name","hgnc_symbol"),drop=FALSE] %>% 
  data.frame(stringsAsFactors = FALSE) %>%
  mutate(onChr12 = ifelse(chromosome_name == "12","yes","no")) %>%
  select(hgnc_symbol, onChr12) %>% distinct(hgnc_symbol, .keep_all = TRUE) %>%
  data.frame() %>% remove_rownames() %>%
  column_to_rownames("hgnc_symbol")

annoCol <- list(trisomy12 = c(yes = "black",no = "grey80"),
                IGHV.status = c(M = colList[4], U = colList[3]),
                onChr12 = c(yes = colList[1],no = "white"))

#pheatmap::pheatmap(plotMat, annotation_col = colAnno, scale = "none",
#                   annotation_row = rowAnno, cluster_cols = FALSE,
#                   clustering_method = "ward.D2",
#                   color = colorRampPalette(c(colList[2],"white",colList[1]))(100),
#                   breaks = seq(-5,5, length.out = 101), annotation_colors = annoCol, 
#                   show_rownames = TRUE, show_colnames = FALSE,
#                   treeheight_row = 0)

haCol <- ComplexHeatmap::HeatmapAnnotation(df = colAnno, col=annoCol, which = "column",annotation_name_gp = gpar(fontface = "bold"))
haRow <- ComplexHeatmap::HeatmapAnnotation(df = rowAnno[rownames(plotMat),,drop=FALSE], col=annoCol, which = "row", annotation_name_gp = gpar(fontface = "bold"))

labelCol <- rep("black",nrow(plotMat))
highlight <- c(seedProt, c("PTPN6","PTPN11","PTK2B"))
labelCol[rownames(plotMat) %in% highlight] <-"red"


ComplexHeatmap::Heatmap(plotMat, col = colorRampPalette(c(colList[2],"white",colList[1]))(100),name = "z-score",
                        top_annotation = haCol, left_annotation = haRow, show_column_names = FALSE,
                        cluster_columns  = FALSE, clustering_method_rows = "ward.D2",
                        row_names_gp = gpar(col = labelCol), show_row_dend = FALSE,
                        column_title_gp = gpar(cex= 1.5, fontface = "bold"))

Protein expression variability within trisomy12 samples

Preprocessing

#select trisomy12 samples
protTri12 <- protCLL[,protCLL$trisomy12 %in% 1]
protWT <- protCLL[,protCLL$trisomy12 %in% 0]

exprMatTri12 <- assays(protTri12)[["count_combat"]]
exprMatWT <- assays(protWT)[["count_combat"]]

Variability of protein expression between trisomy12 samples and none trisomy12 samples

sdTri12 <- genefilter::rowSds(exprMatTri12)
sdWT <- genefilter::rowSds(exprMatWT)
plotTab <- tibble(id = c(names(sdTri12), names(sdWT)),
                  SD = c(sdTri12, sdWT),
                  tri12 = c(rep("Trisomy12",length(sdTri12)), rep("WT", length(sdWT)))) %>%
  mutate(chr = rowData(protCLL[id,])$chromosome_name) %>%
  mutate(onChr12 = ifelse(chr %in% "12", "on chr12", "not on chr12"))

For all proteins

Density plot

ggplot(plotTab, aes(x=SD, fill = tri12)) + geom_density(alpha=0.5) +
  scale_fill_manual(values = c(Trisomy12 = colList[1], WT = colList[2]), name = "") +
  xlab("Standard deviation of protein expression") +
  theme_full +
  theme(legend.position = c(0.8,0.8))

Violin plots

ggplot(plotTab, aes(x=tri12, y= SD, fill = tri12)) + 
  geom_violin() +
  scale_fill_manual(values = c(Trisomy12 = colList[1], WT = colList[2]), name = "") +
  ylab("Standard deviation of protein expression") + xlab("") +
  theme_full +
  theme(legend.position = c(0.8,0.85))

For proteins on and not on chr12

Density plot

ggplot(plotTab, aes(x=SD, fill = tri12)) + geom_density(alpha=0.5) +
  scale_fill_manual(values = c(Trisomy12 = colList[1], WT = colList[2]), name = "") +
  xlab("Standard deviation of protein expression") +
  facet_wrap(~onChr12) +
  theme_full +
  theme(legend.position = c(0.9,0.8))

Violin plots

ggplot(plotTab, aes(x=tri12, y= SD, fill = tri12)) + 
  geom_violin() +
  scale_fill_manual(values = c(Trisomy12 = colList[1], WT = colList[2]), name = "") +
  ylab("Standard deviation of protein expression") + xlab("") +
  facet_wrap(~onChr12) +
  theme_full +
  theme(legend.position = c(0.9,0.8))

Determinants of protein variability within trisomy12 samples

Heatmap and hierarchical clustering

exprMatTri12 <- assays(protTri12)[["count_combat"]]
exprMatTri12.imp <- assays(protTri12)[["QRILC_combat"]]

#prepare expression matrix
sds <-  genefilter::rowSds(exprMatTri12,na.rm=TRUE)
plotMat <- exprMatTri12.imp[order(sds, decreasing =TRUE)[1:1000],]
plotMat <- jyluMisc::mscale(plotMat)

#prepare column annotations
colAnno <- filter(patMeta, Patient.ID %in% colnames(protTri12)) %>%
  select(Patient.ID, IGHV.status, trisomy19, del13q, NOTCH1) 
colAnno <- formatStatus(colAnno) %>%
  data.frame() %>% column_to_rownames("Patient.ID")

#prepare row annotations
rowAnno <- rowData(protTri12)[,c("chromosome_name"),drop=FALSE] %>% 
  as_tibble(rownames = "id") %>%
  mutate(onChr12 = ifelse(chromosome_name == "12","yes","no")) %>%
  select(id, onChr12) %>% distinct(id, .keep_all = TRUE) %>%
  data.frame() %>% remove_rownames() %>%
  column_to_rownames("id")

#prepare annotation colors
annoCol <- genAnnoCol(c("onChr12",colnames(colAnno)))
haCol <- ComplexHeatmap::HeatmapAnnotation(df = colAnno, col=annoCol, which = "column",annotation_name_gp = gpar(fontface = "bold"))
haRow <- ComplexHeatmap::HeatmapAnnotation(df = rowAnno[rownames(plotMat),,drop=FALSE], col=annoCol, which = "row", annotation_name_gp = gpar(fontface = "bold"))


ComplexHeatmap::Heatmap(plotMat, col = colorRampPalette(c(colList[2],"white",colList[1]))(100),name = "z-score",
                        top_annotation = haCol,  left_annotation = haRow, show_column_names = FALSE,show_row_names = FALSE,
                        cluster_columns  = TRUE, cluster_rows = TRUE,  clustering_method_rows  = "ward.D2", clustering_method_columns = "ward.D2",
                        show_row_dend = FALSE)

### PCA

#prepare expression matrix
sds <-  genefilter::rowSds(exprMatTri12)
plotMat <- exprMatTri12.imp[order(sds, decreasing =TRUE)[1:1000],]

pcOut <- prcomp(t(plotMat), center =TRUE, scale. = TRUE)
pcRes <- pcOut$x
eigs <- pcOut$sdev^2
varExp <- structure(eigs/sum(eigs),names = colnames(pcRes))

Plot PC1 and PC2

plotTab <- pcRes %>% data.frame() %>% cbind(colAnno[rownames(.),]) %>%
  rownames_to_column("patID") %>% as_tibble()

plotPCA12 <- ggplot(plotTab, aes(x=PC1, y=PC2, col = IGHV.status)) + geom_point(size=4) +
  xlab(sprintf("PC1 (%1.2f%%)",varExp[["PC1"]]*100)) +
  ylab(sprintf("PC2 (%1.2f%%)",varExp[["PC2"]]*100)) +
  scale_color_manual(values = annoCol$IGHV.status, name = "IGHV") +
  theme_full + theme(legend.position = "bottom") +
  xlim(-30,30) + ylim(-40,40)

plotPCA12

Identify genomic associations within trisomy12 samples

Get mutations with at least 3 cases

geneMat <-  patMeta[match(colnames(protTri12), patMeta$Patient.ID),] %>%
  select(Patient.ID, IGHV.status, del11q:U1) %>%
  mutate_if(is.factor, as.character) %>% mutate(IGHV.status = ifelse(IGHV.status == "M", 1,0)) %>%
  mutate_at(vars(-Patient.ID), as.numeric) %>% #assign a few unknown mutated cases to wildtype
  mutate_all(replace_na,0) %>%
  data.frame() %>% column_to_rownames("Patient.ID")


geneMat <- geneMat[,apply(geneMat,2, function(x) sum(x %in% 1, na.rm = TRUE))>=5]
geneMat <- geneMat[,colnames(geneMat)!="trisomy12"]

Mutations that will be tested

colnames(geneMat)
[1] "IGHV.status" "del13q"      "trisomy19"   "NOTCH1"     

Fit the probabilistic dropout model

protMat <- assays(protTri12)[["count"]]
designMat <- geneMat
designMat[,"batch"] <- factor(protCLL[,rownames(designMat)]$batch)
fit <- proDA(protMat, design = ~ . ,
             col_data = designMat)

resList <- lapply(colnames(geneMat), function(n) {
  contra <- n
  resTab <- test_diff(fit, contra) %>%
    dplyr::rename(id = name, logFC = diff, t=t_statistic,
                  P.Value = pval, adj.P.Val = adj_pval) %>% 
    mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>%
    select(name, id, logFC, t, P.Value, adj.P.Val, n_obs) %>%  
    arrange(P.Value) %>% mutate(Gene = n) %>%
    as_tibble()
  

  resTab
  
}) %>% bind_rows()

Bar plot of number of significant associations (10% FDR)

fdrCut = 0.05
plotTab <- resList %>% group_by(Gene) %>%
  summarise(nFDR.local = sum(adj.P.Val <= fdrCut))

#local adjusted P-values

plotTab <- arrange(plotTab, desc(nFDR.local)) %>% mutate(Gene = factor(Gene, levels = Gene))
ggplot(plotTab, aes(x=Gene, y = nFDR.local)) + geom_bar(stat="identity",fill=colList[2]) + 
  geom_text(aes(label = paste0("n=", nFDR.local)),vjust=-1,col=colList[1]) + 
  theme_half + theme(axis.text.x = element_text(angle = 90, hjust=1, vjust=0.5)) +
  ylim(0,70) +
  ylab("Number of associations\n(10% FDR)") + xlab("")

Associate gene expression, protein expression and pathways on Chr12 and Chr19

load("../output/deResList.RData")
load("../output/deResListRNA.RData")

Chromosome 12 and trisomy12

chr <- "12"

Compare number of total genes, number of detected gene and differentially expressed gene, on mRNA and protein level.

#all protein coding genes
rnaAll <- dds[rowData(dds)$biotype %in% "protein_coding" & !rowData(dds)$symbol %in% c("",NA),] #all protein coding
rnaDetected <- rnaAll[rowMedians(counts(rnaAll, normalized=TRUE))>0,]
rnaChr <- dds[rowData(dds)$biotype %in% "protein_coding" & !rowData(dds)$symbol %in% c("",NA) & rowData(dds)$chromosome %in% chr, ]
rnaChrDetected <- rnaChr[rowMedians(counts(rnaChr, normalized=TRUE))>0,]
protSub <- protCLL[rowData(protCLL)$hgnc_symbol %in% rowData(ddsSub)$symbol & rowData(protCLL)$chromosome_name %in% chr, ]
geneList <- list()
geneList[["all"]] <- unique(rowData(rnaChr)$symbol)
geneList[["rna_all"]] <- unique(rowData(rnaChrDetected)$symbol)
geneList[["protein_all"]] <- unique(rowData(protSub)$hgnc_symbol)
geneList[["rna_up"]] <- resListRNA %>% filter(Gene == "trisomy12", t >0, adj.P.Val <= 0.05, name %in% rowData(rnaChr)$symbol) %>% pull(name)
geneList[["protein_up"]] <- resList %>% filter(Gene == "trisomy12", t >0, adj.P.Val <=0.05, name %in% rowData(protSub)$hgnc_symbol) %>% pull(name)
geneList[["both_up"]] <- intersect(geneList[["rna_up"]], geneList[["protein_up"]])
groupNameMap <- structure(c("all genes", "detected at mRNA level", "detected at protein level",
                            "up-regulated at mRNA level", "up-regulated at protein level", 
                            "up-regulated at both levels"),
  names = c("all","rna_all","protein_all","rna_up","protein_up","both_up"))
plotTab <- lapply(names(geneList), function(n) {
  tibble(group = n, num = length(geneList[[n]]))
}) %>% bind_rows() %>%
  mutate(groupName = groupNameMap[group]) %>%
  mutate(groupName = factor(groupName, levels = rev(groupName)))

ggplot(plotTab, aes(x=groupName, y = num)) + geom_bar(stat = "identity", fill = colList[5]) + coord_flip() +
  geom_text(aes(label = num), hjust=-0.1, col = "red") + theme_half +
  ylim(0,1100) + xlab("") + ylab("number") +
  ggtitle(sprintf("Protein coding genes on chromosome %s",chr))

Pathway enrichment

enrichRes <- lapply(names(geneList), function(n) {
  eachList <- geneList[[n]]
  if (n == "all") {
    refList <- rowData(rnaAll)$symbol
  } else if (n %in% c("rna_all","rna_up")) {
    refList <- rowData(rnaAll)$symbol
  } else {
    refList <- rowData(rnaAll)$symbol
  }
  
  enRes <- runFisher(eachList, refList, gmts$H, pCut =0.1, ifFDR = TRUE,removePrefix = "HALLMARK_")
  enRes$enrichTab
})
names(enrichRes) <- names(geneList)

Heatmap to summarize enriched pathways

plotTab <- lapply(names(enrichRes), function(n){
  eachTab <- filter(enrichRes[[n]], padj <= 0.05) %>%
    select(TermID, padj) %>% mutate(group = n)
}) %>% bind_rows() %>%
  mutate(TermID = str_remove(TermID,"HALLMARK_"),
         groupName = groupNameMap[group]) %>%
  mutate(groupName = factor(groupName, levels = rev(groupNameMap))) %>%
  arrange(padj) %>% mutate(TermID = factor(TermID, levels = unique(TermID)))

ggplot(plotTab, aes(x=TermID, y=groupName, fill = -log10(padj))) + geom_tile() +
  theme_full +
  scale_fill_gradient(low = "white", high=colList[1], name = "-log10(adjusted P value)") +
  theme(axis.text.x = element_text(angle = 60, hjust=1)) +
  xlab("") + ylab("")

Chromosome 19 and trisomy19

chr <- "19"

Compare number of total genes, number of detected gene and differentially expressed gene, on mRNA and protein level.

#all protein coding genes
rnaAll <- dds[rowData(dds)$biotype %in% "protein_coding" & !rowData(dds)$symbol %in% c("",NA),] #all protein coding
rnaDetected <- rnaAll[rowMedians(counts(rnaAll, normalized=TRUE))>0,]
rnaChr <- dds[rowData(dds)$biotype %in% "protein_coding" & !rowData(dds)$symbol %in% c("",NA) & rowData(dds)$chromosome %in% chr, ]
rnaChrDetected <- rnaChr[rowMedians(counts(rnaChr, normalized=TRUE))>0,]
protSub <- protCLL[rowData(protCLL)$hgnc_symbol %in% rowData(ddsSub)$symbol & rowData(protCLL)$chromosome_name %in% chr, ]
geneList <- list()
geneList[["all"]] <- unique(rowData(rnaChr)$symbol)
geneList[["rna_all"]] <- unique(rowData(rnaChrDetected)$symbol)
geneList[["protein_all"]] <- unique(rowData(protSub)$hgnc_symbol)
geneList[["rna_up"]] <- resListRNA %>% filter(Gene == "trisomy19", t >0, adj.P.Val <= 0.1, name %in% rowData(rnaChr)$symbol) %>% pull(name)
geneList[["protein_up"]] <- resList %>% filter(Gene == "trisomy19", t >0, adj.P.Val <=0.1, name %in% rowData(protSub)$hgnc_symbol) %>% pull(name)
geneList[["both_up"]] <- intersect(geneList[["rna_up"]], geneList[["protein_up"]])
groupNameMap <- structure(c("all genes", "detected at mRNA level", "detected at protein level",
                            "up-regulated at mRNA level", "up-regulated at protein level", 
                            "up-regulated at both levels"),
  names = c("all","rna_all","protein_all","rna_up","protein_up","both_up"))
plotTab <- lapply(names(geneList), function(n) {
  tibble(group = n, num = length(geneList[[n]]))
}) %>% bind_rows() %>%
  mutate(groupName = groupNameMap[group]) %>%
  mutate(groupName = factor(groupName, levels = rev(groupName)))

ggplot(plotTab, aes(x=groupName, y = num)) + geom_bar(stat = "identity", fill = colList[5]) + coord_flip() +
  geom_text(aes(label = num), hjust=-0.1, col = "red") + theme_half +
  ylim(0,1500) + xlab("") + ylab("number") +
  ggtitle(sprintf("Protein coding genes on chromosome %s",chr))

Pathway enrichment

enrichRes <- lapply(names(geneList), function(n) {
  eachList <- geneList[[n]]
  if (n == "all") {
    refList <- rowData(rnaAll)$symbol
  } else if (n %in% c("rna_all","rna_up")) {
    refList <- rowData(rnaAll)$symbol
  } else {
    refList <- rowData(rnaAll)$symbol
  }
  
  enRes <- runFisher(eachList, refList, gmts$H, pCut =0.1, ifFDR = TRUE,removePrefix = "HALLMARK_")
  enRes$enrichTab
})
[1] "No sets passed the criteria"
[1] "No sets passed the criteria"
[1] "No sets passed the criteria"
[1] "No sets passed the criteria"
[1] "No sets passed the criteria"
names(enrichRes) <- names(geneList)

Heatmap to summarize enriched pathways

plotTab <- lapply(names(enrichRes), function(n){
  eachTab <- filter(enrichRes[[n]], padj <= 0.05) %>%
    select(TermID, padj) %>% mutate(group = n)
}) %>% bind_rows() %>%
  mutate(TermID = str_remove(TermID,"HALLMARK_"),
         groupName = groupNameMap[group]) %>%
  mutate(groupName = factor(groupName, levels = rev(groupNameMap))) %>%
  arrange(padj) %>% mutate(TermID = factor(TermID, levels = unique(TermID)))

plotTab
                     TermID         padj       group                 groupName
1 OXIDATIVE_PHOSPHORYLATION 3.115569e-06 protein_all detected at protein level
2            MYC_TARGETS_V1 1.008903e-04 protein_all detected at protein level
#ggplot(plotTab, aes(x=TermID, y=groupName, fill = -log10(padj))) + geom_tile() +
#  theme_full +
#  scale_fill_gradient(low = "white", high=colList[1], name = "-log10(adjusted P value)") +
#  theme(axis.text.x = element_text(angle = 60, hjust=1)) +
#  xlab("") + ylab("")

No significant enrichment was found for proteins up-regulated

Associations between PI3K inhibitor responses and trisomy12

From the study cohort

Prepare table

load("../data/screenData_enc.RData")
screenData <- screenData %>% filter(patientID %in% colnames(protCLL),
                                        Drug %in% c("Idelalisib","Duvelisib")) %>%
  group_by(patientID, Drug) %>% summarise(viab = mean(normVal.cor_auc)) %>%
  mutate(trisomy12 = patMeta[match(patientID, patMeta$Patient.ID),]$trisomy12,
         IGHV = patMeta[match(patientID, patMeta$Patient.ID),]$IGHV.status) %>%
  mutate(status = ifelse(trisomy12==1,"trisomy12","WT"),
         IGHV = ifelse(IGHV=="M","M-CLL","U-CLL"),
         Drug = as.character(Drug))

Sample size

table(distinct(screenData, patientID, trisomy12)$trisomy12)

 0  1 
59 23 

T-test

All samples

tRes <- group_by(screenData, Drug) %>% nest() %>%
  mutate(m = map(data, ~t.test(viab~trisomy12,.))) %>%
  mutate(res = map(m, broom::tidy)) %>%
  unnest(res) %>%
  select(Drug, estimate, p.value)
tRes
# A tibble: 2 x 3
# Groups:   Drug [2]
  Drug       estimate p.value
  <chr>         <dbl>   <dbl>
1 Duvelisib    0.0787  0.0117
2 Idelalisib   0.0519  0.0467

IGHV stratified

tRes.ighv <- group_by(screenData, Drug, IGHV) %>% nest() %>%
  mutate(m = map(data, ~t.test(viab~trisomy12,.))) %>%
  mutate(res = map(m, broom::tidy)) %>%
  unnest(res) %>%
  select(Drug,IGHV, estimate, p.value)
tRes.ighv
# A tibble: 4 x 4
# Groups:   Drug, IGHV [4]
  Drug       IGHV  estimate  p.value
  <chr>      <chr>    <dbl>    <dbl>
1 Duvelisib  M-CLL   0.0438 0.340   
2 Idelalisib M-CLL   0.0152 0.672   
3 Duvelisib  U-CLL   0.103  0.000474
4 Idelalisib U-CLL   0.0796 0.00299 

Visualization

All samples

Function for plot drug effect as boxplots

plotDrugBox <- function(screenData, tRes, y_lab = "Viability") {
  ymax <- max(screenData$viab)
  ymin <- min(screenData$viab)
  plotList <- lapply(unique(screenData$Drug), function(n) {
    eachTab <- filter(screenData, Drug == n) %>%
      group_by(status) %>% mutate(n=n()) %>% ungroup() %>%
      mutate(group = sprintf("%s\n(N=%s)",status,n)) %>%
      arrange(status) %>% mutate(group = factor(group, levels = unique(group)))
  
    pval <- formatNum(filter(tRes, Drug == n)$p.value, digits = 1, format="e")
    annoText <- bquote(.(n)~" ("~italic("P")~"="~.(pval)~")")
      
    
    ggplot(eachTab, aes(x=group, y = viab)) +
      geom_beeswarm(aes(col=IGHV), size =2.5,cex = 2, alpha=0.8) +
      geom_boxplot(fill = NA, width=0.3, outlier.shape = NA) +
      ggtitle(annoText)+
      #ggtitle(sprintf("%s (p = %s)",geneName, formatNum(pval, digits = 1, format = "e"))) +
      ylab(y_lab) + xlab("") +
      scale_color_manual(values = colList[2:3]) +
      scale_y_continuous(limits=c(ymin,ymax),labels = scales::number_format(accuracy = 0.1))+
      theme_full +
      theme(legend.position = "bottom",
            plot.title = element_text(hjust = 0.5),
            plot.margin = margin(0,20,0,20))

   })
  return(plotList)
}

All samples

pList <- plotDrugBox(screenData, tRes)
plot_grid(plotlist = pList, ncol=2)

IGHV stratified

Function for plot drug effect as boxplots

plotDrugBoxIGHV <- function(screenData, tRes.ighv, y_lab = "Viability") {
  screenData <- mutate(screenData, drugIGHV =paste0(Drug,"_",IGHV))
  tRes.ighv <- mutate(tRes.ighv, drugIGHV = paste0(Drug, "_",IGHV))
  ymax <- max(screenData$viab)
  ymin <- min(screenData$viab)
  
  plotList <- lapply(unique(screenData$drugIGHV), function(n) {
    eachTab <- filter(screenData, drugIGHV == n) %>%
      group_by(status) %>% mutate(n=n()) %>% ungroup() %>%
      mutate(group = sprintf("%s\n(N=%s)",status,n)) %>%
      arrange(status) %>% mutate(group = factor(group, levels = unique(group)))
    drug <- unique(eachTab$Drug)
    ighv <- unique(eachTab$IGHV)
    pval <- formatNum(filter(tRes.ighv, drugIGHV == n)$p.value, digits = 1, format="e")
    annoText <- bquote(.(drug)~" ("~italic("P")~"="~.(pval)~","~.(ighv)~")")
      
    
    ggplot(eachTab, aes(x=group, y = viab)) +
      geom_beeswarm(aes(col=IGHV), size =2.5,cex = 2, alpha=0.8) +
      geom_boxplot(fill = NA, width=0.3, outlier.shape = NA) +
      ggtitle(annoText)+
      #ggtitle(sprintf("%s (p = %s)",geneName, formatNum(pval, digits = 1, format = "e"))) +
      ylab(y_lab) + xlab("") +
      scale_color_manual(values = c(`M-CLL` = colList[2], `U-CLL` = colList[3])) +
      scale_y_continuous(limits=c(ymin,ymax), labels = scales::number_format(accuracy = 0.1))+
      theme_full +
      theme(legend.position = "none",
            plot.title = element_text(hjust = 0.5),
            plot.margin = margin(20,20,20,20))

   })
  return(plotList)
}
pList <- plotDrugBoxIGHV(screenData, tRes.ighv)
plot_grid(plotlist = pList, ncol=2)

PACE (IC50 screen) data

Prepare table

load("../data/ic50.RData")
screenData <- ic50 %>%
  mutate(status = ifelse(trisomy12==1,"trisomy12","WT"),
         IGHV = ifelse(IGHV=="M","M-CLL","U-CLL"),
         Drug = as.character(Drug)) %>%
  mutate(Drug = str_to_title(Drug))

Sample size

table(distinct(screenData, patientID, trisomy12)$trisomy12)

  0   1 
155  27 

T-test

All samples

tRes <- group_by(screenData, Drug) %>% nest() %>%
  mutate(m = map(data, ~t.test(viab~trisomy12,.))) %>%
  mutate(res = map(m, broom::tidy)) %>%
  unnest(res) %>%
  select(Drug, estimate, p.value)
tRes
# A tibble: 2 x 3
# Groups:   Drug [2]
  Drug       estimate   p.value
  <chr>         <dbl>     <dbl>
1 Duvelisib    0.113  0.0000710
2 Idelalisib   0.0939 0.00151  

IGHV stratified

tRes.ighv <- group_by(screenData, Drug, IGHV) %>% nest() %>%
  mutate(m = map(data, ~t.test(viab~trisomy12,.))) %>%
  mutate(res = map(m, broom::tidy)) %>%
  unnest(res) %>%
  select(Drug,IGHV, estimate, p.value)
tRes.ighv
# A tibble: 4 x 4
# Groups:   Drug, IGHV [4]
  Drug       IGHV  estimate p.value
  <chr>      <chr>    <dbl>   <dbl>
1 Duvelisib  M-CLL   0.116  0.00232
2 Idelalisib M-CLL   0.0826 0.0163 
3 Duvelisib  U-CLL   0.112  0.00192
4 Idelalisib U-CLL   0.114  0.00721

Visualization

All samples

All samples

pList <- plotDrugBox(screenData, tRes)
plot_grid(plotlist = pList, ncol=2)

IGHV stratified

pList <- plotDrugBoxIGHV(screenData, tRes.ighv)
plot_grid(plotlist = pList, ncol=2)

Assemble figures

Main text figure 2

leftCol <- plot_grid(tri12Vocano, tri12Enrich,protBoxplot, ncol=1,
                     rel_heights = c(0.35,0.25,0.4),
                     labels = c("A","B","C"), label_size = 20,
                     vjust = c(1.5,1.5,0))
rightCol <- plot_grid(dosagePlot, 
                      plot_grid(bufferPlot, bufferEnrich,ncol=2, 
                                rel_widths = c(0.3,0.7), labels = c("E","F"), label_size = 20,
                                vjust = c(0,0)),
                      complexNet, ncol=1,
                      rel_heights = c(0.2,0.2,0.6), labels = c("D","","G"), label_size = 20)

plot_grid(leftCol, rightCol, rel_widths = c(0.4,0.6))


sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
 [1] grid      parallel  stats4    stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] piano_2.4.0                 latex2exp_0.4.0            
 [3] forcats_0.5.1               stringr_1.4.0              
 [5] dplyr_1.0.5                 purrr_0.3.4                
 [7] readr_1.4.0                 tidyr_1.1.3                
 [9] tibble_3.1.0                tidyverse_1.3.0            
[11] ggbeeswarm_0.6.0            ComplexHeatmap_2.4.3       
[13] pheatmap_1.0.12             proDA_1.2.0                
[15] ggraph_2.0.5                ggplot2_3.3.3              
[17] igraph_1.2.6                cowplot_1.1.1              
[19] tidygraph_1.2.0             DESeq2_1.28.1              
[21] SummarizedExperiment_1.18.2 DelayedArray_0.14.1        
[23] matrixStats_0.58.0          Biobase_2.48.0             
[25] GenomicRanges_1.40.0        GenomeInfoDb_1.24.2        
[27] IRanges_2.22.2              S4Vectors_0.26.1           
[29] BiocGenerics_0.34.0         limma_3.44.3               

loaded via a namespace (and not attached):
  [1] shinydashboard_0.7.1   utf8_1.1.4             tidyselect_1.1.0      
  [4] RSQLite_2.2.3          AnnotationDbi_1.50.3   htmlwidgets_1.5.3     
  [7] BiocParallel_1.22.0    maxstat_0.7-25         munsell_0.5.0         
 [10] codetools_0.2-18       DT_0.17                miniUI_0.1.1.1        
 [13] withr_2.4.1            colorspace_2.0-0       highr_0.8             
 [16] knitr_1.31             rstudioapi_0.13        ggsignif_0.6.1        
 [19] labeling_0.4.2         git2r_0.28.0           slam_0.1-48           
 [22] GenomeInfoDbData_1.2.3 KMsurv_0.1-5           polyclip_1.10-0       
 [25] bit64_4.0.5            farver_2.1.0           rprojroot_2.0.2       
 [28] vctrs_0.3.6            generics_0.1.0         TH.data_1.0-10        
 [31] xfun_0.21              sets_1.0-18            R6_2.5.0              
 [34] clue_0.3-58            graphlayouts_0.7.1     locfit_1.5-9.4        
 [37] fgsea_1.14.0           bitops_1.0-6           cachem_1.0.4          
 [40] assertthat_0.2.1       promises_1.2.0.1       scales_1.1.1          
 [43] multcomp_1.4-16        ggExtra_0.9            beeswarm_0.3.1        
 [46] gtable_0.3.0           sandwich_3.0-0         workflowr_1.6.2       
 [49] rlang_0.4.10           genefilter_1.70.0      GlobalOptions_0.1.2   
 [52] splines_4.0.2          rstatix_0.7.0          broom_0.7.5           
 [55] yaml_2.2.1             abind_1.4-5            modelr_0.1.8          
 [58] crosstalk_1.1.1        backports_1.2.1        httpuv_1.5.5          
 [61] relations_0.6-9        tools_4.0.2            ellipsis_0.3.1        
 [64] gplots_3.1.1           jquerylib_0.1.3        RColorBrewer_1.1-2    
 [67] Rcpp_1.0.6             visNetwork_2.0.9       zlibbioc_1.34.0       
 [70] RCurl_1.98-1.2         ggpubr_0.4.0           GetoptLong_1.0.5      
 [73] viridis_0.5.1          zoo_1.8-9              haven_2.3.1           
 [76] ggrepel_0.9.1          cluster_2.1.1          exactRankTests_0.8-31 
 [79] fs_1.5.0               magrittr_2.0.1         data.table_1.14.0     
 [82] openxlsx_4.2.3         circlize_0.4.12        survminer_0.4.9       
 [85] reprex_1.0.0           mvtnorm_1.1-1          shinyjs_2.0.0         
 [88] hms_1.0.0              mime_0.10              evaluate_0.14         
 [91] xtable_1.8-4           XML_3.99-0.5           rio_0.5.26            
 [94] readxl_1.3.1           gridExtra_2.3          shape_1.4.5           
 [97] compiler_4.0.2         KernSmooth_2.23-18     crayon_1.4.1          
[100] htmltools_0.5.1.1      mgcv_1.8-34            later_1.1.0.1         
[103] geneplotter_1.66.0     lubridate_1.7.10       DBI_1.1.1             
[106] tweenr_1.0.1           dbplyr_2.1.0           MASS_7.3-53.1         
[109] jyluMisc_0.1.5         Matrix_1.3-2           car_3.0-10            
[112] cli_2.3.1              marray_1.66.0          km.ci_0.5-2           
[115] pkgconfig_2.0.3        foreign_0.8-81         xml2_1.3.2            
[118] annotate_1.66.0        vipor_0.4.5            bslib_0.2.4           
[121] XVector_0.28.0         drc_3.0-1              rvest_1.0.0           
[124] digest_0.6.27          fastmatch_1.1-0        rmarkdown_2.7         
[127] cellranger_1.1.0       survMisc_0.5.5         curl_4.3              
[130] shiny_1.6.0            gtools_3.8.2           rjson_0.2.20          
[133] nlme_3.1-152           lifecycle_1.0.0        jsonlite_1.7.2        
[136] carData_3.0-4          viridisLite_0.3.0      fansi_0.4.2           
[139] pillar_1.5.1           lattice_0.20-41        fastmap_1.1.0         
[142] httr_1.4.2             plotrix_3.8-1          survival_3.2-7        
[145] glue_1.4.2             zip_2.1.1              png_0.1-7             
[148] bit_4.0.4              ggforce_0.3.3          stringi_1.5.3         
[151] sass_0.3.1             blob_1.2.1             caTools_1.18.1        
[154] memoise_2.0.0