morinlab / GAMBLR.viz

Collection of functions to make plots for Genomic Analysis of Mature B-cell Lymphomas in R
https://morinlab.github.io/GAMBLR.viz/
MIT License
0 stars 0 forks source link

Parameters missing in `GAMBLR.data::calc_mutation_frequency_bin_regions` #23

Open vladimirsouza opened 10 months ago

vladimirsouza commented 10 months ago

heatmap_mutation_frequency_bin internally calls calc_mutation_frequency_bin_regions. However, when using the bundled data, GAMBLR.data::calc_mutation_frequency_bin_regions is missing the parameters from_indexed_flatfile and mode, which are required in heatmap_mutation_frequency_bin.

dlbcl_bl_meta = get_gambl_metadata() %>%
    dplyr::filter(pathology %in% c("DLBCL", "BL"))

some_regions = GAMBLR.data::somatic_hypermutation_locations_GRCh37_v_latest %>% 
  dplyr::filter(!gene %in% c("BTG2", "CXCR4", "ST6GAL1", "BCL6", "LPP", "RHOH", "CD83", 
                             "PIM1", "BACH2", "SGK1", "MYC", "PAX5", "GRHPR", "FANK1", "BIRC3", 
                             "BTG1", "DTX1", "BCL7A", "ZFP36L1", "SERPINA9", "TCL1A", "CIITA", 
                             "IRF8", "S1PR2", "MEF2B", "IGLL5", "TMSB4X", "PIM2")) %>% 
  select(chr_name, hg19_start, hg19_end, gene) %>% 
  rename( "chrom"="chr_name", "start"="hg19_start", "end"="hg19_end", "name"="gene") %>% 
  mutate( chrom = str_remove(chrom, "chr") )

heatmap_mutation_frequency_bin(these_samples_metadata = dlbcl_bl_meta,
                               regions_bed = some_regions,
                               from_indexed_flatfile = TRUE,
                               mode = "slms-3")
# Warning: Multiple regions in the provided data frame have the same name. Merging these entries based on min(start) and max(end) per name value. 
#  Error:  You have given one or more unsupported or deprecated argument to  calc_mutation_frequency_bin_regions . Please check the documentation and spelling of your arguments.
# Offending argument(s): from_indexed_flatfile,mode 

Should we remove both from_indexed_flatfile and mode parameters from heatmap_mutation_frequency_bin and don't specify these parameters in the internal call of calc_mutation_frequency_bin_regions? Then the GAMBLR.results version of calc_mutation_frequency_bin_regions would always use the default values for these parameters.