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

OncoPrint figures #1200

Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
0fe0890
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Jan 11, 2021
7c0997c
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Jan 19, 2021
8727fac
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Mar 31, 2021
e7f1d0a
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Apr 12, 2021
a199d3c
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Apr 13, 2021
8431b1e
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Apr 19, 2021
c29d225
Merge branch 'AlexsLemonade:master' into master
jaclyn-taroni May 7, 2021
5292b8e
Merge branch 'AlexsLemonade:master' into master
jaclyn-taroni May 10, 2021
6175d61
Merge branch 'AlexsLemonade:master' into master
jaclyn-taroni May 10, 2021
43830e8
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni May 11, 2021
ed4bb16
Merge branch 'AlexsLemonade:master' into master
jaclyn-taroni May 13, 2021
0a5093a
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Jul 19, 2021
d9e5645
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Aug 9, 2021
1ac140e
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Aug 30, 2021
1912ce2
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Sep 9, 2021
65e2778
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Sep 14, 2021
728893c
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Oct 21, 2021
e030998
Merge remote-tracking branch 'upstream/master'
jaclyn-taroni Oct 21, 2021
29ebaaa
Initial pass at histology palette overhaul
jaclyn-taroni Sep 14, 2021
905b632
Add display columns for legends
jaclyn-taroni Sep 15, 2021
1f1078e
Remove histology label palette NB from CI
jaclyn-taroni Sep 15, 2021
aaa602b
Add broad histology order
jaclyn-taroni Sep 15, 2021
f1f87ae
Add oncoprint_include
jaclyn-taroni Sep 15, 2021
0c89ac5
Add oncoprint grouping info to palette df
jaclyn-taroni Sep 15, 2021
d69d5b8
Make cancer_group other darker; rerun
jaclyn-taroni Oct 22, 2021
8cd6443
Merge remote-tracking branch 'upstream/master' into jaclyn-taroni/117…
jaclyn-taroni Oct 22, 2021
ffec387
Pretty sure change in #1161 was unintentional
jaclyn-taroni Sep 15, 2021
2bee64e
We have been manually editing the oncoprint palette I see
jaclyn-taroni Sep 15, 2021
42476aa
Remove/move/rename to prep for an oncoprint fig2
jaclyn-taroni Oct 27, 2021
cc1495a
Missed the instance where I recode based on other hex code
jaclyn-taroni Oct 27, 2021
9f68386
Merge branch 'master' into jaclyn-taroni/1176-palette
jaclyn-taroni Oct 27, 2021
bded3f6
Merge branch 'jaclyn-taroni/1176-palette' into jaclyn-taroni/pub-read…
jaclyn-taroni Oct 27, 2021
4503394
Rerun oncoprint now that palette is fixed
jaclyn-taroni Oct 27, 2021
65a8918
Change up approach to oncoprint
jaclyn-taroni Oct 29, 2021
68bdfde
Merge branch 'jaclyn-taroni/1176-palette' into jaclyn-taroni/pub-read…
jaclyn-taroni Oct 29, 2021
eb2299e
Remove oncoprint script that assembled from PNGs
jaclyn-taroni Oct 30, 2021
89f4b76
Remove oncoprint PNGs
jaclyn-taroni Oct 30, 2021
a3c8e88
Add new oncoprint figure script
jaclyn-taroni Oct 30, 2021
9720a50
Add PDFs of oncoprints and legends
jaclyn-taroni Oct 30, 2021
36a7c22
Add PDF draft of assembled figure 2
jaclyn-taroni Oct 30, 2021
d52c858
Update figure shell script
jaclyn-taroni Oct 30, 2021
2137214
Add fig 2 README
jaclyn-taroni Oct 30, 2021
cf6fa5a
Add PNG version of draft figure 2
jaclyn-taroni Oct 30, 2021
2427302
Tweak the cancer group palette
jaclyn-taroni Nov 15, 2021
1f3f84b
Merge branch 'jaclyn-taroni/1176-palette' into jaclyn-taroni/pub-read…
jaclyn-taroni Nov 15, 2021
b878d9d
Reorder HGAT legend; rerun with new palette
jaclyn-taroni Nov 15, 2021
0d43d1d
Remove outdated assembled figure
jaclyn-taroni Nov 15, 2021
d724ec6
Merge remote-tracking branch 'upstream/master' into jaclyn-taroni/pub…
jaclyn-taroni Nov 16, 2021
f6bcf25
Add compiled versions
jaclyn-taroni Nov 16, 2021
2cd919d
Update oncoprint palette
jaclyn-taroni Dec 3, 2021
ba3dd7f
Rerun module with new palette
jaclyn-taroni Dec 3, 2021
a9fd42b
Rerun pub ready figure versions of oncoprints
jaclyn-taroni Dec 3, 2021
48f7b1e
Merge branch 'master' into jaclyn-taroni/pub-ready-oncoprint
jaclyn-taroni Dec 3, 2021
1cb1245
Add complex event to oncoprint palette
jaclyn-taroni Dec 4, 2021
3fc5d11
Rerun module with complex event in palette
jaclyn-taroni Dec 4, 2021
ba70773
Rerun oncoprint fig script with complex events
jaclyn-taroni Dec 4, 2021
c12c3e8
Darker complex event hex code
jaclyn-taroni Dec 21, 2021
266a3b3
Try a "wine" color for complex event
jaclyn-taroni Dec 21, 2021
4f557f7
Remove outdated PNG & PDF of compiled fig
jaclyn-taroni Dec 21, 2021
8a5d31a
Update figures/generate-figures.sh
jaclyn-taroni Dec 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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.
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.
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.
15 changes: 7 additions & 8 deletions figures/generate-figures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ mkdir -p pdfs
Rscript --vanilla scripts/color_palettes.R
Rscript -e "rmarkdown::render('mapping-histology-labels.Rmd', clean = TRUE)"

################ Sample distribution
# Run sample distribution analysis
bash ${analyses_dir}/sample-distribution-analysis/run-sample-distribution.sh

# TODO: Rscript for figure (related: https://github.com/AlexsLemonade/OpenPBTA-analysis/issues/1175)

######################
## Interaction plots
Expand Down Expand Up @@ -77,14 +82,8 @@ bash ${analyses_dir}/oncoprint-landscape/run-oncoprint.sh
# Will create two plots - primary only and "primary plus" samples
filenames=(primary_only primary-plus)

for filename in "${filenames[@]}"; do

## Run the `oncoprint-landscape` figure assembly script
Rscript --vanilla scripts/oncoprint-landscape.R \
--lead_filename ${filename} \
--png_name pngs/${filename}_oncoprint_landscape.png

done
# Create single panel PDFs and legends
Rscript --vanilla figures/figures/scripts/fig2-oncoprint-landscape.R

####### Telomerase Activities

Expand Down
12 changes: 7 additions & 5 deletions figures/palettes/oncoprint_color_palette.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ In_Frame_Ins #FFE4E1
Stop_Codon_Ins #CC79A7
Start_Codon_Del #56B4E9
Fusion #7B68EE
Multi_Hit #00F021
Multi_Hit #CCCCCC
Hom_Deletion #313695
Hem_Deletion #abd9e9
Comment on lines 15 to 16
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Hom_Deletion #313695
Hem_Deletion #abd9e9

We are not actually using these

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to edit the script that generates them (figures/scripts/color_palettes.R), not this file directly. Editing this file directly caused problems (see the mentions of #1161 and #1189 in the original PR comment).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha!

amplification #c51b7d
loss #0072B2
gain #D55E00
High_Level_Gain #FF0000
Del #386db0
Amp #c51b7d
Multi_Hit_Fusion #CD96CD
Intron #5ea4fe
5'Flank #7CCBAC
3'Flank #FD8344
Complex_Event #571242
6 changes: 6 additions & 0 deletions figures/pdfs/fig2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Figure 2

Figure 2 is compiled from the output of `figures/scripts/fig2-oncoprint-landscape.R`

The individual panels and legends can be found in `panels`.
They are compiled via Adobe Illustrator, saved as a PDF to this directory, and then a PNG file is exported to `figures/pngs`.
Binary file not shown.
Binary file added figures/pdfs/fig2/panels/germline_sex_legend.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed figures/pngs/fig1-openpbta-distribution.png
Binary file not shown.
Binary file removed figures/pngs/fig2-mutational-landscapes.png
Binary file not shown.
Binary file removed figures/pngs/primary-plus_oncoprint_landscape.png
Binary file not shown.
Binary file removed figures/pngs/primary_only_oncoprint_landscape.png
Binary file not shown.
30 changes: 17 additions & 13 deletions figures/scripts/color_palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ divergent_df <- data.frame(color_names = divergent_color_names,
# col_fun <- circlize::colorRamp2(divergent_col_val,
# divergent_col_palette)

### 4) A binary color key which are the most extreme colors in the divergent color scale.
### 4) A binary color key which are the most extreme colors in the divergent color scale.
binary_col_palette <- c("#2166ac",
"#b2182b",
na_color)
Expand All @@ -124,14 +124,16 @@ oncoprint_col_palette <- c("#35978f",
"#CC79A7",
"#56B4E9",
"#7B68EE",
"#00F021",
"#CCCCCC",
"#313695",
"#abd9e9",
"#386db0",
"#c51b7d",
"#0072B2",
"#D55E00",
"#FF0000",
"#CD96CD")
"#CD96CD",
"#5ea4fe",
"#7CCBAC",
"#FD8344",
"#571242")

oncoprint_color_names <- c("Missense_Mutation",
"Nonsense_Mutation",
Expand All @@ -148,11 +150,13 @@ oncoprint_color_names <- c("Missense_Mutation",
"Multi_Hit",
"Hom_Deletion",
"Hem_Deletion",
"amplification",
"loss",
"gain",
"High_Level_Gain",
"Multi_Hit_Fusion")
"Del",
"Amp",
"Multi_Hit_Fusion",
"Intron",
"5'Flank",
"3'Flank",
"Complex_Event")

# Format as data.frame
oncoprint_df <- data.frame(color_names = oncoprint_color_names,
Expand All @@ -179,7 +183,7 @@ oncoprint_df <- data.frame(color_names = oncoprint_color_names,
# Cat this out
cat(swatches)
}

# Format as data.frame
tumor_descriptor_palette <- data.frame(color_names = c("Initial CNS Tumor",
"Progressive",
Expand All @@ -192,7 +196,7 @@ oncoprint_df <- data.frame(color_names = oncoprint_color_names,
"#FD8CC1FF",
"#FD7446FF")) %>%
readr::write_tsv(file.path(output_dir, "tumor_descriptor_palette.tsv"))

#
# Usage:
# Put whichever color palette you are updating into function.
Expand Down
Loading