Last updated: 2026-01-13

Checks: 4 2

Knit directory: ~/Documents/BP1_BloodCancer/

This reproducible R Markdown analysis was created with workflowr (version 1.7.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


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(12345) 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.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Using absolute paths to the files within your workflowr project makes it difficult for you and others to run your code on a different machine. Change the absolute path(s) below to the suggested relative path(s) to make your code more reproducible.

absolute relative
~/BP1_BloodCancer .

Tracking code development and connecting the code version to the results is critical for reproducibility. To start using Git, open the Terminal and type git init in your project directory.


This project is not being versioned with Git. To obtain the full reproducibility benefits of using workflowr, please see ?wflow_start.


Background and goals

Reviewer request: correlate BRCA1P1 copy number with TP53 mutation status in blood cancer datasets.

Datasets (TCGA PanCancer Atlas via cBioPortal downloads):

Diffuse Large B-Cell Lymphoma (TCGA-DLBC)

Acute Myeloid Leukemia (TCGA-LAML)

High-level workflow (per dataset):

Define TP53 status per sample from the mutation download (Mut vs WT).

Use CNV segmentation to extract the CNV segment that overlaps the BRCA1P1 locus.

Select one CNV segment per sample (max overlap; ties → shorter segment).

Compare seg.mean between TP53 groups using Wilcoxon rank-sum.

Generate a plot and export a fully organized Excel workbook

4.1 TCGA-DLBC

# A tibble: 2 × 5
  TP53_group      n mean_segmean median_segmean sd_segmean
  <fct>       <int>        <dbl>          <dbl>      <dbl>
1 TP53 WT        32      0.00816        -0.0126     0.110 
2 TP53 Mutant     5      0.0123          0.0586     0.0896

    Wilcoxon rank sum exact test

data:  seg.mean by TP53_group
W = 66, p-value = 0.5598
alternative hypothesis: true location shift is not equal to 0

4.2 TCGA-LAML

# A tibble: 2 × 5
  TP53_group      n mean_segmean median_segmean sd_segmean
  <fct>       <int>        <dbl>          <dbl>      <dbl>
1 TP53 WT       174      0.00684        -0.0022     0.0713
2 TP53 Mutant    16     -0.119          -0.0439     0.178 

    Wilcoxon rank sum test with continuity correction

data:  seg.mean by TP53_group
W = 2033, p-value = 0.002344
alternative hypothesis: true location shift is not equal to 0


sessionInfo()
R version 4.5.1 (2025-06-13 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/Chicago
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] openxlsx_4.2.8 ggplot2_4.0.0  tibble_3.3.0   stringr_1.5.2  dplyr_1.1.4   
[6] readxl_1.4.5  

loaded via a namespace (and not attached):
 [1] gtable_0.3.6       jsonlite_2.0.0     compiler_4.5.1     promises_1.5.0    
 [5] zip_2.3.3          tidyselect_1.2.1   Rcpp_1.1.0         git2r_0.36.2      
 [9] later_1.4.4        jquerylib_0.1.4    scales_1.4.0       yaml_2.3.10       
[13] fastmap_1.2.0      R6_2.6.1           labeling_0.4.3     generics_0.1.4    
[17] workflowr_1.7.2    knitr_1.50         rprojroot_2.1.1    RColorBrewer_1.1-3
[21] bslib_0.9.0        pillar_1.11.1      rlang_1.1.6        utf8_1.2.6        
[25] cachem_1.1.0       stringi_1.8.7      httpuv_1.6.16      xfun_0.53         
[29] S7_0.2.0           fs_1.6.6           sass_0.4.10        otel_0.2.0        
[33] cli_3.6.5          withr_3.0.2        magrittr_2.0.3     grid_4.5.1        
[37] digest_0.6.37      rstudioapi_0.17.1  lifecycle_1.0.4    vctrs_0.6.5       
[41] evaluate_1.0.5     glue_1.8.0         farver_2.1.2       cellranger_1.1.0  
[45] rmarkdown_2.30     tools_4.5.1        pkgconfig_2.0.3    htmltools_0.5.8.1