morinlab / GAMBLR

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

updating ssm functions to read from latest deblacklsited maf #71

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

The follwoing functions have been updated to load data from the latest (and greatest) deblacklsited mafs and to filter out varaints with low read support:

get_ssm_by_sample get_coding_ssm get_ssm_by_region get_ssm_by_gene (function removed and added "these_genes" parameter to get_ssm_by_sample and get_ssm_by_samples to allow for gene-subsetting). get_coding_ssm_status assign_cn_to_ssm (using updated get_ssm_by_samples)

The updated functions have been tested and also testing other functions that call these functions. See lsited functions bellow for such cases.

get_ssm_by_regions calc_mutation_frequency_sliding_windows get_ashm_count_matrix ashm_multi_rainbow_plot - broken due to get gamblr meta ashm_rainbow_plot annotate_driver_ssm estimate_purity fancy_sv_chrdistplot fancy_snp_chrdistplot fancy_svbar fancy_cnlohbar fancy_vplot

Package documentation has also been regenerated

mattssca commented 2 years ago

Thanks for your comments Ryan, here are the two items that needs to be addressed, potentially in another PR?

  1. Have get_coding_ssm_status call get_coding_ssm directly to reduce duplicated code.
  2. annotate_driver_ssm still calls get_ssm_by_gene. This needs to be updated.