Last updated: 2020-05-18
Checks: 7 0
Knit directory: MINTIE-paper-analysis/
This reproducible R Markdown analysis was created with workflowr (version 1.4.0). 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 version displayed above was the version of the Git repository at the time these results were generated.
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: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/cache/
Ignored: data/RCH_B-ALL/
Ignored: data/leucegene/salmon_out/
Ignored: data/leucegene/sample_info/KMT2A-PTD_8-2.fa.xls
Ignored: output/Leucegene_gene_counts.tsv
Ignored: packrat/lib-R/
Ignored: packrat/lib-ext/
Ignored: packrat/lib/
Ignored: packrat/src/
Untracked files:
Untracked: .here
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 R Markdown and HTML files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view them.
File | Version | Author | Date | Message |
---|---|---|---|---|
html | 3aee926 | Marek Cmero | 2020-05-18 | Build site. |
html | bf478ec | Marek Cmero | 2020-05-12 | Build site. |
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
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.
5.00 37.00 49.00 64.97 73.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))
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 517 variants across 192 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))
# 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 11 samples in ETV6
We found 19 variants across 2 samples in ZFP36L2
We found 17 variants across 6 samples in ACTB
sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /config/RStudio/R/3.6.1/lib64/R/lib/libRblas.so
LAPACK: /config/RStudio/R/3.6.1/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_AU.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_AU.UTF-8 LC_COLLATE=en_AU.UTF-8
[5] LC_MONETARY=en_AU.UTF-8 LC_MESSAGES=en_AU.UTF-8
[7] LC_PAPER=en_AU.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_3.2.1 stringr_1.4.0 here_0.1 dplyr_0.8.3
[5] data.table_1.12.6
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 knitr_1.25 whisker_0.4 magrittr_1.5
[5] workflowr_1.4.0 munsell_0.5.0 tidyselect_0.2.5 colorspace_1.4-1
[9] R6_2.4.0 rlang_0.4.0 tools_3.6.1 grid_3.6.1
[13] gtable_0.3.0 xfun_0.10 withr_2.1.2 git2r_0.26.1
[17] htmltools_0.3.6 lazyeval_0.2.2 yaml_2.2.0 rprojroot_1.3-2
[21] digest_0.6.21 assertthat_0.2.1 tibble_2.1.3 crayon_1.3.4
[25] purrr_0.3.2 fs_1.3.1 glue_1.3.1 evaluate_0.14
[29] rmarkdown_1.16 labeling_0.3 stringi_1.4.3 compiler_3.6.1
[33] pillar_1.4.2 scales_1.0.0 backports_1.1.4 pkgconfig_2.0.3