morinlab / GAMBLR

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

Fancy Plots + QoL Updates #115

Closed mattssca closed 2 years ago

mattssca commented 2 years ago

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

Checklist for New Functions

Required

Example:

#' Use GISTIC2.0 scores output to reproduce maftools::chromoplot with more flexibility
#'
#' @param scores output file scores.gistic from the run of GISTIC2.0
#' @param genes_to_label optional. Provide a data frame of genes to label (if mutated). The first 3 columns must contain chromosome, start, and end coordinates. Another required column must contain gene names and be named `gene`. (truncated for example)
#' @param cutoff optional. Used to determine which regions to color as aberrant. Must be float in the range [0-1]. (truncated for example)

Example:

#' @return nothing
#' @export
#' @import tidyverse ggrepel

Checklist for changes to existing code

mattssca commented 2 years ago

This PR includes updates to a collection of fancy plots. The following revisions have been made.

  1. fancy_cnbar - Remove lines connecting the dots.

  2. fancy_ideogram - New parameter that allows the user to subset calls to regions specified in a bed-like format. For more info and how to use it, see the newly added parameters and descriptions.

  3. fancy_multisamp_ideogram - Add functionalities to highlight what's different (or shared) between samples. Adding a new parameter that calls cnvKompare if called correctly.

  4. fancy_circosplot - Circos plot now takes additional variant call sets. Previously it only plotted manta calls, but can now be run so that ssm calls are plotted (similarly to other fancy plotting functions).

  5. fancy_alignment_plot - Remove lines connecting the dots.

  6. fancy_qc_plot - Barplot has now been replaced with boxplot + jitter for visualizing QC metrics across different sample cohorts, pathologies, etc.

This PR also includes a few minor QoL updates. Including an update to cnvKompare to always retain the same columns in the returns (regardless if concordant or discordant calls are returned) as well as a hot-fix to collate_results (see issue 112).

Before review of this PR, I want to include one more commit I am working on as well as some more thorough testing of the updated plotting functions. I will call for reviewers when the PR is ready to be reviewed