Last updated: 2020-05-08
Checks: 7 0
Knit directory: MINTIE-paper-analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.6.1). 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 f504dcb. 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/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_controls_test_results/.DS_Store
Ignored: data/leucegene/salmon_out/
Ignored: data/leucegene/sample_info/KMT2A-PTD_8-2.fa.xls
Ignored: data/simu/.DS_Store
Ignored: output/Leucegene_gene_counts.tsv
Unstaged changes:
Modified: analysis/_site.yml
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 | 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
library(ggplot2)
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 4 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)
print("Variant genes called summary:")
[1] "Variant genes called summary:"
summary(results_summary$V1)
Min. 1st Qu. Median Mean 3rd Qu. Max.
20.00 39.00 50.00 68.07 77.00 507.00
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))
Version | Author | Date |
---|---|---|
a600688 | Marek Cmero | 2020-05-07 |
Supplementary Figure 5 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 315 variants across 134 unique genes"
# make list of recurrently mutated genes
recurrent_genes <- group_by(all_gene_results, gene) %>%
summarise(var_count = length(unique(variant_id))) %>%
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(unique(variant_id))) %>%
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))
Version | Author | Date |
---|---|---|
a600688 | Marek Cmero | 2020-05-07 |
# 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 25 variants across 10 samples in ETV6
We found 10 variants across 2 samples in IKZF2
We found 9 variants across 8 samples in PAX5
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.14.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] ggplot2_3.1.0 stringr_1.4.0 here_0.1 dplyr_0.8.1
[5] data.table_1.12.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 plyr_1.8.4 compiler_3.5.1 pillar_1.3.1
[5] later_1.0.0 git2r_0.26.1 workflowr_1.6.1 tools_3.5.1
[9] digest_0.6.18 evaluate_0.13 tibble_2.1.1 gtable_0.3.0
[13] pkgconfig_2.0.2 rlang_0.4.2 yaml_2.2.0 xfun_0.5
[17] withr_2.1.2 knitr_1.22 fs_1.2.7 rprojroot_1.3-2
[21] grid_3.5.1 tidyselect_0.2.5 glue_1.3.1 R6_2.4.0
[25] rmarkdown_1.12 purrr_0.3.2 magrittr_1.5 whisker_0.3-2
[29] backports_1.1.3 scales_1.0.0 promises_1.1.0 htmltools_0.3.6
[33] assertthat_0.2.1 colorspace_1.4-1 httpuv_1.5.2 labeling_0.3
[37] stringi_1.4.3 lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4