MSKCC-Epi-Bio / gnomeR

Package to wrangle and visualize genomic data in R
https://mskcc-epi-bio.github.io/gnomeR/
Other
26 stars 19 forks source link

Check other functions that may be affected by sample ID column #201

Closed karissawhiting closed 1 year ago

karissawhiting commented 2 years ago

Related to changes in #177

karissawhiting commented 2 years ago
michaelcurry1123 commented 1 year ago

@karissawhiting add_pathways identifies columns for .mut with regular expressions using stringr this might mess up the function because it identified sample_id as a mut_col, should be an easy fix by adding in sample_id to the str_detect()

all_cols <- colnames(gene_binary)
  mut_cols <- !(str_detect(all_cols, ".Amp|.Del|.fus|.cna"))

      custom_pathways <- purrr::map(custom_pathways, function(x) {
        x[!str_detect(x, ".Amp|.Del|.fus|.cna")] <-
          paste0(stringr::str_trim(
            x[!str_detect(x, ".Amp|.Del|.fus|.cna")]), ".mut")

        unique(x)

        } )
michaelcurry1123 commented 1 year ago

@karissawhiting @hfuchs5 I am going to make another pr/branch for this after we merge in the changes from internal_gen_bin_tidy bc those are the changes that will affect this