forked from AlexsLemonade/OpenPBTA-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine broad histology oncoprints into a single multi-panel plot (Al…
…exsLemonade#1051) * add multi panel png for histology specific oncoprints * label individual oncoprints - create loop in generate figures script to run `oncoprint-landscape.R` for each set of samples (primary_only and primary-plus) - remove previous figures * accommodate for the GOI list revisions made in AlexsLemonade#1053 * redesign `oncoprint-landscape.R` * remove unnecessary files - fix spacing in shell script * actually fix spacing in shell script * replace `transcriptomic_figure` with more accurate `oncoprint_figure` Co-authored-by: Jaclyn Taroni <jaclyn.n.taroni@gmail.com>
- Loading branch information
1 parent
ece6c5e
commit dcef05a
Showing
27 changed files
with
3,054 additions
and
2,965 deletions.
There are no files selected for viewing
Binary file added
BIN
+299 KB
analyses/oncoprint-landscape/plots/primary-plus_embryonal_goi_oncoprint.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 added
BIN
+340 KB
analyses/oncoprint-landscape/plots/primary-plus_embryonal_oncoprint.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 added
BIN
+231 KB
analyses/oncoprint-landscape/plots/primary-plus_ependymal_goi_oncoprint.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 added
BIN
+317 KB
analyses/oncoprint-landscape/plots/primary-plus_ependymal_oncoprint.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 added
BIN
+309 KB
analyses/oncoprint-landscape/plots/primary-plus_hgat_goi_oncoprint.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.
Binary file added
BIN
+307 KB
analyses/oncoprint-landscape/plots/primary-plus_lgat_goi_oncoprint.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.
Binary file added
BIN
+318 KB
analyses/oncoprint-landscape/plots/primary-plus_other_goi_oncoprint.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.
Binary file added
BIN
+297 KB
analyses/oncoprint-landscape/plots/primary_only_embryonal_goi_oncoprint.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 added
BIN
+346 KB
analyses/oncoprint-landscape/plots/primary_only_embryonal_oncoprint.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 added
BIN
+234 KB
analyses/oncoprint-landscape/plots/primary_only_ependymal_goi_oncoprint.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 added
BIN
+320 KB
analyses/oncoprint-landscape/plots/primary_only_ependymal_oncoprint.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 added
BIN
+309 KB
analyses/oncoprint-landscape/plots/primary_only_hgat_goi_oncoprint.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.
Binary file added
BIN
+301 KB
analyses/oncoprint-landscape/plots/primary_only_lgat_goi_oncoprint.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.
Binary file added
BIN
+319 KB
analyses/oncoprint-landscape/plots/primary_only_other_goi_oncoprint.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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
5,681 changes: 2,841 additions & 2,840 deletions
5,681
figures/palettes/histology_label_color_table.tsv
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Chante Bethell for ALSF CCDL 2021 | ||
# | ||
# Makes a multipanel plot for broad histology specific oncoprints. | ||
# | ||
# Code for this script was adapted from | ||
# `figures/scripts/transcriptomic-overview.R` | ||
|
||
#### Set Up -------------------------------------------------------------------- | ||
|
||
# Load maftools | ||
library(maftools) | ||
|
||
# Load multipanelfigure for figure assembly later | ||
library(multipanelfigure) | ||
|
||
# Get `magrittr` pipe | ||
`%>%` <- dplyr::`%>%` | ||
|
||
#### Directories and Files ----------------------------------------------------- | ||
|
||
# Detect the ".git" folder -- this will in the project root directory. | ||
# Use this as the root directory to ensure proper execution, no matter where | ||
# it is called from. | ||
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git")) | ||
|
||
# Declare output directory | ||
output_dir <- file.path(root_dir, "figures", "pngs") | ||
|
||
# Oncoprint directory | ||
onco_dir <- file.path(root_dir, "analyses", "oncoprint-landscape", "plots") | ||
|
||
#### Command line options ------------------------------------------------------ | ||
|
||
# Declare command line options | ||
option_list <- list( | ||
optparse::make_option( | ||
c("-l", "--lead_filename"), | ||
type = "character", | ||
default = NULL, | ||
help = "the leading filename for the oncoprints -- can be primary_only or primary-plus" | ||
), | ||
optparse::make_option( | ||
c("-p", "--png_name"), | ||
type = "character", | ||
default = NULL, | ||
help = "oncoprint output png file name" | ||
) | ||
) | ||
|
||
# Read the arguments passed | ||
opt_parser <- optparse::OptionParser(option_list = option_list) | ||
opt <- optparse::parse_args(opt_parser) | ||
|
||
#### PNG names ---------------------------------------------------------------- | ||
|
||
# Here we'll set up the file names for the broad histology specific oncoprints | ||
# stored in the `oncoprint-landscape` module | ||
lgat_png <- file.path(onco_dir, paste0(opt$lead_filename, "_lgat_goi_oncoprint.png")) | ||
embryonal_png <- file.path(onco_dir, paste0(opt$lead_filename, "_embryonal_goi_oncoprint.png")) | ||
hgat_png <- file.path(onco_dir, paste0(opt$lead_filename, "_hgat_goi_oncoprint.png")) | ||
ependymal_png <- file.path(onco_dir, paste0(opt$lead_filename, "_ependymal_goi_oncoprint.png")) | ||
other_cns_png <- file.path(onco_dir, paste0(opt$lead_filename, "_other_goi_oncoprint.png")) | ||
|
||
#### Assemble multipanel figure ------------------------------------------------ | ||
|
||
oncoprint_figure <- multi_panel_figure(columns = 8, | ||
rows = 2, | ||
width = 1200, | ||
height = 300) | ||
|
||
oncoprint_figure <- fill_panel(oncoprint_figure, | ||
lgat_png, | ||
col = 2:3, | ||
row = 1, | ||
scaling = "stretch", | ||
label = "Low-grade astrocytic tumor") | ||
|
||
oncoprint_figure <- fill_panel(oncoprint_figure, | ||
embryonal_png, | ||
col = 4:5, | ||
row = 1, | ||
scaling = "stretch", | ||
label = "Embryonal tumor") | ||
|
||
oncoprint_figure <- fill_panel(oncoprint_figure, | ||
hgat_png, | ||
col = 6:7, | ||
row = 1, | ||
scaling = "stretch", | ||
label = "Diffuse astrocytic and oligodendroglial tumor") | ||
|
||
oncoprint_figure <- fill_panel(oncoprint_figure, | ||
ependymal_png, | ||
col = 2:3, | ||
row = 2, | ||
scaling = "stretch", | ||
label = "Ependymal tumor") | ||
|
||
oncoprint_figure <- fill_panel(oncoprint_figure, | ||
other_cns_png, | ||
col = 4:5, | ||
row = 2, | ||
scaling = "stretch", | ||
label = "Other CNS") | ||
|
||
save_multi_panel_figure(oncoprint_figure, opt$png_name) |