From d037878b0b94cd487f463088d699c8aa7f66ad58 Mon Sep 17 00:00:00 2001 From: Kdreval Date: Thu, 1 Feb 2024 10:44:42 -0800 Subject: [PATCH 1/3] bug fix: resolve function conflicts --- NAMESPACE | 1 - R/prettyRainfallPlot.R | 8 ++++---- man/ashm_multi_rainbow_plot.Rd | 7 +++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index 8ce5265..6d09e29 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -31,7 +31,6 @@ export(pretty_lollipop_plot) export(splendidHeatmap) export(ssm_to_proteinpaint) import(ComplexHeatmap) -import(GAMBLR.data) import(GAMBLR.helpers) import(GAMBLR.utils) import(RCircos) diff --git a/R/prettyRainfallPlot.R b/R/prettyRainfallPlot.R index 9e7c03e..0d8092b 100644 --- a/R/prettyRainfallPlot.R +++ b/R/prettyRainfallPlot.R @@ -35,7 +35,7 @@ #' @return a ggplot2 object #' #' @rawNamespace import(data.table, except = c("last", "first", "between", "transpose", "melt", "dcast")) -#' @import ggplot2 dplyr readr stringr tidyr reshape2 GAMBLR.data GAMBLR.helpers GAMBLR.utils +#' @import ggplot2 dplyr readr stringr tidyr reshape2 GAMBLR.helpers GAMBLR.utils #' @export #' #' @examples @@ -110,7 +110,7 @@ prettyRainfallPlot = function( # allow to zoom in to a specific region if (!missing(zoom_in_region)) { region <- zoom_in_region - zoom_in_region <- GAMBLR.data::region_to_chunks(zoom_in_region) + zoom_in_region <- region_to_chunks(zoom_in_region) zoom_in_region$chromosome <- GAMBLR.helpers::standardize_chr_prefix( incoming_vector = zoom_in_region$chromosome, projection = projection @@ -121,7 +121,7 @@ prettyRainfallPlot = function( if (label_ashm_genes) { if (projection == "grch37") { - ashm_regions <- GAMBLR.data::grch37_ashm_regions %>% + ashm_regions <- grch37_ashm_regions %>% dplyr::rename( "start" = "hg19_start", "end" = "hg19_end", @@ -134,7 +134,7 @@ prettyRainfallPlot = function( ) ) } else if (projection == "hg38") { - ashm_regions <- GAMBLR.data::hg38_ashm_regions %>% + ashm_regions <- hg38_ashm_regions %>% dplyr::rename( "start" = "hg38_start", "end" = "hg38_end", diff --git a/man/ashm_multi_rainbow_plot.Rd b/man/ashm_multi_rainbow_plot.Rd index bbc2696..df7ec0c 100644 --- a/man/ashm_multi_rainbow_plot.Rd +++ b/man/ashm_multi_rainbow_plot.Rd @@ -13,11 +13,12 @@ ashm_multi_rainbow_plot( custom_colours, classification_column = "lymphgen", maf_data, + projection = "grch37", verbose = TRUE ) } \arguments{ -\item{regions_bed}{Bed file with chromosome coordinates, should contain columns chr, start, end, name (with these exact names).} +\item{regions_bed}{Bed file with chromosome coordinates, should contain columns chr, start, end, name (with these exact names). Not required if selecting from many common regions; bonus regions also exist in grch37.} \item{regions_to_display}{Optional vector of names from default regions_bed to use.} @@ -31,7 +32,9 @@ ashm_multi_rainbow_plot( \item{classification_column}{Optional. Override default column for assigning the labels used for colouring in the figure.} -\item{maf_data}{An already loaded maf, if no provided, this function will call `get_ssm_by_region`, using the regions supplied into `regions_bed`.} +\item{maf_data}{An already loaded maf. If not provided, this function will call `get_ssm_by_region`, using the regions supplied into `regions_bed`. Ensure your maf matches the genome projection.} + +\item{projection}{Provide genome build; default is grch37. Bonus regions are only available in grch37.} \item{verbose}{Set to FALSE to prevent printing the full regions bed file to the console. Default is TRUE.} } From 30e4410413ad4383da6846bbbd537eaf743e67b7 Mon Sep 17 00:00:00 2001 From: Kdreval Date: Thu, 1 Feb 2024 11:00:42 -0800 Subject: [PATCH 2/3] new feature: add readme --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 6fffe32..ebef2b1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,37 @@ # GAMBLR.viz + Collection of functions to make plots for Genomic Analysis of Mature B-cell Lymphomas in R + +# Contributing + +## Cloning repo for the code development + +The easiest way to obtain and contribute to GAMBLR.viz is to do this via cloning the repository + +``` +cd +git clone git@github.com:morinlab/GAMBLR.viz.git +``` + +In your R editor of choice, set your working directory to the place you just cloned the repo. + +``` +setwd("~/GAMBLR.viz") +``` + +Install the package in R by running the following command (requires the devtools package) + +``` +devtools::install() +``` + +As GAMBL users (GAMBLRs, so to speak) rely on the functionality of this package, the Master branch is protected. All commits must be submitted via pull request on a branch. Please refer to the [GAMBL](https://github.com/morinlab/gambl#contribution-guidelines) documentation for details on how to do this. + +## Function conflicts + +This package relies on the use of some functions (e.g. `get_gambl_metadata()`, `get_coding_ssm()` etc) that exist in 2 different versions: [GAMBLR.data](https://github.com/morinlab/GAMBLR.data) for the users who do not have access to GSC and [GAMBLR.results](https://github.com/morinlab/GAMBLR.results) for the Morin Lab users with access to GSC. If your contribution relies on the use of such functions, please follow these 2 steps: + +* *DO NOT* prepend the function use with `::` (for example, `::function()`), and +* *DO NOT* add the corresponding package to the `@import` section of the function + +Following these steps will ensure correct usage of the proper function depending on which package is loaded in the session and will avoid functionality conflicts. From 9bd891d1b0a1eaa2ec3a7a7394f0d61e2f25b1e6 Mon Sep 17 00:00:00 2001 From: Kdreval Date: Thu, 1 Feb 2024 11:05:16 -0800 Subject: [PATCH 3/3] new feature: add PR checklist --- .github/PULL_REQUEST_TEMPLATE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ea1f667 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,10 @@ +# 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 `::function()` syntax. +- [ ] I ensured not to add GAMBLR.data or GAMBLR.results to the `@import` section of the documentation