Last updated: 2021-05-28
Checks: 7 0
Knit directory: MINTIE-paper-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.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
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(20200415)
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 ed3d2b6. 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/cache/
Ignored: data/.DS_Store
Ignored: data/RCH_B-ALL/
Ignored: data/leucegene/.DS_Store
Ignored: data/leucegene/KMT2A-PTD_results/.DS_Store
Ignored: data/leucegene/normals_ncontrols_test_results/.DS_Store
Ignored: data/leucegene/normals_ncontrols_test_results/ncon0/.DS_Store
Ignored: data/leucegene/normals_ncontrols_test_results/ncon1/.DS_Store
Ignored: data/leucegene/salmon_out/
Ignored: data/leucegene/sample_info/KMT2A-PTD_8-2.fa.xls
Ignored: data/leucegene/validation_results/.DS_Store
Ignored: data/simu/.DS_Store
Ignored: data/simu/results/.DS_Store
Ignored: data/simu/results/MINTIE/.DS_Store
Ignored: data/simu/results/MINTIE/varying_dispersion/.DS_Store
Ignored: output/Leucegene_gene_counts.tsv
Ignored: packrat/lib-R/
Ignored: packrat/lib-ext/
Ignored: packrat/lib/
Untracked files:
Untracked: data/leucegene/validation_results/TAP/
Unstaged changes:
Modified: .Rprofile
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.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/RCH_B-ALL.Rmd
) and HTML (docs/RCH_B-ALL.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | ed3d2b6 | Marek Cmero | 2021-05-28 | Figures tweaks and reordering. |
html | c8fba75 | Marek Cmero | 2021-05-13 | Build site. |
Rmd | c12cf29 | Marek Cmero | 2021-05-13 | Call variants by unique positions in recurrent gene analysis for RCH B-ALL |
html | 4206f12 | Marek Cmero | 2021-04-30 | Build site. |
html | 4b8113e | Marek Cmero | 2020-07-03 | Build site. |
html | 9141a03 | Marek Cmero | 2020-06-25 | Build site. |
html | e9e4917 | Marek Cmero | 2020-06-24 | Build site. |
html | 0b21347 | Marek Cmero | 2020-06-11 | Build site. |
Rmd | fa6bf0c | Marek Cmero | 2020-06-11 | Updated with new results; improved tables |
html | fa6bf0c | Marek Cmero | 2020-06-11 | Updated with new results; improved tables |
Rmd | 3702862 | Marek Cmero | 2020-05-18 | Removed MLM samples from final B-ALL results |
html | 3702862 | Marek Cmero | 2020-05-18 | Removed MLM samples from final B-ALL results |
html | a166ab8 | Marek Cmero | 2020-05-08 | Build site. |
Rmd | f504dcb | Marek Cmero | 2020-05-08 | Added variant found stats for RCH B-ALL analysis |
html | a600688 | Marek Cmero | 2020-05-07 | Build site. |
Rmd | 0fde0b8 | Marek Cmero | 2020-05-07 | Added RCH B-ALL analysis |
# util
library(data.table)
library(dplyr)
library(here)
library(stringr)
# plotting/tables
library(ggplot2)
library(gt)
options(stringsAsFactors = FALSE)
source(here("code/leucegene_helper.R"))
Here we analyse the results of MINTIE run on the RCH B-ALL cohort.
rch_ball_results_dir <- here("data/RCH_B-ALL")
rch_ball_results <- list.files(rch_ball_results_dir, full.names = TRUE) %>%
lapply(., read.delim) %>%
rbindlist() %>%
filter(logFC > 5)
# rename IDs to be consistent with doi: 10.1182/bloodadvances.2019001008
rch_ball_results$sample <- rch_ball_results$sample %>%
str_split("^EKL-|^EKL|^PE15R-MLM-") %>%
lapply(., str_c, collapse = "") %>%
unlist() %>%
str_c("B-ALL_", .)
# list of ALL-associated genes
all_genes <- read.delim(here("data/ref/ALL_associated_genes.txt"), header=FALSE)$V1
Supplementary Figure 7 in the MINTIE paper. Shows the overall number of variant genes called by MINTIE in the RCH B-ALL cohort.
results_by_gene <- get_results_by_gene(rch_ball_results)
results_summary <- results_by_gene[, length(unique(gene)), by = "sample"]
results_summary <- results_summary %>% arrange(desc(V1))
results_summary$sample <- factor(results_summary$sample,
levels = results_summary$sample)
results_summary %>%
summarise(min=min(V1),
median=median(V1),
max=max(V1)) %>%
gt() %>%
tab_header(
title = md("**Summary of variant genes called in B-ALL cohort**")
) %>%
tab_options(
table.font.size = 12
) %>%
cols_label(
min = md("**Min**"),
median = md("**Median**"),
max = md("**Max**")
)
Summary of variant genes called in B-ALL cohort | ||
---|---|---|
Min | Median | Max |
15 | 48 | 633 |
ggplot(results_summary, aes(sample, V1)) +
geom_bar(position=position_dodge(width=0.8), stat="identity") +
theme_bw() + xlab("") + ylab("# variant genes") +
scale_fill_brewer(palette = "Set2") +
theme(legend.position = "bottom",
axis.text.x = element_text(size = 7, angle = 90))
Supplementary Figure 8 in the MINTIE paper. Shows recurrently called variants in ALL-associated genes in RCH B-ALL cohort.
all_gene_results <- filter(results_by_gene, gene %in% all_genes) %>%
collate_vartypes()
paste("We found",
all_gene_results$variant_id %>% unique() %>% length(),
"variants across",
all_gene_results$gene %>% unique() %>% length(),
"unique genes") %>%
print()
[1] "We found 339 variants across 131 unique genes"
# make list of recurrently mutated genes
var_fields <- c("chr1", "pos1", "strand1", "chr2", "pos2", "strand2",
"gene", "variant_type", "class", "sample")
all_gene_results <- all_gene_results %>% select(var_fields) %>% distinct()
recurrent_genes <- group_by(all_gene_results, gene) %>%
summarise(var_count = length(sample)) %>%
filter(var_count > 4) %>%
arrange(desc(var_count))
# make summary data frame
all_gene_summary <- group_by(all_gene_results, gene, class, sample) %>%
summarise(var_count = length(sample)) %>%
filter(gene %in% recurrent_genes$gene)
all_gene_summary$gene <- factor(all_gene_summary$gene,
levels = recurrent_genes$gene)
# define category colours and plot
cols <- c("#87649aff",
"#bdd888ff",
"#e7d992ff",
"#bdbdbd")
names(cols) <- c("Fusion",
"Transcribed structural variant",
"Novel splice variant",
"Unknown")
ggplot(all_gene_summary, aes(gene, var_count, fill = class)) +
geom_bar(sta = "identity") +
theme_bw() +
xlab("") +
ylab("Variants") +
scale_fill_manual(values = cols) +
theme(legend.position = "bottom",
axis.text.x = element_text(angle = 90))
# print stats of top 3 gene
all_gene_summary %>%
group_by(gene) %>%
summarise(total_vars = sum(var_count)) %>%
pull(gene) %>%
as.character() %>%
head(3) %>%
lapply(., get_gene_stats, all_gene_summary) %>%
unlist() %>%
str_c("\n") %>%
paste0(collapse = "") %>%
cat()
We found 26 variants across 8 samples in ETV6
We found 14 variants across 7 samples in IKZF1
We found 13 variants across 3 samples in IKZF2
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7
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_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gt_0.2.2 ggplot2_3.3.3 stringr_1.4.0 here_1.0.1
[5] dplyr_1.0.4 data.table_1.13.6 workflowr_1.6.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 highr_0.8 pillar_1.4.7 compiler_4.0.3
[5] later_1.1.0.1 git2r_0.28.0 tools_4.0.3 digest_0.6.27
[9] checkmate_2.0.0 gtable_0.3.0 evaluate_0.14 lifecycle_1.0.0
[13] tibble_3.0.6 pkgconfig_2.0.3 rlang_0.4.10 cli_2.3.0
[17] DBI_1.1.1 commonmark_1.7 yaml_2.2.1 xfun_0.21
[21] withr_2.4.1 knitr_1.31 sass_0.3.1 generics_0.1.0
[25] fs_1.5.0 vctrs_0.3.6 rprojroot_2.0.2 grid_4.0.3
[29] tidyselect_1.1.0 glue_1.4.2 R6_2.5.0 rmarkdown_2.6
[33] farver_2.0.3 purrr_0.3.4 magrittr_2.0.1 whisker_0.4
[37] backports_1.2.1 scales_1.1.1 promises_1.2.0.1 ellipsis_0.3.1
[41] htmltools_0.5.1.1 assertthat_0.2.1 colorspace_2.0-0 httpuv_1.5.5
[45] labeling_0.4.2 stringi_1.5.3 munsell_0.5.0 crayon_1.4.1