Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot updates and fix notes #93

Merged
merged 3 commits into from
Aug 17, 2020
Merged

Plot updates and fix notes #93

merged 3 commits into from
Aug 17, 2020

Conversation

karissawhiting
Copy link
Collaborator

The main purpose of this PR is to separate out the maf.summary functions into smaller, modularized plotting functions. The need for this arose when I was trying to plot things using API data, but the API data is missing HGVSc and therefore I was not able to get any of the plots. I think this change is beneficial in general, as it allows users to be able to run only what they need. Also, it allows for easy customization syntax like this:

ggvarclass(mut) + 
  scale_fill_pancan() +
  ggtitle("Overwrite Title")

A wrapper function called maf_viz() (feel free to change name of course) now exists that can call them all at once. It returns results in a list, as before.

I also added a utils.R file with some functions that may be called in several places (e.g. check_maf_input())

Here are a few outstanding questions/issues. Please let me know if you have any opinions:

  • For now I removed all of the scale_fill_manual() statements from plotting functions and am just using out of the box ggplot defaults. As discussed with @arorarshi, we may want to consider adding default already loaded palettes, however since it is very simple to customize ggplot objects (see code above) we may not need this.
  • The previous version of the plotting function had the following filtering. Currently, I only included this in the SNV plotting functions. Should all plotting functions have this filtering?
 maf <- maf %>%
    filter(.data$Variant_Type == "SNP",
           .data$HGVSc != "") %>%
    mutate(SNV_Class = substrRight(.data$HGVSc,3)
  • Arshi and I discussed potentially removing p.variant.bp, p.variant.dist and p.variant.dist.bar and p.snv.dist to simplify the functions, as these may not be needed. We can discuss more in the meeting.
  • I’m a little confused about p.corr versus p.comut. Is this just two ways to filter which genes are displayed? one shows top co-occuring genes and one shows correlations for overall top genes? If so, maybe we can put this in one function with an arg option? I may be misunderstanding this though.

@arorarshi @AxelitoMartin

@AxelitoMartin AxelitoMartin merged commit 1c0e1d6 into MSKCC-Epi-Bio:development Aug 17, 2020
@AxelitoMartin
Copy link
Collaborator

Let's go over this quickly at the meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants