Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Remove R script/notebook package installs from snv-callers (Part 2 of N) #701

Merged
9 changes: 0 additions & 9 deletions analyses/snv-callers/compare_snv_callers_plots-tcga.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ _This assumes you are in the top directory of the repository._
Read in set up script.

```{r}
if (!("ggupset" %in% installed.packages())) {
install.packages("ggupset", repos = "http://cran.us.r-project.org")
}
if (!("UpSetR" %in% installed.packages())) {
install.packages("UpSetR", repos = "http://cran.us.r-project.org")
}
if (!("GGally" %in% installed.packages())) {
install.packages("GGally", repos = "http://cran.us.r-project.org")
}
# Magrittr pipe
`%>%` <- dplyr::`%>%`
```
Expand Down
291 changes: 169 additions & 122 deletions analyses/snv-callers/compare_snv_callers_plots-tcga.nb.html

Large diffs are not rendered by default.

30 changes: 9 additions & 21 deletions analyses/snv-callers/compare_snv_callers_plots.Rmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
q---
title: "Plot Caller Comparisons"
output:
html_notebook:
Expand Down Expand Up @@ -50,15 +50,6 @@ _This assumes you are in the top directory of the repository._
Read in set up script.

```{r}
if (!("ggupset" %in% installed.packages())) {
install.packages("ggupset", repos = "http://cran.us.r-project.org")
}
if (!("UpSetR" %in% installed.packages())) {
install.packages("UpSetR", repos = "http://cran.us.r-project.org")
}
if (!("GGally" %in% installed.packages())) {
install.packages("GGally", repos = "http://cran.us.r-project.org")
}
# Magrittr pipe
`%>%` <- dplyr::`%>%`
```
Expand Down Expand Up @@ -93,6 +84,7 @@ callers_per_mutation_df %>%
ggplot2::ylab("")
}
```

## Connect to database

Connect to SQLite database.
Expand Down Expand Up @@ -124,10 +116,10 @@ lancet <- dplyr::tbl(con, "lancet") %>%
dplyr::select(join_cols, "VAF")

mutect <- dplyr::tbl(con, "mutect") %>%
dplyr::select(join_cols, "VAF")
dplyr::select(join_cols, "VAF")

vardict <- dplyr::tbl(con, "vardict") %>%
dplyr::select(join_cols, "VAF")
dplyr::select(join_cols, "VAF")
```

Because `DBI` does not support full_join, we had to use a series of `left_join` and
Expand Down Expand Up @@ -347,19 +339,15 @@ ggplot2::ggsave(file.path(plots_dir, "vaf_violin_plot.png"))

## VAF correlations

Make the plot with ggpairs.
Correlate VAF's across callers

```{r}
GGally::ggpairs(vaf_df %>% dplyr::select(-VAF_consensus, -Variant_Classification),
mapping = ggplot2::aes(alpha = 0.05)) +
ggplot2::theme_classic()
vaf_df %>%
dplyr::select(-VAF_consensus, -Variant_Classification) %>%
cor() %>%
knitr::kable()
```

```{r}
# Save this plot
ggplot2::ggsave(file.path(plots_dir, "vaf_correlations_plot.png"))
cansavvy marked this conversation as resolved.
Show resolved Hide resolved
```

## Mutation Region barplot

Summarize `Variant_Classification` information per caller.
Expand Down
806 changes: 806 additions & 0 deletions analyses/snv-callers/compare_snv_callers_plots.html

Large diffs are not rendered by default.

Binary file modified analyses/snv-callers/plots/comparison/perc_base_change_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analyses/snv-callers/plots/comparison/upset_median_vaf_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analyses/snv-callers/plots/comparison/upset_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified analyses/snv-callers/plots/tcga-comparison/tcga-upset_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.