Last updated: 2020-10-03

Checks: 5 2

Knit directory: Proteomics/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-10
  • unnamed-chunk-5
  • unnamed-chunk-6

To ensure reproducibility of the results, delete the cache directory manuscript_S5_trisomy19_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/correlateCLLPD_cache/
    Ignored:    analysis/lassoForSTAT2_cache/
    Ignored:    analysis/manuscript_S1_Overview_cache/
    Ignored:    analysis/manuscript_S2_genomicAssociation_oldTimsTOF_cache/
    Ignored:    analysis/manuscript_S3_trisomy12_cache/
    Ignored:    analysis/manuscript_S4_IGHV_cache/
    Ignored:    analysis/manuscript_S4_IGHV_oldTimsTOF_cache/
    Ignored:    analysis/manuscript_S5_trisomy19_cache/
    Ignored:    analysis/manuscript_S6_del11q_cache/
    Ignored:    analysis/manuscript_S6_del11q_oldTimsTOF_cache/
    Ignored:    analysis/manuscript_S7_SF3B1_cache/
    Ignored:    analysis/manuscript_S8_drugResponse_Outcomes_cache/
    Ignored:    analysis/manuscript_S9_STAT2_cache/
    Ignored:    code/.Rhistory
    Ignored:    data/.DS_Store
    Ignored:    output/.DS_Store

Untracked files:
    Untracked:  analysis/.trisomy12_norm.pdf
    Untracked:  analysis/CNVanalysis_11q.Rmd
    Untracked:  analysis/CNVanalysis_trisomy12.Rmd
    Untracked:  analysis/CNVanalysis_trisomy19.Rmd
    Untracked:  analysis/STAT2_cytokines.Rmd
    Untracked:  analysis/SUGP1_splicing.svg.xml
    Untracked:  analysis/analysisDrugResponses.Rmd
    Untracked:  analysis/analysisDrugResponses_IC50.Rmd
    Untracked:  analysis/analysisPCA.Rmd
    Untracked:  analysis/analysisPreliminary_LUMOS.Rmd
    Untracked:  analysis/analysisPreliminary_timsTOF_Hela.Rmd
    Untracked:  analysis/analysisPreliminary_timsTOF_new.Rmd
    Untracked:  analysis/analysisSplicing.Rmd
    Untracked:  analysis/analysisTrisomy19.Rmd
    Untracked:  analysis/annotateCNV.Rmd
    Untracked:  analysis/comparePlatforms_LUMOS_helaTimsTOF.Rmd
    Untracked:  analysis/comparePlatforms_LUMOS_newTimsTOF.Rmd
    Untracked:  analysis/comparePlatforms_newTimsTOF_helaTimsTOF.Rmd
    Untracked:  analysis/complexAnalysis_IGHV.Rmd
    Untracked:  analysis/complexAnalysis_IGHV_alternative.Rmd
    Untracked:  analysis/complexAnalysis_overall.Rmd
    Untracked:  analysis/complexAnalysis_trisomy12.Rmd
    Untracked:  analysis/complexAnalysis_trisomy12_alternative.Rmd
    Untracked:  analysis/correlateGenomic_PC12adjusted.Rmd
    Untracked:  analysis/correlateGenomic_noBlock.Rmd
    Untracked:  analysis/correlateGenomic_noBlock_MCLL.Rmd
    Untracked:  analysis/correlateGenomic_noBlock_UCLL.Rmd
    Untracked:  analysis/correlateGenomic_timsTOFnew.Rmd
    Untracked:  analysis/correlateGenomic_timsTOFnewHela.Rmd
    Untracked:  analysis/correlateRNAexpression.Rmd
    Untracked:  analysis/default.css
    Untracked:  analysis/del11q.pdf
    Untracked:  analysis/del11q_norm.pdf
    Untracked:  analysis/full_diff_list.csv
    Untracked:  analysis/lassoForSTAT2.Rmd
    Untracked:  analysis/manuscript_S0_PrepareData.Rmd
    Untracked:  analysis/manuscript_S1_Overview.Rmd
    Untracked:  analysis/manuscript_S2_genomicAssociation.Rmd
    Untracked:  analysis/manuscript_S2_genomicAssociation_oldTimsTOF.Rmd
    Untracked:  analysis/manuscript_S3_trisomy12.Rmd
    Untracked:  analysis/manuscript_S4_IGHV.Rmd
    Untracked:  analysis/manuscript_S4_IGHV_oldTimsTOF.Rmd
    Untracked:  analysis/manuscript_S5_trisomy19.Rmd
    Untracked:  analysis/manuscript_S6_del11q.Rmd
    Untracked:  analysis/manuscript_S6_del11q_oldTimsTOF.Rmd
    Untracked:  analysis/manuscript_S7_SF3B1.Rmd
    Untracked:  analysis/manuscript_S8_drugResponse_Outcomes.Rmd
    Untracked:  analysis/manuscript_S9_STAT2.Rmd
    Untracked:  analysis/peptideValidate.Rmd
    Untracked:  analysis/plotCNV_del11q.pdf
    Untracked:  analysis/plotExpressionCNV.Rmd
    Untracked:  analysis/processPeptides_LUMOS.Rmd
    Untracked:  analysis/processProteomics_timsTOF_Hela.Rmd
    Untracked:  analysis/processProteomics_timsTOF_new.Rmd
    Untracked:  analysis/protCLL.RData
    Untracked:  analysis/qualityControl_timsTOF_Hela.Rmd
    Untracked:  analysis/qualityControl_timsTOF_new.Rmd
    Untracked:  analysis/style.css
    Untracked:  analysis/tableS1_DE_proteins_p0.01.xlsx
    Untracked:  analysis/test.pdf
    Untracked:  analysis/test.svg
    Untracked:  analysis/tri12Enrich.pdf
    Untracked:  analysis/trisomy12.pdf
    Untracked:  analysis/trisomy12_AFcor.Rmd
    Untracked:  analysis/trisomy12_norm.pdf
    Untracked:  code/AlteredPQR.R
    Untracked:  code/utils.R
    Untracked:  data/190909_CLL_prot_abund_med_norm.tsv
    Untracked:  data/190909_CLL_prot_abund_no_norm.tsv
    Untracked:  data/200725_cll_diaPASEF_direct_reports/
    Untracked:  data/200728_cll_diaPASEF_direct_plus_hela_reports/
    Untracked:  data/20190423_Proteom_submitted_samples_bereinigt.xlsx
    Untracked:  data/20191025_Proteom_submitted_samples_final.xlsx
    Untracked:  data/Chemokines.csv
    Untracked:  data/IFN_list.csv
    Untracked:  data/IFNreceptor.csv
    Untracked:  data/Interleukin_receptor.csv
    Untracked:  data/Interleukins.csv
    Untracked:  data/LUMOS/
    Untracked:  data/LUMOS_peptides/
    Untracked:  data/LUMOS_protAnnotation.csv
    Untracked:  data/LUMOS_protAnnotation_fix.csv
    Untracked:  data/SampleAnnotation_cleaned.xlsx
    Untracked:  data/chemoReceptor.csv
    Untracked:  data/example_proteomics_data
    Untracked:  data/facTab_IC50atLeast3New.RData
    Untracked:  data/gmts/
    Untracked:  data/mapEnsemble.txt
    Untracked:  data/mapSymbol.txt
    Untracked:  data/proteins_in_complexes
    Untracked:  data/pyprophet_export_aligned.csv
    Untracked:  data/timsTOF_protAnnotation.csv
    Untracked:  output/Fig1A.pdf
    Untracked:  output/Fig1A.png
    Untracked:  output/Fig1A.pptx
    Untracked:  output/LUMOS_processed.RData
    Untracked:  output/MSH6_splicing.svg
    Untracked:  output/SUGP1_splicing.eps
    Untracked:  output/SUGP1_splicing.pdf
    Untracked:  output/SUGP1_splicing.svg
    Untracked:  output/cnv_plots.zip
    Untracked:  output/cnv_plots/
    Untracked:  output/cnv_plots_norm.zip
    Untracked:  output/ddsrna_enc.RData
    Untracked:  output/deResList.RData
    Untracked:  output/deResList_timsTOF.RData
    Untracked:  output/deResList_timsTOF_old.RData
    Untracked:  output/dxdCLL.RData
    Untracked:  output/dxdCLL2.RData
    Untracked:  output/encMap.RData
    Untracked:  output/exprCNV.RData
    Untracked:  output/exprCNV_enc.RData
    Untracked:  output/lassoResults_CPS.RData
    Untracked:  output/lassoResults_IC50.RData
    Untracked:  output/patMeta_enc.RData
    Untracked:  output/pepCLL_lumos.RData
    Untracked:  output/pepCLL_lumos_enc.RData
    Untracked:  output/pepTab_lumos.RData
    Untracked:  output/pheno1000_enc.RData
    Untracked:  output/pheno1000_main.RData
    Untracked:  output/plotCNV_allChr11_diff.pdf
    Untracked:  output/plotCNV_del11q_sum.pdf
    Untracked:  output/proteomic_LUMOS_20200227.RData
    Untracked:  output/proteomic_LUMOS_20200320.RData
    Untracked:  output/proteomic_LUMOS_20200430.RData
    Untracked:  output/proteomic_LUMOS_enc.RData
    Untracked:  output/proteomic_timsTOF_20200227.RData
    Untracked:  output/proteomic_timsTOF_Hela_20200806.RData
    Untracked:  output/proteomic_timsTOF_enc.RData
    Untracked:  output/proteomic_timsTOF_new_20200806.RData
    Untracked:  output/proteomic_timsTOF_old_enc.RData
    Untracked:  output/splicingResults.RData
    Untracked:  output/survival_enc.RData
    Untracked:  output/timsTOF_processed.RData
    Untracked:  plotCNV_del11q_diff.pdf
    Untracked:  summary/
    Untracked:  supp_latex/

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


Overview of differentially expressed proteins

A table of associations with 10% FDR

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

Heatmap of differentially expressed proteins (10% FDR)

(Restricted to M-CLL with trisomy12)

protCLL$IGHV.status <- patMeta[match(colnames(protCLL),patMeta$Patient.ID),]$IGHV.status
protCLL$trisomy12 <- patMeta[match(colnames(protCLL),patMeta$Patient.ID),]$trisomy12

proList <- filter(resList, !is.na(name), adj.P.Val < 0.1) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList, protCLL$IGHV.status %in% "M" & protCLL$trisomy12 %in% 1]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

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

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

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

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

tri19Heatmap <- pheatmap::pheatmap(plotMat, annotation_col = colAnno, scale = "none",
                   annotation_row = rowAnno,
                   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, silent = TRUE)$gtable
plot_grid(tri19Heatmap)

Summary of chromosome distribution (10% FDR)

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

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("chr19","other"), values = colList) +
  coord_flip(ylim = c(0,50), expand = FALSE) + xlab("") + ylab("Number of significant associations (10% FDR)") + theme_half 
sigNumPlot

Volcano plot

plotTab <- resList %>% mutate(onChr19 = ifelse(Chr %in% "19","yes","no"))
#nameList <- filter(resList, adj.P.Val <=0.1)$name
nameList <- c("GPI","CALR","RRAS","RANBP3","EIF4EBP1")
tri19Volcano <- plotVolcano(plotTab, fdrCut =0.1, x_lab="log2FoldChange", posCol = colList[1], negCol = colList[2],
            plotTitle = "trisomy19", ifLabel = TRUE, labelList = nameList)
tri19Volcano

Boxplot plot of selected genes (top 10 most differentially expressed)

(Restricted to M-CLL with trisomy19)

protSub <- protCLL[, protCLL$IGHV.status %in% "M" & protCLL$trisomy12 %in% 1]

protTab <- sumToTidy(protSub, rowID = "uniprotID", colID = "patID")
resList.sig <- filter(resList, adj.P.Val < 0.1)
#nameList <- resList.sig$name[1:10]
plotTab <- protTab %>% filter(hgnc_symbol %in% nameList) %>%
  mutate(trisomy19 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy19) %>%
  mutate(status = ifelse(trisomy19 %in% 1,"trisomy19","WT"),
         name = hgnc_symbol) %>%
  mutate(status=factor(status, levels = c("WT","trisomy19")))
pList <- plotBox(plotTab, pValTabel = resList, y_lab = "Protein expression")
tri19Box<-cowplot::plot_grid(plotlist= pList, ncol=2)
tri19Box

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")
inputTab <- resList %>% filter(adj.P.Val <0.25, Gene == "trisomy19") %>%
  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 trisomy19"]] <- runGSEA(inputTab, gmts$H, "page")

p <- plotEnrichmentBar(enRes$`Proteins associated with trisomy19`, pCut =0.05, ifFDR= FALSE, setName = "")
cowplot::plot_grid(p)

Note that none of the pathways passed 10% FDR

Heatmaps of protein expression in enriched pathways

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

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

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

annoCol <- list(trisomy19 = c(yes = "black",no = "grey80"),
                IGHV.status = c(M = colList[3], U = colList[4]),
                onChr19 = c(yes = colList[1],no = "white"))
plotSetHeatmap(resList.sig, gmts$H, "HALLMARK_MTORC1_SIGNALING", 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

#Prepare data
load("../output/exprCNV_enc.RData")


protExprTab <- allProtTab %>% mutate(type = "Protein")
rnaExprTab <- filter(allRnaTab, id %in% protExprTab$id) %>% mutate(type = "RNA")

comExprTab <- bind_rows(rnaExprTab, protExprTab) %>%
  mutate(trisomy19 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy19,
         trisomy12 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy12,
         IGHV = patMeta[match(patID, patMeta$Patient.ID),]$IGHV.status) %>%
  filter(!is.na(trisomy19), trisomy12 %in% 1, IGHV %in% "M") %>% mutate(cnv = ifelse(trisomy19 %in% 1, "trisomy19","WT"))

In the plots below, the RNAseq dataset is subsetted for genes that also present in proteomic dataset. The plots will look somewhat different in all genes are used. But the trend is the same

Proteins/RNAs on Chr19 have higher expressions in trisomy19 samples compared to other samples

plotTab <- filter(comExprTab, ChromID %in% "chr19") %>%
  group_by(id,type) %>% mutate(med=mean(expr)) %>% mutate(expr = (expr-med)) %>%
  group_by(id, symbol, cnv, type) %>% summarise(meanExpr = mean(expr, na.rm=TRUE)) %>%
  ungroup()

ggplot(plotTab, aes(x=meanExpr, fill = cnv, col=cnv)) + 
  geom_histogram(position = "identity", alpha=0.5) + facet_wrap(~type, scale = "free") +
  scale_fill_manual(values = c(WT = "grey80", trisomy19 = colList[1]), name = "") +
  scale_color_manual(values = c(WT = "grey80", trisomy19 = colList[1]), name = "") +
  theme_full + xlab("Deviation to mean expression")

The variation of expression is higher in RNA than protein

(Maybe figures for supplement) #### For proteins/RNA on chr19

plotTab <- filter(comExprTab, ChromID %in% "chr19") %>%
  group_by(id, symbol, 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 same trend can be oberserved for non-chr12 proteins/RNAs, but less striking

plotTab <- filter(comExprTab, !ChromID %in% "chr19") %>%
  group_by(id, symbol, 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

(Maybe for supplement)

plotTab <- filter(comExprTab, ChromID %in% "chr19") %>%
  group_by(id, symbol, type, cnv) %>% summarise(meanExp = mean(expr, na.rm=TRUE)) %>%
  ungroup() %>% spread(key = cnv, value = meanExp) %>%
  mutate(log2FC = log2(trisomy19/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 <- varianceStabilizingTransformation(ddsSub)

Differential expression on RNA level

design(ddsSub) <- ~ IGHV + trisomy12 + trisomy19
deRes <- DESeq(ddsSub, betaPrior = TRUE)
rnaRes <- results(deRes, name = "trisomy191", tidy = TRUE) %>%
  dplyr::rename(geneID = row, log2FC.rna = log2FoldChange, 
                pvalue.rna = pvalue, padj.rna = padj, stat.rna= stat) %>%
  select(geneID, log2FC.rna, pvalue.rna, padj.rna, stat.rna)

Protein abundance changes related to trisomy19

fdrCut <- 0.1
protRes <- resList %>% filter(Gene == "trisomy19") %>%
    dplyr::rename(uniprotID = id, 
                  pvalue = P.Value, padj = adj.P.IHW,
                  chrom = Chr) %>% 
    mutate(geneID = rowData(protCLL[uniprotID,])$ensembl_gene_id) %>%
    select(name, uniprotID, geneID, chrom, logFC, pvalue, padj, t) %>%
    dplyr::rename(stat =t) %>%
    arrange(pvalue) %>% as_tibble() 

Combine

allRes <- left_join(protRes, rnaRes, by = "geneID")

Only chr19 genes that are up-regulated are considered. Otherwise it's hard to intepret the dosage effect.

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

Table of buffering status

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

Summary plot

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

ggplot(sumTab, aes(x=ifBuffer, y = n)) + 
  geom_bar(aes(fill = ifBuffer), stat="identity") + 
  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,130)

Plot example cases of buffered and non-buffered proteins

protList <- c("RRAS","ERCC2","NACC1", "MAP4K1")
geneList <- bufferTab[match(protList, bufferTab$name),]$geneID
pList <- lapply(geneList, function(i) {
  tabProt <- allProtTab %>% filter(id == i) %>%
    select(id, patID, symbol,expr) %>% dplyr::rename(protExpr = expr)
  tabRna <- allRnaTab %>% 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(trisomy19 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy19,
           trisomy12 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy12,
           IGHV = patMeta[match(patID, patMeta$Patient.ID),]$IGHV.status) %>%
    filter(!is.na(trisomy19),trisomy12 %in% 1, IGHV %in%"M") %>%
    mutate(trisomy19 = ifelse(trisomy19 %in% 1, "yes","no"))
  p <- ggplot(plotTab, aes(x=rnaExpr, y = protExpr)) +
    geom_point(aes(col=trisomy19)) + 
    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)

FDX2 is a protein that can not be uniquely mapped and therefore removed from the analysis. We can choose other buffered proteins as examples

Enrichment of buffer and non-buffered proteins

Non-buffered prpteins

protList <- filter(bufferTab, ifBuffer == "non-Buffered")$name
refList <- unique(protExprTab$symbol)
enRes <- runFisher(protList, refList, gmts$H, pCut =0.05, ifFDR = FALSE)
[1] "No sets passed the criteria"
enRes$enrichPlot
NULL

Buffered proteins

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

Enhanced proteins

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

Validation using timsTOF data

Load timsTOF data

load("../output/proteomic_timsTOF_enc.RData")
load("../output/deResList_timsTOF.RData")
resList <- filter(resList, Gene == "trisomy19") %>%
  mutate(adj.P.Val = adj.P.IHW) %>% #use IHW corrected P-value
  mutate(Chr = rowData(protCLL[id,])$chromosome_name)
protSub <- protCLL[, protCLL$IGHV.status %in% "M" & protCLL$trisomy12 %in% 1]
protTab <- sumToTidy(protSub, rowID = "uniprotID", colID = "patID")
plotTab <- protTab %>% filter(hgnc_symbol %in% nameList) %>%
  mutate(trisomy19 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy19) %>%
  mutate(status = ifelse(trisomy19 %in% 1,"trisomy19","WT"),
         name = hgnc_symbol) %>%
  filter(name %in% resList$name)  %>%
  mutate(status=factor(status, levels = c("WT","trisomy19")))
pList <- plotBox(plotTab, pValTabel = resList)
cowplot::plot_grid(plotlist= pList, ncol=2)

Assemble figures

Main text figure 4

#pdf("test.pdf", height = 13, width = 15)
plot_grid(tri19Heatmap,
          plot_grid(tri19Volcano, tri19Box,ncol=1,rel_heights = c(0.4,0.6),
                    labels = c("B","C"), label_size = 20, vjust = c(1.5, 0)),
          ncol=2,labels = c("A",""), label_size = 20)

#dev.off()

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.15.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/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.2.0                 latex2exp_0.4.0            
 [3] forcats_0.5.0               stringr_1.4.0              
 [5] dplyr_1.0.0                 purrr_0.3.4                
 [7] readr_1.3.1                 tidyr_1.1.0                
 [9] tibble_3.0.3                tidyverse_1.3.0            
[11] ggbeeswarm_0.6.0            ComplexHeatmap_2.2.0       
[13] pheatmap_1.0.12             cowplot_1.0.0              
[15] ggraph_2.0.3                ggplot2_3.3.2              
[17] igraph_1.2.5                tidygraph_1.2.0            
[19] DESeq2_1.26.0               SummarizedExperiment_1.16.1
[21] DelayedArray_0.12.3         BiocParallel_1.20.1        
[23] matrixStats_0.56.0          Biobase_2.46.0             
[25] GenomicRanges_1.38.0        GenomeInfoDb_1.22.1        
[27] IRanges_2.20.2              S4Vectors_0.24.4           
[29] BiocGenerics_0.32.0         limma_3.42.2               

loaded via a namespace (and not attached):
  [1] shinydashboard_0.7.1   tidyselect_1.1.0       RSQLite_2.2.0         
  [4] AnnotationDbi_1.48.0   htmlwidgets_1.5.1      maxstat_0.7-25        
  [7] munsell_0.5.0          codetools_0.2-16       DT_0.14               
 [10] miniUI_0.1.1.1         withr_2.2.0            colorspace_1.4-1      
 [13] knitr_1.29             rstudioapi_0.11        ggsignif_0.6.0        
 [16] labeling_0.3           git2r_0.27.1           slam_0.1-47           
 [19] GenomeInfoDbData_1.2.2 KMsurv_0.1-5           polyclip_1.10-0       
 [22] bit64_0.9-7            farver_2.0.3           rprojroot_1.3-2       
 [25] vctrs_0.3.1            generics_0.0.2         TH.data_1.0-10        
 [28] xfun_0.15              sets_1.0-18            R6_2.4.1              
 [31] clue_0.3-57            graphlayouts_0.7.0     locfit_1.5-9.4        
 [34] fgsea_1.12.0           bitops_1.0-6           assertthat_0.2.1      
 [37] promises_1.1.1         scales_1.1.1           multcomp_1.4-13       
 [40] nnet_7.3-14            ggExtra_0.9            beeswarm_0.2.3        
 [43] gtable_0.3.0           sandwich_2.5-1         workflowr_1.6.2       
 [46] rlang_0.4.7            genefilter_1.68.0      GlobalOptions_0.1.2   
 [49] splines_3.6.0          rstatix_0.6.0          acepack_1.4.1         
 [52] broom_0.7.0            checkmate_2.0.0        yaml_2.2.1            
 [55] abind_1.4-5            modelr_0.1.8           crosstalk_1.1.0.1     
 [58] backports_1.1.8        httpuv_1.5.4           Hmisc_4.4-0           
 [61] relations_0.6-9        tools_3.6.0            ellipsis_0.3.1        
 [64] gplots_3.0.4           RColorBrewer_1.1-2     Rcpp_1.0.5            
 [67] visNetwork_2.0.9       base64enc_0.1-3        zlibbioc_1.32.0       
 [70] RCurl_1.98-1.2         ggpubr_0.4.0           rpart_4.1-15          
 [73] GetoptLong_1.0.2       viridis_0.5.1          zoo_1.8-8             
 [76] haven_2.3.1            ggrepel_0.8.2          cluster_2.1.0         
 [79] exactRankTests_0.8-31  fs_1.4.2               magrittr_1.5          
 [82] data.table_1.12.8      openxlsx_4.1.5         circlize_0.4.10       
 [85] survminer_0.4.7        reprex_0.3.0           mvtnorm_1.1-1         
 [88] shinyjs_1.1            hms_0.5.3              mime_0.9              
 [91] evaluate_0.14          xtable_1.8-4           XML_3.98-1.20         
 [94] rio_0.5.16             jpeg_0.1-8.1           readxl_1.3.1          
 [97] gridExtra_2.3          shape_1.4.4            compiler_3.6.0        
[100] KernSmooth_2.23-17     crayon_1.3.4           htmltools_0.5.0       
[103] mgcv_1.8-31            later_1.1.0.1          Formula_1.2-3         
[106] geneplotter_1.64.0     lubridate_1.7.9        DBI_1.1.0             
[109] tweenr_1.0.1           dbplyr_1.4.4           MASS_7.3-51.6         
[112] jyluMisc_0.1.5         Matrix_1.2-18          car_3.0-8             
[115] cli_2.0.2              marray_1.64.0          gdata_2.18.0          
[118] km.ci_0.5-2            pkgconfig_2.0.3        foreign_0.8-71        
[121] xml2_1.3.2             annotate_1.64.0        vipor_0.4.5           
[124] XVector_0.26.0         drc_3.0-1              rvest_0.3.5           
[127] digest_0.6.25          fastmatch_1.1-0        rmarkdown_2.3         
[130] cellranger_1.1.0       survMisc_0.5.5         htmlTable_2.0.1       
[133] curl_4.3               shiny_1.5.0            gtools_3.8.2          
[136] rjson_0.2.20           nlme_3.1-148           lifecycle_0.2.0       
[139] jsonlite_1.7.0         carData_3.0-4          viridisLite_0.3.0     
[142] fansi_0.4.1            pillar_1.4.6           lattice_0.20-41       
[145] fastmap_1.0.1          httr_1.4.1             plotrix_3.7-8         
[148] survival_3.2-3         glue_1.4.1             zip_2.0.4             
[151] png_0.1-7              bit_1.1-15.2           ggforce_0.3.2         
[154] stringi_1.4.6          blob_1.2.1             latticeExtra_0.6-29   
[157] caTools_1.18.0         memoise_1.1.0