Last updated: 2021-05-06

Checks: 5 2

Knit directory: CLLproteomics_publish_revision/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-4
  • unnamed-chunk-5

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/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:    code/.DS_Store
    Ignored:    code/.Rhistory
    Ignored:    data/.DS_Store
    Ignored:    output/.DS_Store

Untracked files:
    Untracked:  analysis/.trisomy12_norm.pdf
    Untracked:  analysis/IGHV_box.pdf
    Untracked:  analysis/IGHV_enrich.pdf
    Untracked:  analysis/IGHV_volcano.pdf
    Untracked:  analysis/bufferComplexViolin.pdf
    Untracked:  analysis/buffer_Tri12vsTri19.pdf
    Untracked:  analysis/cohortComposition_all.pdf
    Untracked:  analysis/heatmap_tri12_circle.pdf
    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/manuscript_S9_STAT2.Rmd
    Untracked:  analysis/plot_PC1_PC2.pdf
    Untracked:  analysis/timsTOF_validate.Rmd
    Untracked:  analysis/tri12_transEnrich.pdf
    Untracked:  analysis/tri19_dosage_effect.pdf
    Untracked:  analysis/tri19_sum_buffer_number.pdf
    Untracked:  analysis/trisomy12_chr_summary.pdf
    Untracked:  code/utils.R
    Untracked:  data/Annotation file March 2021.xlsx
    Untracked:  data/CAS9results.xlsx
    Untracked:  data/CNV_onChrom.RData
    Untracked:  data/ComplexParticipantsPubMedIdentifiers_human.txt
    Untracked:  data/Fig1A.png
    Untracked:  data/IGLV321_SupplementalTables_R2.xlsx
    Untracked:  data/MOFAout.RData
    Untracked:  data/MOFAout_atLeast3.RData
    Untracked:  data/STATexprPCR.xlsx
    Untracked:  data/Western_blot_results_20210309_short.csv
    Untracked:  data/Western_blot_results_separate_blots.xlsx
    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/mofaIn.RData
    Untracked:  data/mofaIn_atLeast3.RData
    Untracked:  data/patMeta_enc.RData
    Untracked:  data/pepCLL_lumos_enc.RData
    Untracked:  data/protMOFA.RData
    Untracked:  data/proteins_in_complexes
    Untracked:  data/proteomic_LUMOS_2pep_enc.RData
    Untracked:  data/proteomic_explore_enc.RData
    Untracked:  data/proteomic_independent_all_enc.RData
    Untracked:  data/proteomic_independent_enc.RData
    Untracked:  data/proteomic_timsTOF_enc.RData
    Untracked:  data/screenData_enc.RData
    Untracked:  data/setToPathway.txt
    Untracked:  data/survival_enc.RData
    Untracked:  output/MSH6_splicing.svg
    Untracked:  output/SUGP1_splicing.svg
    Untracked:  output/deResList.RData
    Untracked:  output/deResListBatch2.RData
    Untracked:  output/deResListRNA.RData
    Untracked:  output/deResListRNA_allGene.RData
    Untracked:  output/deResList_WBC.RData
    Untracked:  output/deResList_batch1.RData
    Untracked:  output/deResList_batch3.RData
    Untracked:  output/deResList_independent.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/lassoResults_CPS.RData
    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

Buffering of gene dosage effect

Visualizing gene dosage effect on protein and RNA level

Preprocessing protein and RNA expression data

dds$trisomy19 <- patMeta[match(dds$PatID, patMeta$Patient.ID),]$trisomy19
dds$IGHV <- patMeta[match(dds$PatID, patMeta$Patient.ID),]$IGHV.status
dds$trisomy12 <- patMeta[match(dds$PatID, patMeta$Patient.ID),]$trisomy12

ddsCLL <- dds[rownames(dds) %in% rowData(protCLL)$ensembl_gene_id, 
              !is.na(dds$trisomy19) & !is.na(dds$trisomy12) & !is.na(dds$IGHV)]

ddsSub <- dds[rownames(dds) %in% rowData(protCLL)$ensembl_gene_id, 
              dds$IGHV %in% "M" & dds$trisomy12 %in% 1 & !is.na(dds$trisomy19)]

ddsSub.vst <- varianceStabilizingTransformation(ddsSub)

Differential expression

resTab <- resListRNA %>% filter(Gene == "trisomy19")
protExprTab <- sumToTidy(protCLL) %>%
  filter(chromosome_name == "19", IGHV.status == "M", trisomy12 == 1) %>%
  mutate(id = ensembl_gene_id, patID = colID, expr = log2Norm_combat, type = "Protein") %>%
  select(id, patID, expr, type)

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(trisomy19 = patMeta[match(patID, patMeta$Patient.ID),]$trisomy19) %>%
  filter(!is.na(trisomy19)) %>% mutate(cnv = ifelse(trisomy19 %in% 1, "trisomy19","other"))

Proteins/RNAs on Chr19 have higher expressions in trisomy19 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(other = "grey80", trisomy19 = colList[2]), name = "") +
  scale_color_manual(values = c(other = "grey80", trisomy19 = colList[2]), name = "") +
  xlim(-1,1.5) +
  theme_full + xlab("Mean Z-score") +
  theme(strip.text = element_text(size =20), legend.position = c(0.1,0.9),
        legend.background = element_rect(fill = NA),
        legend.text = element_text(size=15))

dosagePlot

ggsave("tri19_dosage_effect.pdf", height = 3, width = 8)

Analyzing protein 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

rnaRes <- resListRNA %>% filter(Gene == "trisomy19") %>%
  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 trisomy19

fdrCut <- 0.05
protRes <- resList %>% filter(Gene == "trisomy19") %>%
    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")

Only chr19 genes that are up-regulated are considered.

bufferTab <- allRes %>% filter(chrom %in% 19,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 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))

bufferPlot <- ggplot(sumTab, aes(x=ifBuffer, y = n)) + 
  geom_bar(aes(fill = ifBuffer), stat="identity", width = 0.7) + 
  geom_text(aes(label = paste0(n)),vjust=-0.5,col="black",size=5) +
  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) +xlab("")
bufferPlot

ggsave("tri19_sum_buffer_number.pdf", width = 4, height = 4)

Enrichment of buffer and non-buffered proteins

Non-buffered prpteins

Using cancer hallmark genesets
protList <- filter(bufferTab, ifBuffer == "non-Buffered")$name
refList <- unique(protExprTab$symbol)
enRes <- runFisher(protList, refList, gmts$H, pCut =0.1, ifFDR = TRUE,removePrefix = "HALLMARK_",
                   plotTitle = "Non-buffered proteins", insideLegend = TRUE,
                   setName = "HALLMARK gene set")
[1] "No sets passed the criteria"
bufferEnrich <- enRes$enrichPlot + theme(plot.margin = margin(1,3,1,1, unit = "cm"))
bufferEnrich
NULL
Using GO Biological Process gene sets
protList <- filter(bufferTab, ifBuffer == "non-Buffered")$name
refList <- unique(protExprTab$symbol)
enRes <- runFisher(protList, refList, gmts$GO, pCut =0.1, ifFDR = TRUE,removePrefix = "GO_",
                   plotTitle = "Non-buffered proteins", insideLegend = TRUE,
                   setName = "GO BP gene set")
[1] "No sets passed the criteria"
bufferEnrich <- enRes$enrichPlot + theme(plot.margin = margin(1,3,1,1, unit = "cm"))
bufferEnrich
NULL

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"

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