-
Notifications
You must be signed in to change notification settings - Fork 83
OncoPrint figures #1200
OncoPrint figures #1200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, the Other CNS cancer groups with n < 10 are in a supplemental PDF where they are assigned colors based on the Paired color brewer palette.
I like this! I will modify Supplemental Figure 3 in the manuscript repo to add this panel.
For the oncoprint_alteration_legend.pdf
, it looks like we have a few alterations/colors which we do not use due to the renaming of CNV alterations, so I updated the code to remove those. I also made a few suggestions for swapping some colors.
The only other minor thing I saw was that the oncoprint panel pdfs do not contain goi
in the filename while the analysis module does, so maybe you can add this to be consistent (I double checked you are using goi here and you are 😄 ).
Hom_Deletion #313695 | ||
Hem_Deletion #abd9e9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hom_Deletion #313695 | |
Hem_Deletion #abd9e9 |
We are not actually using these
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotcha!
Del #0072B2 | ||
Amp #D55E00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Del #0072B2 | |
Amp #D55E00 | |
Del #386db0 | |
Amp #c51b7d |
new color suggestions
5'Flank #386db0 | ||
3'Flank #c51b7d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5'Flank #386db0 | |
3'Flank #c51b7d | |
5'Flank #7CCBAC | |
3'Flank #FD8344 |
new color suggestions - moving these two to Amp/Del, where I had meant them to be previously, but it looks like things got shuffled. Let's see what these look like 😬
loss #0072B2 | ||
gain #D55E00 | ||
Del #0072B2 | ||
Amp #D55E00 | ||
High_Level_Gain #FF0000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High_Level_Gain #FF0000 |
We are not using this one either
@jharenza I've updated the color palette and rerun the figures. Can you take a look before I invest any more effort, i.e., attempt to put together the multipanel version? |
The colors I mentioned look fine, but what is "Complex_event"? I hadn't seen that before and it is black, along with nonsense mutations, so that would need a new color if we use it. I would think it would fit into other categories, unless it is an SV of some sort? |
A couple notes:
|
@jharenza ready for another look |
Interesting, I had not noticed that before and I wonder if that was earlier code before the CNVs were added as smaller rectangles in which we are able to see a mutation/fusion + a CNV with two different colors. That begs the question why is it showing as complex rather than the two colors for mut/cnv, unless perhaps a multi-hit SNV + CNV? I can't look into that right now, but probably can later tonight. If you get to it before me, let me know. |
From a cursory look at the code, I think it might arise when there are multiple CNVs. If we set |
Just noting that we should explain this in the figure legend. I can't distinguish between the green for complex event and missense, but otherwise, the flank/amp colors are ok for me. |
Going to request a review from @cbethell! The main file to take a look at is: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM! Just left a comment re: fixing the file path to the figure script in generate-figures.sh
(tested it to make sure it works successfully and it does) 👍
Co-authored-by: Chante Bethell <43576623+cbethell@users.noreply.github.com>
commit ddb6a8c Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Tue Jan 4 09:33:28 2022 -0500 OncoPrint figures (AlexsLemonade#1200) * Initial pass at histology palette overhaul * Add display columns for legends * Remove histology label palette NB from CI * Add broad histology order * Add oncoprint_include * Add oncoprint grouping info to palette df * Make cancer_group other darker; rerun * Pretty sure change in AlexsLemonade#1161 was unintentional * We have been manually editing the oncoprint palette I see * Remove/move/rename to prep for an oncoprint fig2 * Missed the instance where I recode based on other hex code * Rerun oncoprint now that palette is fixed * Change up approach to oncoprint * Remove oncoprint script that assembled from PNGs * Remove oncoprint PNGs * Add new oncoprint figure script saves individual panels as PDFs, also uses new palette * Add PDFs of oncoprints and legends * Add PDF draft of assembled figure 2 * Update figure shell script * Add fig 2 README * Add PNG version of draft figure 2 * Tweak the cancer group palette * Reorder HGAT legend; rerun with new palette * Remove outdated assembled figure * Add compiled versions Sizing and spacing probably still need work! * Update oncoprint palette * Rerun module with new palette * Rerun pub ready figure versions of oncoprints * Add complex event to oncoprint palette * Rerun module with complex event in palette * Rerun oncoprint fig script with complex events * Darker complex event hex code * Try a "wine" color for complex event * Remove outdated PNG & PDF of compiled fig * Update figures/generate-figures.sh Co-authored-by: Chante Bethell <43576623+cbethell@users.noreply.github.com> Co-authored-by: Chante Bethell <43576623+cbethell@users.noreply.github.com> commit 32a81d2 Author: runjin326 <47674661+runjin326@users.noreply.github.com> Date: Fri Dec 3 17:29:51 2021 -0500 tables and script added (AlexsLemonade#1199) * tables and script added * column name changed * modified per suggestion + add README * tables modified * add MB WGS here * suggestion implemented and docker file modified * re-run on docker * dockerfile reverted * space removed * openxlsx added back to docker Co-authored-by: Jo Lynne Rokita <jolynnerokita@d3b.center> Co-authored-by: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> commit 6f3e98c Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Fri Dec 3 08:34:43 2021 -0700 Revamp `figures` documentation (AlexsLemonade#1209) * WIP: figure docs overhaul * Polish figures/README.md * Add TOC * Remove SNV consensus; add breakpoint * Update doc to reflect removal of consensus SNV * Rearrange table for figure scripts * Update figures/README.md Co-authored-by: Candace Savonen <cansav09@gmail.com> * Update figures/README.md Co-authored-by: Candace Savonen <cansav09@gmail.com> commit c2b5a70 Author: Komal Rathi <komalsrathi@users.noreply.github.com> Date: Tue Nov 30 08:42:07 2021 -0500 add molecular subtype to wgs-only samples (AlexsLemonade#1206) Co-authored-by: Jo Lynne Rokita <jolynnerokita@d3b.center> commit 21d501f Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Sun Nov 28 19:00:41 2021 -0500 Update interaction plot to use new cancer group palette (AlexsLemonade#1197) * Initial pass at histology palette overhaul * Add display columns for legends * Remove histology label palette NB from CI * Add broad histology order * Add oncoprint_include * Add oncoprint grouping info to palette df * Make cancer_group other darker; rerun * Save the scatterplot panel as a PDF * Add a shell script to run the chromothripsis module Also adjust CI accordingly * Add session info to R Markdown files * Rerun module with changes & commit output * Add chromothripsis module to figures script * Add figures script for chromothripsis bar plot by cancer group * Add Rscript to figures shell script Also add the copied version of the other chromothripsis panel * Remove lettering from panels * Use PDF output for plots with all disease types * Add ggpattern to Docker * Add patterning to stacked bar chart * Move over main interaction figure, now a PDF * Missed the instance where I recode based on other hex code * Outline the stacked bars in case that's helpful * Change up approach to oncoprint * Tweak the cancer group palette * Remove > 0 filter; rerun with new palette * With new cancer group palette, remove the patterns * Apply suggestions from code review Co-authored-by: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> * Rerun plotting with code changes * ggpattern no longer req'd in this branch * Remove from script as well * Apply suggestions from code review Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> Co-authored-by: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> commit 2e6cc1b Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Sun Nov 28 17:45:33 2021 -0500 Update TP53 classifier plots by broad histology and cancer group to fit new conventions (AlexsLemonade#1205) * Update tp53 by histology plotting to use new palette; save as PDF * Add last plotting script to module shell script * Add documentation for recently added script * Update variable name * Rerun with fix commit a16bb9d Author: runjin326 <47674661+runjin326@users.noreply.github.com> Date: Sun Nov 28 16:23:01 2021 -0500 CI calculation added for odds ratio (AlexsLemonade#1204) * CI calc added for odds ratio * add 0.5 if 0 * function modified * function def * rerun and add results Co-authored-by: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> commit 67b555b Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Sun Nov 28 14:21:18 2021 -0500 Update Figure 4 single panel PDFs, add compiled figure (AlexsLemonade#1194) * Initial pass at histology palette overhaul * Add display columns for legends * Remove histology label palette NB from CI * Add broad histology order * Add oncoprint_include * Add oncoprint grouping info to palette df * Allow for alteration of alpha values in custom function * Remove immune deconv, rework to use new palette * Use updated palette paradigm in telomerase activity box plot * Move up telomerase activity plotting so panel can be used downstream * Take an approach where individual panels are saved as PDFs * panels sub directory * Make cancer_group other darker; rerun * Rerun telomerase activities * Compile individual panels via AI & document * Missed the instance where I recode based on other hex code * Change up approach to oncoprint * Add theme_pubr() to UMAP panel * Tweak the cancer group palette * Rerun with new cancer group palette * Remove outdated assembled figure * Updated versions of compiled figure * Remove commented out code commit 6755273 Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Sun Nov 28 10:51:18 2021 -0500 Add Figure 1A component (AlexsLemonade#1195) * Add most final component of Fig1 from Biorender * Move into panels subdir commit 0ed1f9b Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Wed Nov 17 15:45:35 2021 -0500 Update chromothripsis panels to use new cancer group palette (Fig 3) (AlexsLemonade#1196) * Initial pass at histology palette overhaul * Add display columns for legends * Remove histology label palette NB from CI * Add broad histology order * Add oncoprint_include * Add oncoprint grouping info to palette df * Make cancer_group other darker; rerun * Save the scatterplot panel as a PDF * Add a shell script to run the chromothripsis module Also adjust CI accordingly * Add session info to R Markdown files * Rerun module with changes & commit output * Add chromothripsis module to figures script * Add figures script for chromothripsis bar plot by cancer group * Add Rscript to figures shell script Also add the copied version of the other chromothripsis panel * Missed the instance where I recode based on other hex code * Change up approach to oncoprint * Tweak the cancer group palette * Remove > 0 filter; rerun with new palette * Apply suggestions from code review Co-authored-by: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> * Rerun plotting with code changes Co-authored-by: Ally Hawkins <54039191+allyhawkins@users.noreply.github.com> commit 5f57826 Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Mon Nov 15 16:00:39 2021 -0500 Create minimal main display item palette (AlexsLemonade#1176) (AlexsLemonade#1193) * Initial pass at histology palette overhaul * Add display columns for legends * Remove histology label palette NB from CI * Add broad histology order * Add oncoprint_include * Add oncoprint grouping info to palette df * Make cancer_group other darker; rerun * Missed the instance where I recode based on other hex code * Change up approach to oncoprint * Tweak the cancer group palette * Apply suggestions from code review Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> * Also display other hex codes with legend() Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> commit 4951c98 Author: Jo Lynne Rokita <jolynnerokita@d3b.center> Date: Mon Nov 15 15:57:33 2021 -0500 Tp53 figures by broad histology and cancer group (AlexsLemonade#1202) * add plots of tp53 scores by histology * update path to root commit 78220da Author: runjin326 <47674661+runjin326@users.noreply.github.com> Date: Fri Oct 22 20:21:18 2021 -0400 Oncoprint output count tables (AlexsLemonade#1191) commit b00d344 Author: Krutika Gaonkar <34580719+kgaonkar6@users.noreply.github.com> Date: Sat Oct 23 02:30:22 2021 +0530 N per cancer_group oncoprint (AlexsLemonade#1189) * adding ns per cancer_group * add Ns to data outputfolder Co-authored-by: kgaonkar6 <gaonkark@chop.edu> Co-authored-by: Jo Lynne Rokita <jolynnerokita@d3b.center> commit 8557352 Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Fri Oct 22 14:03:12 2021 -0400 Take "sufficiently non-zero" approach to exposures for CNS signature fitting (AlexsLemonade#1192) * Save & ignore full fit_signatures output * Make it easy to just run the CNS fitting part * Run all the steps in CI * Update analyses/mutational-signatures/run_mutational_signatures.sh Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> * Set exposures to zero when lower confidence interval < 0.01 * Rerun CNS fitting steps * Add info about lower interval to README Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> commit d76ac06 Author: Jaclyn Taroni <jaclyn.n.taroni@gmail.com> Date: Thu Oct 21 16:26:51 2021 -0400 Save output of fit_signatures(), make it easier just to run CNS fitting steps (AlexsLemonade#1190) * Save & ignore full fit_signatures output * Make it easy to just run the CNS fitting part * Run all the steps in CI * Update analyses/mutational-signatures/run_mutational_signatures.sh Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> commit 380b6f1 Author: Jo Lynne Rokita <jolynnerokita@d3b.center> Date: Wed Oct 20 15:23:13 2021 -0400 add Ns and percents to co-occurrence tables for paper (AlexsLemonade#1188) * add Ns and percents for paper - n_mutated_gene1 - n_mutated_gene2 - perc_mutated_gene1 - perc_mutated_gene2 - perc_cooccur_or_mutexcl * add n_mutated_gene comment * clarify `perc_cooccur_or_mutexcl` * add all sample percent calculations and update definitions clarified to: - perc_cooccur_all_samples - perc_mutexcl_all_samples - perc_cooccur_gene1_mutated - perc_mutexcl_gene1_mutated * remove ifelse * update `perc_cooccur` calculation perc_cooccur = mut11*100/(mut11 + mut10 + mut01) * fix typo in perc_mutexcl calculation * Update analyses/interaction-plots/scripts/cooccur_functions.R Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> * Update analyses/interaction-plots/scripts/cooccur_functions.R Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org> Co-authored-by: Joshua Shapiro <josh.shapiro@ccdatalab.org>
Addressing #1177 and #1178, but made slightly different choices than what is detailed in those issues. Importantly, I've only removed cancer groups with less than 10 samples for the other CNS plot. In the current version of #1193, cancer groups with n < 10 in the other 3 broad histologies are randomly assigned a hex code from the
Greys
color brewer palette. There are over 20 cancer groups with n < 10 that'd be included in the Other CNS plot (fewer than that when you consider which groups actually show up in the plots using the other CNS genes of interest list), so it's not feasible to randomly assign greys to them in the same way. Instead, the Other CNS cancer groups with n < 10 are in a supplemental PDF where they are assigned colors based on thePaired
color brewer palette.Similar to #1194, I've created an Rscript (
figures/scripts/fig2-oncoprint-landscape.R
) that creates individual panels & legends as PDFs (figures/pdfs/fig2/panels
) and then I've assembled a draft figure in Illustrator. You can see that draft asfigures/pngs/figure2.png
. I've removed the old script that usedmultipanelfigure
to assemble the figure from the PNGs in the module (figures/scripts/oncoprint-landscape.R
).I needed to rerun the
oncoprint-landscape
module because we had been manually updating the OncoPrint palette, rather than updating the script that has all the palettes, so some colors got dropped in #1161 when the tumor descriptor palette was created and those colors were missing when things were run as part of #1189. I've also deprecated the former figure 2 script to hopefully avoid confusion.