Last updated: 2020-08-06

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-6
  • unnamed-chunk-8

To ensure reproducibility of the results, delete the cache directory correlateGenomic_timsTOFnew_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/analysisDrugResponses_IC50_cache/
    Ignored:    analysis/analysisDrugResponses_cache/
    Ignored:    analysis/complexAnalysis_IGHV_alternative_cache/
    Ignored:    analysis/complexAnalysis_IGHV_cache/
    Ignored:    analysis/complexAnalysis_trisomy12_alteredPQR_cache/
    Ignored:    analysis/complexAnalysis_trisomy12_alternative_cache/
    Ignored:    analysis/complexAnalysis_trisomy12_cache/
    Ignored:    analysis/correlateCLLPD_cache/
    Ignored:    analysis/correlateGenomic_timsTOFnew_cache/
    Ignored:    analysis/correlateRNAexpression_cache/
    Ignored:    analysis/figure/
    Ignored:    analysis/manuscript_S1_Overview_cache/
    Ignored:    analysis/manuscript_S2_genomicAssociation_cache/
    Ignored:    analysis/manuscript_S3_trisomy12_cache/
    Ignored:    analysis/manuscript_S4_IGHV_cache/
    Ignored:    analysis/manuscript_S5_trisomy19_cache/
    Ignored:    analysis/manuscript_S6_del11q_cache/
    Ignored:    analysis/manuscript_S7_SF3B1_cache/
    Ignored:    analysis/manuscript_S8_drugResponse_Outcomes_cache/
    Ignored:    analysis/predictOutcome_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/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 copy.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/correlateRNAexpression.Rmd
    Untracked:  analysis/default.css
    Untracked:  analysis/del11q.pdf
    Untracked:  analysis/del11q_norm.pdf
    Untracked:  analysis/manuscript_S0_PrepareData.Rmd
    Untracked:  analysis/manuscript_S1_Overview.Rmd
    Untracked:  analysis/manuscript_S2_genomicAssociation.Rmd
    Untracked:  analysis/manuscript_S3_trisomy12.Rmd
    Untracked:  analysis/manuscript_S4_IGHV.Rmd
    Untracked:  analysis/manuscript_S5_trisomy19.Rmd
    Untracked:  analysis/manuscript_S6_del11q.Rmd
    Untracked:  analysis/manuscript_S7_SF3B1.Rmd
    Untracked:  analysis/manuscript_S8_drugResponse_Outcomes.Rmd
    Untracked:  analysis/peptideValidate.Rmd
    Untracked:  analysis/plotExpressionCNV.Rmd
    Untracked:  analysis/processPeptides_LUMOS.Rmd
    Untracked:  analysis/processProteomics_timsTOF_Hela.Rmd
    Untracked:  analysis/processProteomics_timsTOF_new.Rmd
    Untracked:  analysis/qualityControl_timsTOF_Hela.Rmd
    Untracked:  analysis/qualityControl_timsTOF_new.Rmd
    Untracked:  analysis/style.css
    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/LUMOS/
    Untracked:  data/LUMOS_peptides/
    Untracked:  data/LUMOS_protAnnotation.csv
    Untracked:  data/LUMOS_protAnnotation_fix.csv
    Untracked:  data/SampleAnnotation_cleaned.xlsx
    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/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/splicingResults.RData
    Untracked:  output/survival_enc.RData
    Untracked:  output/timsTOF_processed.RData
    Untracked:  plotCNV_del11q_diff.pdf
    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.


Preprocessing

Process proteomics data

protMat <- assays(protCLL)[["count"]] #without imputation
protCLL$trisomy12 <- patMeta[match(colnames(protCLL),patMeta$Patient.ID),]$trisomy12

Prepare genomic background

Get Mutations with at least 5 cases

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


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

Mutations that will be tested

colnames(geneMat)
 [1] "IGHV.status" "del11q"      "del13q"      "del17p"      "trisomy12"  
 [6] "trisomy19"   "DDX3X"       "EGR2"        "NOTCH1"      "SF3B1"      
[11] "TP53"       

Test if there's interaction between gene mutations (potential confounders)

chiRes <- lapply(seq(1,ncol(geneMat)-1), function(i) {
  lapply(seq(i+1, ncol(geneMat)), function(j) {
    geneA <- colnames(geneMat)[i]
    geneB <- colnames(geneMat)[j]
    #res <- chisq.test(geneMat[,i],geneMat[,j])
    res <- fisher.test(table(geneMat[,i], geneMat[,j]))
    tibble(geneA = geneA, geneB=geneB, p = res$p.value)
  }) %>% bind_rows()
}) %>% bind_rows() %>% arrange(p) %>%
  filter(p <=0.05)
chiRes
# A tibble: 7 x 3
  geneA       geneB          p
  <chr>       <chr>      <dbl>
1 DDX3X       EGR2      0.0104
2 trisomy12   trisomy19 0.0107
3 del17p      TP53      0.0156
4 del13q      trisomy12 0.0216
5 IGHV.status trisomy19 0.0223
6 IGHV.status del11q    0.0232
7 IGHV.status DDX3X     0.0496

For IGHV and trisomy12

Fit the probailistic dropout model

designMat <- geneMat[,c("IGHV.status","trisomy12")]
fit <- proDA(protMat, design = ~ .,
             col_data = designMat)

Test for differentially expressed proteins

resList.ighvTri12 <- lapply(c("IGHV.status","trisomy12"), function(n) {
  contra <- paste0(n,"1")
  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) %>%  
    arrange(P.Value) %>% mutate(Gene = n) %>%
    as_tibble()
}) %>% bind_rows()

Test for other variantions (blocking for IGHV and trisomy12)

Fit the probailistic dropout model and test for differentially expressed proteins

otherGenes <- colnames(geneMat)[!colnames(geneMat)%in% c("IGHV.status","trisomy12")]
resList <- lapply(otherGenes, function(n) {
  designMat <- geneMat[,c("IGHV.status","trisomy12",n)]
  designMat <- designMat[!is.na(designMat[[n]]),]
  testMat <- protMat[,rownames(designMat)]
  
  fit <- proDA(testMat, design = ~ .,
             col_data = designMat)
  
  contra <- paste0(n,"1")
  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) %>%  
    arrange(P.Value) %>% mutate(Gene = n) %>%
    as_tibble()
  resTab
}) %>% bind_rows()

Combine the results

resList <- bind_rows(resList.ighvTri12, resList)

P-value histogram for each genomic feature

ggplot(resList, aes(x=P.Value)) + geom_histogram(fill = "green", alpha =0.5, bins=30, col = "grey50") + facet_wrap(~Gene, ncol=3, scales = "free") + xlim(0,1)
Warning: Removed 22 rows containing missing values (geom_bar).

Number of significantly associated proteins at 10% FDR

proNumTab <- resList %>% group_by(Gene) %>%
  summarise(number = sum(adj.P.Val < 0.1, na.rm=TRUE)) %>%
  arrange(desc(number)) %>% mutate(Gene = factor(Gene, levels = Gene))
`summarise()` ungrouping output (override with `.groups` argument)
proNumTab
# A tibble: 11 x 2
   Gene        number
   <fct>        <int>
 1 trisomy12     1106
 2 IGHV.status    514
 3 SF3B1           28
 4 del11q          18
 5 trisomy19        8
 6 del17p           5
 7 DDX3X            0
 8 del13q           0
 9 EGR2             0
10 NOTCH1           0
11 TP53             0

Based on the P-value histograms and numbers of significant associations, trisomy12 has the most impact on protein expression, followed by IGHV and del11q. Other genomic variations do not seem to have major impact on protein expression.

Visualize results

IGHV status

List of significant proteins (10% FDR)

corRes.sig <- resList %>% filter(Gene == "IGHV.status", adj.P.Val < 0.1) %>%
  select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()

Volcano plot

plotVolcano <- function(pTab, fdrCut = 0.05, posCol = "red", negCol = "blue",
                        x_lab = "dm", plotTitle = "",ifLabel = FALSE,
                        colLabel = NULL) {
  plotTab <- pTab %>% mutate(ifSig = ifelse(adj.P.Val > fdrCut, "n.s.",
                                            ifelse(logFC > 0, "up","down"))) %>%
    mutate(ifSig = factor(ifSig, levels = c("up","down","n.s.")))
  pCut <- -log10((filter(plotTab, ifSig != "n.s.") %>% arrange(desc(P.Value)))$P.Value[1])
  g <- ggplot(plotTab, aes(x=logFC, y=-log10(P.Value), label = name)) +
    geom_point(shape = 21, aes(fill = ifSig),size=3) +
    geom_hline(yintercept = pCut, linetype = "dashed") +
    annotate("text", x = -Inf, y = pCut, label = paste0(fdrCut*100,"% FDR"),
             size = 5, vjust = -1.2, hjust=-0.1) +
    scale_fill_manual(values = c(n.s. = "grey70",
                                  up = posCol, down = negCol)) +
    theme( legend.position = "bottom",
          legend.text = element_text(size = 15)) +
    ylab(expression(-log[10]*'('*italic(P)~value*')')) +
    xlab(x_lab) + ggtitle(plotTitle)

  if (ifLabel & is.null(colLabel))
    g <- g + ggrepel::geom_text_repel(data = filter(plotTab, ifSig != "n.s."),
                                      size=5, force = 2)
  else if (ifLabel & !is.null(colLabel)) {
     g <- g+ggrepel::geom_text_repel(data = filter(plotTab, ifSig != "n.s."),
                                    aes_string(col = colLabel),
                                    size=5, force = 2) +
       scale_color_manual(values = c(yes = "red",no = "black"))
  }

  return(g)
}
plotVolcano(filter(resList, Gene == "IGHV.status"), fdrCut =0.01, x_lab="log2FoldChange", 
            plotTitle = "IGHV.status", ifLabel = TRUE)

Heatmap of differentially expressed proteins

proList <- corRes.sig$id
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

colAnno <- colData(protCLL)[,c("trisomy12","IGHV.status")] %>%
  data.frame()

plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
         color = colorRampPalette(c("navy","white","firebrick"))(100),
         breaks = seq(-6,6, length.out = 101))

Plot top 9 most differentially expressed proteins

protTab <- sumToTiday(protCLL,"patID") %>% mutate(name = hgnc_symbol)
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC)
ggplot(plotTab, aes(x=IGHV.status, y =  expression)) + geom_boxplot(aes(fill = IGHV.status)) + geom_point() +
  facet_wrap(~name, scale = "free")

Enrichment analysis

gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
            KEGG= "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <0.05, Gene == "IGHV.status") %>%
  mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
  distinct(name, .keep_all = TRUE) %>%
  dplyr::select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
plot(p)

Trisomy12

List of significant proteins (10% FDR)

corRes.sig <- resList %>% filter(Gene == "trisomy12", adj.P.Val < 0.1) %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()

Volcano plot (0.1% FDR)

plotTab <- filter(resList, Gene == "trisomy12") %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  mutate(onChr12 = ifelse(chromosome == "12","yes","no"))
plotVolcano(plotTab, fdrCut =0.001, x_lab="log2FoldChange", 
            plotTitle = "trisomy12", ifLabel = TRUE, colLabel = "onChr12")

Labels colored by red indicates the gene is on chromosome 12

Heatmap of differentially expressed proteins (0.1%)

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

colAnno <- colData(protCLL)[,c("gender","trisomy12","IGHV.status")] %>%
  data.frame()

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() %>% column_to_rownames("hgnc_symbol")

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

pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
         annotation_row = rowAnno,
         color = colorRampPalette(c("navy","white","firebrick"))(100),
         breaks = seq(-6,6, length.out = 101))

Plot top 9 most differentially expressed proteins

plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
  filter(!is.na(trisomy12))
ggplot(plotTab, aes(x=trisomy12, y =  expression)) + geom_boxplot(aes(fill = trisomy12)) + geom_point() +
  facet_wrap(~name, scale = "free")

Enrichment analysis

gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
            KEGG = "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <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[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)

#dev.off()

SF3B1

List of significant proteins (10% FDR)

corRes.sig <- resList %>% filter(Gene == "SF3B1", adj.P.Val < 0.1) %>%
  select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()

Volcano plot

plotVolcano(filter(resList, Gene == "SF3B1"), fdrCut =0.1, x_lab="log2FoldChange", 
            plotTitle = "SF3B1", ifLabel = TRUE)

Heatmap of differentially expressed proteins

proList <- corRes.sig$id
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

colAnno <- geneMat[,c("trisomy12","IGHV.status","SF3B1")] %>%
  data.frame()

plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno, clustering_method = "ward.D2",
         color = colorRampPalette(c("navy","white","firebrick"))(100),
         breaks = seq(-6,6, length.out = 101))

Plot top 9 most differentially expressed proteins

protTab <- sumToTiday(protCLL,"patID") %>% mutate(name = hgnc_symbol)
plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
  mutate(SF3B1 = patMeta[match(colID, patMeta$Patient.ID),]$SF3B1)
ggplot(plotTab, aes(x=SF3B1, y =  expression)) + geom_boxplot(aes(fill = SF3B1)) + geom_point() +
  facet_wrap(~name, scale = "free")

Enrichment analysis

gmts = list(H= "../data/gmts/h.all.v6.2.symbols.gmt",
            KEGG= "../data/gmts/c2.cp.kegg.v6.2.symbols.gmt")
inputTab <- resList %>% filter(P.Value <0.05, Gene == "SF3B1") %>%
  mutate(name = rowData(protCLL[id,])$hgnc_symbol) %>% filter(!is.na(name)) %>%
  distinct(name, .keep_all = TRUE) %>%
  dplyr::select(name, t) %>% data.frame() %>% column_to_rownames("name")
enRes <- list()
enRes[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
plot(p)

del11q

List of significant proteins (10% FDR)

corRes.sig <- resList %>% filter(Gene == "del11q", adj.P.Val < 0.1) %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()

Volcano plot

plotTab <- plotTab <- filter(resList, Gene == "del11q") %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  mutate(onChr11 = ifelse(chromosome == "11","yes","no"))
plotVolcano(plotTab, fdrCut =0.1, x_lab="log2FoldChange", 
            plotTitle = "del11q", ifLabel = TRUE, colLabel = "onChr11")

Labels colored by red indicates the gene is on chromosome 11

Heatmap of differentially expressed proteins

proList <- filter(corRes.sig, !is.na(name)) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

colAnno <- geneMat[,c("del11q","IGHV.status")] %>%
  data.frame()
colAnno$gender <- protCLL[,rownames(colAnno)]$gender

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

plotMat <- jyluMisc::mscale(plotMat, censor = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno,  annotation_row = rowAnno,
         clustering_method = "ward.D2",
         color = colorRampPalette(c("navy","white","firebrick"))(100),
         breaks = seq(-6,6, length.out = 101))

Plot top 9 most differentially expressed proteins

plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
  mutate(del11q = patMeta[match(colID, patMeta$Patient.ID),]$del11q) %>%
  filter(!is.na(del11q))
ggplot(plotTab, aes(x=del11q, y =  expression)) + geom_boxplot(aes(fill = del11q)) + geom_point() +
  facet_wrap(~name, scale = "free")

Enrichment analysis

inputTab <- resList %>% filter(P.Value <0.05, Gene == "del11q") %>%
  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[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)

#dev.off()

trisomy19

List of significant proteins (10% FDR)

corRes.sig <- resList %>% filter(Gene == "trisomy19", adj.P.Val < 0.1) %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  select(-Gene)
corRes.sig %>% mutate_if(is.numeric, formatC, digits=2, format="e") %>% DT::datatable()

Volcano plot

plotTab <- plotTab <- filter(resList, Gene == "trisomy19") %>%
  mutate(chromosome = rowData(protCLL[id,])$chromosome_name) %>%
  mutate(onChr19 = ifelse(chromosome == "19","yes","no"))
plotVolcano(plotTab, fdrCut =0.1, x_lab="log2FoldChange", 
            plotTitle = "trisomy19", ifLabel = TRUE, colLabel = "onChr19")

Labels colored by red indicates the gene is on chromosome 19

Heatmap of differentially expressed proteins

proList <- filter(corRes.sig, !is.na(name)) %>% distinct(name, .keep_all = TRUE) %>% pull(id)
plotMat <- assays(protCLL)[["QRILC"]][proList,]
rownames(plotMat) <- rowData(protCLL[proList,])$hgnc_symbol

colAnno <- geneMat[,c("trisomy19","IGHV.status","trisomy12")] %>%
  data.frame()
colAnno$gender <- protCLL[,rownames(colAnno)]$gender

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 = 6)
pheatmap(plotMat, scale = "none", annotation_col = colAnno,  annotation_row = rowAnno,
         clustering_method = "ward.D2",
         color = colorRampPalette(c("navy","white","firebrick"))(100),
         breaks = seq(-6,6, length.out = 101))

Plot top 9 most differentially expressed proteins

plotTab <- filter(protTab, name %in% corRes.sig$name[1:9]) %>% dplyr::rename(expression = QRILC) %>%
  mutate(trisomy19 = patMeta[match(colID, patMeta$Patient.ID),]$trisomy19) %>%
  filter(!is.na(trisomy19))
ggplot(plotTab, aes(x=trisomy19, y =  expression)) + geom_boxplot(aes(fill = trisomy19)) + geom_point() +
  facet_wrap(~name, scale = "free")

Enrichment analysis

inputTab <- resList %>% filter(P.Value <0.05, 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[["HALLMARK"]] <- runGSEA(inputTab, gmts$H, "page")
enRes[["KEGG"]] <- runGSEA(inputTab, gmts$KEGG, "page")
p <- plotEnrichmentBar(enRes, pCut =0.05, ifFDR= FALSE)
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
Coordinate system already present. Adding new coordinate system, which will replace the existing one.
#pdf("tri12Enrich.pdf", height = 15, width = 6)
plot(p)

#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] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] forcats_0.5.0               stringr_1.4.0              
 [3] dplyr_1.0.0                 purrr_0.3.4                
 [5] readr_1.3.1                 tidyr_1.1.0                
 [7] tibble_3.0.3                ggplot2_3.3.2              
 [9] tidyverse_1.3.0             SummarizedExperiment_1.16.1
[11] DelayedArray_0.12.3         BiocParallel_1.20.1        
[13] matrixStats_0.56.0          Biobase_2.46.0             
[15] GenomicRanges_1.38.0        GenomeInfoDb_1.22.1        
[17] IRanges_2.20.2              S4Vectors_0.24.4           
[19] BiocGenerics_0.32.0         jyluMisc_0.1.5             
[21] pheatmap_1.0.12             piano_2.2.0                
[23] proDA_1.1.2                 cowplot_1.0.0              

loaded via a namespace (and not attached):
  [1] readxl_1.3.1           backports_1.1.8        fastmatch_1.1-0       
  [4] drc_3.0-1              workflowr_1.6.2        igraph_1.2.5          
  [7] shinydashboard_0.7.1   splines_3.6.0          crosstalk_1.1.0.1     
 [10] TH.data_1.0-10         digest_0.6.25          htmltools_0.5.0       
 [13] fansi_0.4.1            gdata_2.18.0           magrittr_1.5          
 [16] cluster_2.1.0          openxlsx_4.1.5         limma_3.42.2          
 [19] modelr_0.1.8           sandwich_2.5-1         colorspace_1.4-1      
 [22] ggrepel_0.8.2          rvest_0.3.5            blob_1.2.1            
 [25] haven_2.3.1            xfun_0.15              crayon_1.3.4          
 [28] RCurl_1.98-1.2         jsonlite_1.7.0         survival_3.2-3        
 [31] zoo_1.8-8              glue_1.4.1             survminer_0.4.7       
 [34] gtable_0.3.0           zlibbioc_1.32.0        XVector_0.26.0        
 [37] car_3.0-8              abind_1.4-5            scales_1.1.1          
 [40] mvtnorm_1.1-1          DBI_1.1.0              relations_0.6-9       
 [43] rstatix_0.6.0          Rcpp_1.0.5             plotrix_3.7-8         
 [46] xtable_1.8-4           foreign_0.8-71         km.ci_0.5-2           
 [49] DT_0.14                htmlwidgets_1.5.1      httr_1.4.1            
 [52] fgsea_1.12.0           gplots_3.0.4           RColorBrewer_1.1-2    
 [55] ellipsis_0.3.1         farver_2.0.3           pkgconfig_2.0.3       
 [58] dbplyr_1.4.4           utf8_1.1.4             labeling_0.3          
 [61] tidyselect_1.1.0       rlang_0.4.7            later_1.1.0.1         
 [64] munsell_0.5.0          cellranger_1.1.0       tools_3.6.0           
 [67] visNetwork_2.0.9       cli_2.0.2              generics_0.0.2        
 [70] broom_0.7.0            evaluate_0.14          fastmap_1.0.1         
 [73] yaml_2.2.1             knitr_1.29             fs_1.4.2              
 [76] zip_2.0.4              survMisc_0.5.5         caTools_1.18.0        
 [79] mime_0.9               slam_0.1-47            xml2_1.3.2            
 [82] compiler_3.6.0         rstudioapi_0.11        curl_4.3              
 [85] ggsignif_0.6.0         marray_1.64.0          reprex_0.3.0          
 [88] stringi_1.4.6          lattice_0.20-41        Matrix_1.2-18         
 [91] shinyjs_1.1            KMsurv_0.1-5           vctrs_0.3.1           
 [94] pillar_1.4.6           lifecycle_0.2.0        data.table_1.12.8     
 [97] bitops_1.0-6           httpuv_1.5.4           R6_2.4.1              
[100] promises_1.1.1         KernSmooth_2.23-17     gridExtra_2.3         
[103] rio_0.5.16             codetools_0.2-16       MASS_7.3-51.6         
[106] gtools_3.8.2           exactRankTests_0.8-31  assertthat_0.2.1      
[109] rprojroot_1.3-2        withr_2.2.0            multcomp_1.4-13       
[112] GenomeInfoDbData_1.2.2 hms_0.5.3              grid_3.6.0            
[115] rmarkdown_2.3          carData_3.0-4          git2r_0.27.1          
[118] maxstat_0.7-25         ggpubr_0.4.0           sets_1.0-18           
[121] shiny_1.5.0            lubridate_1.7.9