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

Using mapping histology groups for plotting -- Part 2 implemention (PR 2 of 4) #911

Merged

Conversation

cansavvy
Copy link
Collaborator

@cansavvy cansavvy commented Jan 15, 2021

Purpose/implementation Section

What scientific question is your analysis addressing?

This PR addresses Step 3 and part Step 4 discussed in #897 and #898. This PR is updating modules that should now be using the palettes/histology_label_color_table.tsv table that is created by the notebook added in #899

What was your approach?

This PR is 2 of a few PRs where I am updating things in response to the table added in #898

Here's what's accomplished in this PR and what files have changes that need review (the rest are updated plots):

  • cnv-chrom-plot/cn_status_heatmap.Rmd now uses the histology groupings and hex code colors from histology_label_color_table.tsv
  • mutational-signatures/known_signature.Rmd now uses the histology groupings and hex code colors from histology_label_color_table.tsv
  • I also needed to update the custom functions in mutational-signatures/util so that they used display_group instead of short_histology for the plotting.

I deleted the old plots, re-ran both of the notebooks mentioned above, and now am pushing the updated plots and results. That's where the crazy number of files changed comes from, a lot of plot updates.

*Note that the palettes/histology_color_palette.tsv file itself is not deleted yet, I will do this in the last PR of this series so the other modules that use this file don't break in CI yet.

What GitHub issue does your pull request address?

Makes more progress toward addressing #898

Directions for reviewers. Tell potential reviewers what kind of feedback you are soliciting.

Which areas should receive a particularly close look?

  • How do we feel about how the updated chromosomal-instability heatmap plots look? (see zip file below if you don't want to check out the branch)
  • Is the figures/README updated appropriately and with enough detail?

Is the analysis in a mature enough form that the resulting figure(s) and/or table(s) are ready for review?

Yes. Here's updated cn status heatmap from cnv-chrom-plot:

cn_status_heatmap

And here's some of the updated plots from the known signature analysis in mutational-signatures (I did not included the signature_grouped_barplots folder of plots; it was too big.

bubble_matrix_cosmic_mutation_sig
bubble_matrix_nature_mutation_sig

Results

What is your summary of the results?

Plots are different and now use the display_group histology labels instead of short_histology.

Note that cnv-chrom-plot does not use the histology color palette, but it does still use short_histology for its plots -- *I have not updated this notebook here, we should discuss if we should update that in another PR. *

Reproducibility Checklist

  • The dependencies required to run the code in this pull request have been added to the project Dockerfile. -- no new packages are needed.
  • This analysis has been added to continuous integration.

Documentation Checklist

I checked the respective READMEs for these analyses and they did not require any updates for these changes.

  • This analysis module has a README and it is up to date.
  • This analysis is recorded in the table in analyses/README.md and the entry is up to date.
  • The analytical code is documented and contains comments.

@cansavvy cansavvy marked this pull request as ready for review January 20, 2021 19:06
@cansavvy cansavvy requested a review from jashapiro January 20, 2021 19:07
Copy link
Member

@jashapiro jashapiro left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just one comment because I don't trust the machines.

Comment on lines +400 to +401
histologies_color_key_filtered <- unique(histologies$hex_codes)
names(histologies_color_key_filtered) <- unique(histologies$display_group)
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little worried about separate unique() calls preserving order... I think it should work fine, but it seems somehow dangerous to me. So I present an alternative below.

Suggested change
histologies_color_key_filtered <- unique(histologies$hex_codes)
names(histologies_color_key_filtered) <- unique(histologies$display_group)
histologies_color_key_filtered <- histologies %>%
dplyr::select(display_group, hex_codes) %>%
dplyr::distinct() %>%
dplyr::pull(hex_codes, name = display_group)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. I like this better.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Turns out the name argument for pull is not in our version of dplyr for our docker image, so I can't use the last part, but I will add a distinct to this part but in my subsequent PR of this series.

@jaclyn-taroni jaclyn-taroni merged commit 2c1657d into AlexsLemonade:master Jan 20, 2021
@cansavvy cansavvy deleted the cansavvy/update-histology-colors-1 branch January 25, 2021 16:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants