Skip to content
New issue

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

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

Already on GitHub? # to your account

init prettyCoOncoplot #92

Merged
merged 11 commits into from
May 20, 2022
Merged

init prettyCoOncoplot #92

merged 11 commits into from
May 20, 2022

Conversation

Kdreval
Copy link
Collaborator

@Kdreval Kdreval commented May 19, 2022

Adding the functionality to show 2 prettyOncoplots side-by-side. The output is ggplot-compatible and can be arranged together with other plots in a multi-panel figure.

Copy link
Contributor

@mattssca mattssca left a comment

Choose a reason for hiding this comment

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

Awesome addition to GAMBLR.! Thanks, Kostia. Just a few minor comments/questions.

R/viz.R Outdated
#' ssm1=maftools::read.maf(ssm1)
#' ssm2=get_coding_ssm(limit_cohort = "BL_Pediatric")
#' ssm2=maftools::read.maf(ssm2)
#' meta1=get_gambl_metadata() %>% filter(cohort=="BL_Adult")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how important this is, but when I tried to run the example I got an error saying "Error in filter(., cohort == "BL_Pediatric") : object 'cohort' not found ". This is since the package related to the intended filter function is not specified. Adding dplyr:: in front of the filter statement solved it and the example runs. Just a minor comment. The rest of the example works great and I now have a side-by-side (very) Pretty Oncoplot :)

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, this happens for me too when I run devtools::load_all(). You are right, the example should say dplyr::filter - I will correct this and re-generate documentation

}

# Arguments to pass into prettyOncoplot
oncoplot_args = list(...)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great!

@@ -1725,11 +1725,11 @@ get_gambl_colours = function(classification = "all",
"NEG" = "#E5A4CB")

all_colours[["BL"]] = c("M53-BL" = "#A6CEE3",
"DLBCL-1" = "#721F0F",
"DLBCL-A" = "#721F0F",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious, what's the rationale for moving away from numbers to letters in this case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, this is because we will rename these subgroups as part of our response to reviewer's comments fr our manuscript. The concern is that the clusters C1 to C5 already exist for DLBCL, and this may create confusion

Copy link
Collaborator

@rdmorin rdmorin left a comment

Choose a reason for hiding this comment

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

Some thoughts to consider before we lock this in.

@@ -1093,8 +1093,10 @@ get_cn_states = function(regions_list,
cn_matrix = pivot_wider(all_cn, id_cols = "sample_id", names_from = "region_name", values_from = "CN") %>%
column_to_rownames("sample_id")

names(cn_matrix) = region_names
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why was this changed? Is it a bug fix? It seems like it will affect the output.

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 had this not working as it was before. I think it might be related to R v3.6 to R v4 shift. Basically it was returning an unnamed vector of numbers (CN states) instead of a named column in a df

#' fontSizeGene=12,
#' metadataBarFontsize=10,
#' label1="Adult",
#' label2="Pediatric")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a suggestion for how to make this function easier to use. What about implementing it the same way prettyForestPlot is set up. The user doesn't have to worry about subsetting. They just provide one mutation_df and one metadata table and specify the column and two values to use to subset the data to the two groups. Would this have any drawbacks?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Totally possible to do, sure! Should be easy to implement. I agree it will make the life of a user better!

@Kdreval
Copy link
Collaborator Author

Kdreval commented May 20, 2022

@mattssca , @rdmorin : Thank you s much for the reviews! The comments were addressed and pushed to git. This is now ready for re-review

Copy link
Contributor

@mattssca mattssca left a comment

Choose a reason for hiding this comment

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

Thanks Kostia, everything good at my end!

Copy link
Collaborator

@rdmorin rdmorin left a comment

Choose a reason for hiding this comment

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

Nice addition!

@Kdreval
Copy link
Collaborator Author

Kdreval commented May 20, 2022

Thank you both for review and approval!

@Kdreval Kdreval merged commit 93e88d7 into master May 20, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants