morinlab / GAMBLR

Set of standardized functions to operate with genomic data
https://morinlab.github.io/GAMBLR/
MIT License
3 stars 2 forks source link

Website Improvements and Other Quality of Life Improvements #196

Closed mattssca closed 1 year ago

mattssca commented 1 year ago

This PR Includes

This small PR addresses various improvements to the website.

Firstly, *.png has been omitted from the .gitignore and all example-related figures have been added to the repo (the function reference page is now complete with figures).

The README has been updated to more accurately describe how to run GAMBLR on your local computer.

Hot-fix for setup_expression_data and doc updates to get_sample_cn_segments.

In addition, the vignettes have been updated (and re-knitted). For example, the %VignetteIndexEntry has been updated to reflect the name of the vignette (build_site previously threw a warning because of discrepancies between the two names).

Lastly, GAMBLR docs have been updated and the site has been rebuilt with respect to the changes included in this PR.

Pull Request Checklists

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

Checklist for all PRs

Required

This can be checked and addressed by running check_functions.pl and responding to the prompts. Test your code after you do this.

Optional but preferred with PRs

Example:

#' @title ASHM Rainbow Plot
#'
#' @description Make a rainbow plot of all mutations in a region, ordered and coloured by metadata.
#'
#' @details This function creates a rainbow plot for all mutations in a region. Region can either be specified with the `region` parameter,
#' or the user can provide a maf that has already been subset to the region(s) of interest with `mutation_maf`.
#' As a third alternative, the regions can also be specified as a bed file with `bed`.
#' Lastly, this function has a variety of parameters that can be used to further customize the returned plot in many different ways.
#' Refer to the parameter descriptions, examples as well as the vignettes for more demonstrations how this function can be called.
#'
#' @param mutations_maf A data frame containing mutations (MAF format) within a region of interest (i.e. use the get_ssm_by_region).
#' @param metadata should be a data frame with sample_id as a column.
#' @param exclude_classifications Optional argument for excluding specific classifications from a metadeta file.
#' @param drop_unmutated Boolean argument for removing unmutated sample ids in mutated cases.
#' @param classification_column The name of the metadata column to use for ordering and colouring samples.
#' @param bed Optional data frame specifying the regions to annotate (required columns: start, end, name).
#' @param region Genomic region for plotting in bed format.
#' @param custom_colours Provide named vector (or named list of vectors) containing custom annotation colours if you do not want to use standartized pallette.
#' @param hide_ids Boolean argument, if TRUE, ids will be removed.
#'
#' @return ggplot2 object.
#'
#' @import dplyr ggplot2
#' @export
#'
#' @examples
#' #basic usage
#' region = "chr6:90975034-91066134"
#' metadata = get_gambl_metadata()
#' plot = ashm_rainbow_plot(metadata = metadata, region = region)
#'
#' #advanced usages
#' mybed = data.frame(start = c(128806578,
#'                              128805652,
#'                              128748315),
#'                    end = c(128806992,
#'                            128809822,
#'                            128748880),
#'                    name = c("TSS",
#'                             "enhancer",
#'                             "MYC-e1"))
#'
#' ashm_rainbow_plot(mutations_maf = my_mutations,
#'                   metadata = my_metadata,
#'                   bed = mybed)
#'
mattssca commented 1 year ago

Given that this PR should pass the build check, it's ready for review.

mattssca commented 1 year ago

This PR has been updated to include a fix for issue https://github.com/morinlab/GAMBLR/issues/205

mattssca commented 1 year ago

In addition, the description for the collate_results example in the utility vignette has been updated and the website rebuilt with respect to this update. See issue https://github.com/morinlab/GAMBLR/issues/204https://github.com/morinlab/GAMBLR/issues/204 for more info.