Last updated: 2020-06-11
Checks: 6 1
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.
The R Markdown file has staged changes. 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(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/
Untracked files:
Untracked: .here
Untracked: analysis/
Untracked: backup/
Untracked: code/
Untracked: data/
Untracked: docs/
Untracked: output/
Untracked: packrat/
Unstaged changes:
Unmerged: .Rprofile
Unmerged: .gitattributes
Unmerged: .gitignore
Unmerged: MINTIE-paper-analysis.Rproj
Unmerged: README.md
Unmerged: _workflowr.yml
Staged changes:
Deleted: analysis/Leucegene_Gene_Expression.Rmd
Deleted: analysis/Leucegene_Normals.Rmd
Deleted: analysis/Leucegene_Validation.Rmd
Deleted: analysis/RCH_B-ALL.Rmd
Deleted: analysis/Simulation_Benchmarking.Rmd
Deleted: analysis/_site.yml
Deleted: analysis/index.Rmd
Deleted: analysis/license.Rmd
Deleted: code/leucegene_helper.R
Deleted: code/plot.R
Deleted: code/simu_helper.R
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX332633_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX332645_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX332646_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX332659_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX381852_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX381854_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX381865_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX957223_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX957230_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958844_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958873_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958906_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958907_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958922_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958932_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958945_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958959_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958961_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958963_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX958974_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX959001_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX959044_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX959060_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/AML_controls/SRX959061_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX332633_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX332645_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX332646_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX332659_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX381852_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX381854_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX381865_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX957223_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX957230_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958844_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958873_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958906_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958907_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958922_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958932_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958945_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958959_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958961_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958963_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX958974_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX959001_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX959044_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX959060_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls/SRX959061_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX332633_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX332645_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX332646_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX332659_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX381852_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX381854_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX381865_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX957223_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX957230_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958844_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958873_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958906_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958907_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958922_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958932_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958945_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958959_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958961_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958963_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX958974_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX959001_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX959044_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX959060_results.tsv.gz
Deleted: data/leucegene/KMT2A-PTD_results/normal_controls_reduced/SRX959061_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/bc/SRX372044_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/bc/SRX372045_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/bc/SRX372046_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/gran/SRX372044_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/gran/SRX372045_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/gran/SRX372046_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/mono/SRX372044_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/mono/SRX372045_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/mono/SRX372046_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/tc/SRX372044_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/tc/SRX372045_results.tsv.gz
Deleted: data/leucegene/normals_controls_test_results/tc/SRX372046_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372044_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372045_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372046_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372047_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372048_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372049_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372050_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372051_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372052_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372053_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372054_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372055_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372056_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372057_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372058_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372059_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372060_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372061_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372063_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372064_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372065_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372066_results.tsv.gz
Deleted: data/leucegene/normals_results/SRX372067_results.tsv.gz
Deleted: data/leucegene/sample_info/KMT2A-PTD_samples.txt
Deleted: data/leucegene/sample_info/NUP98-NSD1_samples.txt
Deleted: data/leucegene/sample_info/celltypes_info.tsv
Deleted: data/leucegene/sample_info/selected_13_CBF_AML_controls.txt
Deleted: data/leucegene/sample_info/variant_validation_table.tsv
Deleted: data/leucegene/validation_results/SRX332627_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX332635_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX332667_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX381851_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX381861_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729580_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729581_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729582_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729583_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729585_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729586_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729587_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729588_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729589_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729590_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729591_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729592_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729602_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729603_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729604_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729605_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729606_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729607_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729608_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729609_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729610_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729611_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729612_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729615_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729616_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729617_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729618_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729619_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729620_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729621_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729622_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729623_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729624_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729625_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729626_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729627_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729628_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729629_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729630_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729631_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729632_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX729633_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX958856_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX958862_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX958915_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX958987_results.tsv.gz
Deleted: data/leucegene/validation_results/SRX959058_results.tsv.gz
Deleted: data/ref/ALL_associated_genes.txt
Deleted: data/ref/all_gene_locs.tsv.gz
Deleted: data/ref/chess2.2.genes.gz
Deleted: data/ref/tx2gene.txt.gz
Deleted: data/simu/results/Arriba/fusions.tsv
Deleted: data/simu/results/Barnacle/allvars-case.barnacle.data
Deleted: data/simu/results/JAFFA/jaffa_results.csv
Deleted: data/simu/results/KisSplice/results.bam
Deleted: data/simu/results/KisSplice/results.bam.bai
Deleted: data/simu/results/MINTIE/allvars-case_results.tsv
Deleted: data/simu/results/SQUID/results_sv.txt
Deleted: data/simu/results/StringTie/fullsimu.gtf
Deleted: data/simu/results/TAP/novel_splicing.bedpe
Deleted: data/simu/results/TAP/sv.bedpe
Deleted: data/simu/truth/allvars_fusions_simulated.tsv
Deleted: data/simu/truth/allvars_tsvs_splice_simulated.tsv
Deleted: data/simu/truth/bg_gene_ref.tsv
Deleted: data/simu/truth/hg19_bg_gene_ref.tsv
Deleted: docs/.nojekyll
Deleted: output/README.md
Deleted: packrat/init.R
Deleted: packrat/packrat.lock
Deleted: packrat/packrat.opts
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 | a166ab8 | Marek Cmero | 2020-05-08 | Build site. |
html | a600688 | Marek Cmero | 2020-05-07 | Build site. |
html | 1c40e33 | Marek Cmero | 2020-05-07 | Build site. |
Rmd | bbc278a | Marek Cmero | 2020-05-07 | Refactoring |
html | 87b4e62 | Marek Cmero | 2020-05-07 | Build site. |
Rmd | af503f2 | Marek Cmero | 2020-05-07 | Refactoring |
html | 5c045b5 | Marek Cmero | 2020-05-07 | Build site. |
html | 90c7fd9 | Marek Cmero | 2020-05-06 | Build site. |
Rmd | ff4b1dc | Marek Cmero | 2020-05-06 | Leucegene results |
html | 358aa53 | Marek Cmero | 2020-05-04 | Build site. |
Rmd | 453d754 | Marek Cmero | 2020-05-04 | Added controls comparison in normals analysis. Added variant class collation function. Added variant summary for |
html | 4a5d6ae | Marek Cmero | 2020-05-01 | Build site. |
Rmd | 9556ebb | Marek Cmero | 2020-05-01 | Added leucegene normals analysis. Added expressed genes analysis to leucegene gene expression analysis. |
# util
library(data.table)
library(dplyr)
library(here)
library(stringr)
library(gt)
# plotting
library(ggplot2)
options(stringsAsFactors = FALSE)
source(here("code/leucegene_helper.R"))
Here we generate the results presented in the MINTIE paper, of the method run on a set of non-cancer samples obtained from Leucegene.
# load MINTIE results from leucegene normals
normals_results_dir <- here("data/leucegene/normals_results")
normals_results <- list.files(normals_results_dir, full.names = TRUE) %>%
lapply(., read.delim) %>%
rbindlist() %>%
filter(logFC > 5)
# load cell type info and add to results
celltype <- read.delim(here("data/leucegene/sample_info/celltypes_info.tsv"))
normals_results <- inner_join(normals_results, celltype,
by = c("sample" = "SRX_ID"))
Summary results for variants called by MINTIE on Leucegene normals.
normals_results %>%
group_by(sample) %>%
summarise(variants = length(unique(variant_id))) %>%
gt() %>%
tab_header(
title = md("**Variants called summary by sample**")
) %>%
tab_options(
table.font.size = 12
) %>%
cols_label(
variants = md("**Variants**")
)
Variants called summary by sample | |
---|---|
sample | Variants |
SRX372044 | 182 |
SRX372045 | 139 |
SRX372046 | 220 |
SRX372047 | 653 |
SRX372048 | 1116 |
SRX372049 | 144 |
SRX372050 | 501 |
SRX372051 | 450 |
SRX372052 | 236 |
SRX372053 | 77 |
SRX372054 | 81 |
SRX372055 | 165 |
SRX372056 | 93 |
SRX372057 | 116 |
SRX372058 | 95 |
SRX372059 | 149 |
SRX372060 | 204 |
SRX372061 | 139 |
SRX372063 | 562 |
SRX372064 | 130 |
SRX372065 | 143 |
SRX372066 | 211 |
SRX372067 | 150 |
collate_vartypes(normals_results) %>%
group_by(class) %>%
summarise(variants = length(unique(variant_id))) %>%
mutate(fraction = variants / sum(variants)) %>%
gt() %>%
fmt_number(columns = vars(fraction), decimals = 3) %>%
tab_header(
title = md("**Variants called summary by class**")
) %>%
tab_options(
table.font.size = 12
) %>%
cols_label(
variants = md("**Variants**"),
fraction = md("**Fraction**")
)
Variants called summary by class | ||
---|---|---|
class | Variants | Fraction |
Fusion | 69 | 0.012 |
Novel splice variant | 2051 | 0.345 |
Transcribed structural variant | 1234 | 0.207 |
Unknown | 2596 | 0.436 |
MINTIE paper Figure 4 showing the number of variant genes called across the Leucegene normal samples.
results_summary <- get_results_summary(mutate(normals_results, group_var = cell_type),
group_var_name = "cell_type")
ggplot(results_summary, aes(cell_type, V1, group=sample)) +
geom_bar(position = position_dodge2(width = 0.9, preserve = "single"), stat = "identity") +
theme_bw() +
xlab("") +
ylab("Genes with variants")
Perform correlation calculation on the library size and number of variant genes found per sample.
Leucegene Gene Expression notebook must be run before this chunk to generate the expression counts matrix.
# load counts data, calculate library sizes and add to results summary
counts <- fread(here("output/Leucegene_gene_counts.tsv"))
libsizes <- apply(counts, 2, sum) %>% data.frame()
colnames(libsizes) <- "libsize"
libsizes$sample <- factor(rownames(libsizes),
levels = results_summary$sample)
results_summary <- left_join(results_summary, libsizes, by ="sample", "sample")
lib_var_cor <- cor(results_summary$libsize, results_summary$V1, method = "spearman")
print(paste("Spearman correlation between library size and variant genes called:", lib_var_cor))
[1] "Spearman correlation between library size and variant genes called: 0.181863114027398"
ggplot(results_summary, aes(libsize, V1, colour = cell_type)) +
geom_point() +
theme_bw() +
ylab("Genes with variants")
Proportion of protein coding genes observed in the MINTIE results.
# load CHESS gene reference containing gene types
chess_genes <- read.delim(gzfile(here("data/ref/chess2.2.genes.gz")))
# join gene info with results and summarise by gene type
results_by_gene <- get_results_by_gene(normals_results)
gene_count <- left_join(results_by_gene, chess_genes, by = c("gene" = "Gene_Name")) %>%
group_by(Gene_Type) %>%
summarise(n_genes = length(unique(gene))) %>%
data.table()
n_protein_coding <- gene_count[gene_count$Gene_Type == "protein_coding", "n_genes"]
print(paste("proportion of protein coding genes =", n_protein_coding / sum(gene_count$n_genes)))
[1] "proportion of protein coding genes = 0.813534387642516"
MINTIE Supplementary Figure 3 showing variant genes called in Leucegene Total White Blood Cell samples with different cell types as control groups.
# get TWBC results
controls_comp <- normals_results[normals_results$cell_type == "Total white blood cells",]
controls_comp$controls <- "twbc"
controls_comp$cell_type <- NULL
# load comparisons against all other controls
controls_test_dir <- here("data/leucegene/normals_controls_test_results")
controls_comp <- load_controls_comparison(controls_test_dir) %>%
rbind(controls_comp, .)
results_summary <- get_results_summary(mutate(controls_comp,
group_var = controls),
group_var_name = "controls")
results_summary %>%
gt() %>%
tab_header(
title = md("**Total variant genes called using different controls**")
) %>%
cols_label(
sample = md("**Sample**"),
controls = md("**Controls**"),
V1 = md("**Variant genes**")
)
Total variant genes called using different controls | ||
---|---|---|
Sample | Controls | Variant genes |
SRX372045 | bc | 356 |
SRX372044 | bc | 375 |
SRX372046 | bc | 451 |
SRX372045 | gran | 132 |
SRX372046 | gran | 253 |
SRX372044 | gran | 283 |
SRX372045 | mono | 143 |
SRX372044 | mono | 192 |
SRX372046 | mono | 198 |
SRX372044 | tc | 336 |
SRX372045 | tc | 391 |
SRX372046 | tc | 425 |
SRX372045 | twbc | 156 |
SRX372044 | twbc | 195 |
SRX372046 | twbc | 240 |
ggplot(results_summary, aes(sample, V1, fill=controls)) +
geom_bar(position=position_dodge2(width=0.9, preserve="single"), stat="identity") +
theme_bw() +
xlab("") +
ylab("Genes with variants") +
scale_fill_brewer(palette = "RdYlBu",
labels = c("mono" = "Monocytes",
"twbc" = "Total white blood cells",
"gran" = "Granulocytes",
"tc" = "T-Cells",
"bc" = "B-Cells"))
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.3.1 gt_0.2.1 stringr_1.4.0 here_0.1
[5] dplyr_1.0.0 data.table_1.12.6
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 RColorBrewer_1.1-2 pillar_1.4.4
[4] compiler_3.6.1 git2r_0.26.1 workflowr_1.4.0
[7] tools_3.6.1 digest_0.6.21 evaluate_0.14
[10] lifecycle_0.2.0 tibble_3.0.1 gtable_0.3.0
[13] checkmate_2.0.0 pkgconfig_2.0.3 rlang_0.4.6
[16] commonmark_1.7 yaml_2.2.0 xfun_0.10
[19] withr_2.1.2 knitr_1.25 generics_0.0.2
[22] fs_1.4.1 vctrs_0.3.1 sass_0.2.0
[25] rprojroot_1.3-2 grid_3.6.1 tidyselect_1.1.0
[28] glue_1.4.1 R6_2.4.0 rmarkdown_1.16
[31] farver_2.0.3 purrr_0.3.2 magrittr_1.5
[34] whisker_0.4 backports_1.1.4 scales_1.1.1
[37] ellipsis_0.3.0 htmltools_0.4.0 colorspace_1.4-1
[40] labeling_0.3 stringi_1.4.3 munsell_0.5.0
[43] crayon_1.3.4