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

Dependency cleanup and setting up actions #55

Merged
merged 9 commits into from
Mar 19, 2024
Merged

Conversation

Kdreval
Copy link
Contributor

@Kdreval Kdreval commented Mar 17, 2024

This PR ensures the viz package passes devtools check, brings documentation in place, reduces dependencies burden, and sets up the githbub actions build check similar to other packages. The issues directly addressed here are:

Pull Request Checklists

Important: When opening a pull request, keep only the applicable checklist and delete all other sections.

Checklist for all PRs

Required

  • I ensured not to prepend the functions existing in both GAMBLR.data and GAMBLR.results with <package>::function() syntax.
  • I ensured not to add GAMBLR.data or GAMBLR.results to the @import section of the documentation

@@ -25,7 +25,7 @@
#' @return A plot as a ggplot object (grob).
#'
#' @rawNamespace import(data.table, except = c("last", "first", "between", "transpose", "melt", "dcast"))
#' @import ggplot2 cowplot dplyr
#' @import ggplot2 GAMBLR.helpers dplyr
Copy link
Contributor

Choose a reason for hiding this comment

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

> fancy_alignment_plot(these_sample_ids = my_samples)
Using bundled metadata from GAMBLR.data
Using the bundled collated results in GAMBLR.data...
Using the bundled metadata in GAMBLR.data...
QC Metric successfully retreived for 89 samples out of a total of  samples in input sample table.
Error in melt(., id.var = "sample_id") : could not find function "melt"

Need to add @importFrom reshape2 melt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One of the issues this PR addresses is dependency burden, so instead of adding this package I re-implemented this with a superior pivot_longer function.


arranged_plot = cowplot::plot_grid(plot_grid(NULL, legend, NULL, nrow = 1), plots, nrow = 2, rel_heights = c(0.1, 1))
arranged_plot = ggarrange(
replica$forest,
Copy link
Contributor

Choose a reason for hiding this comment

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

metadata = GAMBLR.results::get_gambl_metadata()
this_meta = dplyr::filter(metadata, pairing_status == "matched")
this_meta = dplyr::filter(this_meta, pathology %in% c("FL", "DLBCL"))

maf = get_ssm_by_sample(these_samples_metadata = this_meta)

prettyForestPlot(maf = maf,
                 metadata = this_meta,
                 genes = c("ATP6V1B2",
                           "EZH2",
                           "TNFRSF14",
                           "RRAGC"),
                 comparison_column = "pathology",
                 comparison_values = c("DLBCL",
                                       "FL"),
                 separate_hotspots = FALSE,
                 comparison_name = "FL vs DLBCL")

FONT: 20 POINT: 16.6666666666667 3
Error in ggarrange(replica$forest, replica$bar, widths = c(1, 0.6), common.legend = TRUE,  : 
  object 'replica' not found

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! ✔️

Copy link
Contributor

Choose a reason for hiding this comment

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

This function calls GAMBLR.utils::gene_to_region using the wrong parameter genome_build. Could you change it to projection.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! ✔️

@Kdreval Kdreval merged commit d321cc3 into master Mar 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants