Last updated: 2022-01-06

Checks: 6 1

Knit directory: DepInfeR/analysis/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). 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(20211005) 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.

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 43be8a7. 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/analysis_RNAseq_cache/
    Ignored:    data/.DS_Store
    Ignored:    output/.DS_Store

Untracked files:
    Untracked:  analysis/analysis_EMBL2016.Rmd
    Untracked:  analysis/analysis_GDSC.Rmd
    Untracked:  analysis/analysis_RNAseq.Rmd
    Untracked:  analysis/analysis_beatAML.Rmd
    Untracked:  analysis/process_EMBL2016.Rmd
    Untracked:  analysis/process_GDSC.Rmd
    Untracked:  analysis/process_beatAML.Rmd
    Untracked:  analysis/process_kinobeads.Rmd
    Untracked:  code/utils.R
    Untracked:  data/BeatAML/
    Untracked:  data/EMBL2016/
    Untracked:  data/GDSC/
    Untracked:  data/Kinobeads/
    Untracked:  data/RNAseq/
    Untracked:  manuscript/
    Untracked:  output/BeatAML_result.RData
    Untracked:  output/EMBL_result.RData
    Untracked:  output/EMBL_resultSub.RData
    Untracked:  output/GDSC_result.RData
    Untracked:  output/allTargets.rds
    Untracked:  output/inputs_BeatAML.RData
    Untracked:  output/inputs_EMBL.RData
    Untracked:  output/inputs_GDSC.RData

Unstaged changes:
    Modified:   README.md
    Modified:   _workflowr.yml
    Modified:   analysis/_site.yml
    Deleted:    analysis/about.Rmd
    Modified:   analysis/index.Rmd
    Deleted:    analysis/license.Rmd
    Deleted:    output/README.md

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

Packages

library(readxl)
library(tidyverse)
source("../code/utils.R")

Read data sets

The drug-target data can be found in the supplementary file of the paper (Table_S1 & Table_S2): https://science.sciencemag.org/content/358/6367/eaan4368/tab-figures-data

# kinase inhibitor drug-target screen from supplementary tables (Table_S1 & Table_S2)
tarList <- read_xlsx("../data/kinobeads/Klaeger_allTargets.xlsx", sheet = "Kinobeads")
tarList_syn <- read_xlsx("../data/kinobeads/targets_pubchem.xlsx", sheet = "Inhibitor annotation", col_names = TRUE) 

Preprocess dataset

Attach synonyms to target table

tarList$synonyms <- tarList_syn$Synonyms[match(tarList$Drug, tarList_syn$Drug)]

Process drug names of target table

#use lowercase
tarList <- mutate(tarList, Drug = tolower(Drug)) %>%
  mutate(Drug = gsub("[- ]","", Drug))

#change pd325901 to pd0325901 (due to different naming)
tarList[tarList$Drug == "pd325901",]$Drug <- "pd0325901"

Rename BCR to BCR/ABL to avoid confusion with B-cell receptor (BCR)

tarList <- mutate(tarList, `Gene Name` = ifelse(`Gene Name` %in% "BCR", "BCR/ABL", `Gene Name`))

Plot distributions of drugs and targe kinases

Kinases per drug

plotTab <- tarList %>% filter(`Target Classification` =="High confidence") %>%
  group_by(Drug) %>% summarise(nTar = length(`Gene Name`))

p1 <- ggplot(plotTab, aes(x=nTar)) + geom_histogram(alpha=0.5, col="grey20") + 
  scale_x_continuous(n.breaks = 10) +
  xlab("number of kinases") + ylab("count") +
  xlim(0,100) + ylim(0,50) +
  ggtitle("Distribution of number \nof kinase targets per drug") +
  theme_custom
Scale for 'x' is already present. Adding another scale for 'x', which will
replace the existing scale.

Drug per kinases

plotTab <- tarList %>% filter(`Target Classification` =="High confidence") %>%
  group_by(`Gene Name`) %>% summarise(nDrug = length(Drug))

p2 <- ggplot(plotTab, aes(x=nDrug)) + geom_histogram(alpha=0.5, col="grey20") + 
  scale_x_continuous(n.breaks = 10) +
  xlab("number of drugs") + ylab("count") +
  xlim(0,100) + ylim(0,70) +
  ggtitle("Distribution of number of \ndrugs per kinase target") +
  theme_custom
Scale for 'x' is already present. Adding another scale for 'x', which will
replace the existing scale.

Combine for Figure1

cowplot::plot_grid(p1,NULL, p2, rel_widths = c(1,0.1,1), ncol=3)
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning: Removed 5 rows containing non-finite values (stat_bin).
Warning: Removed 2 rows containing missing values (geom_bar).
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
Warning: Removed 2 rows containing missing values (geom_bar).

#ggsave("test.pdf", height = 5, width = 12)

Save kinobeads data

saveRDS(tarList, file = "../output/allTargets.rds")

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/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] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.1   stringr_1.4.0   dplyr_1.0.7     purrr_0.3.4    
 [5] readr_2.1.1     tidyr_1.1.4     tibble_3.1.6    ggplot2_3.3.5  
 [9] tidyverse_1.3.1 readxl_1.3.1   

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7       lubridate_1.8.0  assertthat_0.2.1 rprojroot_2.0.2 
 [5] digest_0.6.29    utf8_1.2.2       R6_2.5.1         cellranger_1.1.0
 [9] backports_1.4.1  reprex_2.0.1     evaluate_0.14    highr_0.9       
[13] httr_1.4.2       pillar_1.6.4     rlang_0.4.12     rstudioapi_0.13 
[17] jquerylib_0.1.4  rmarkdown_2.11   labeling_0.4.2   munsell_0.5.0   
[21] broom_0.7.10     compiler_4.1.2   httpuv_1.6.4     modelr_0.1.8    
[25] xfun_0.29        pkgconfig_2.0.3  htmltools_0.5.2  tidyselect_1.1.1
[29] workflowr_1.7.0  fansi_0.5.0      crayon_1.4.2     tzdb_0.2.0      
[33] dbplyr_2.1.1     withr_2.4.3      later_1.3.0      grid_4.1.2      
[37] jsonlite_1.7.2   gtable_0.3.0     lifecycle_1.0.1  DBI_1.1.2       
[41] git2r_0.29.0     magrittr_2.0.1   scales_1.1.1     cli_3.1.0       
[45] stringi_1.7.6    farver_2.1.0     fs_1.5.2         promises_1.2.0.1
[49] xml2_1.3.3       bslib_0.3.1      ellipsis_0.3.2   generics_0.1.1  
[53] vctrs_0.3.8      cowplot_1.1.1    tools_4.1.2      glue_1.6.0      
[57] hms_1.1.1        fastmap_1.1.0    yaml_2.2.1       colorspace_2.0-2
[61] rvest_1.0.2      knitr_1.37       haven_2.4.3      sass_0.4.0