data-raw/mutations.R

library(tidyverse)
library(vroom)

data <- vroom("../DepMap raw/22Q1/CCLE_mutations.csv") %>%
  select(Hugo_Symbol, DepMap_ID) %>%
  rename(gene = Hugo_Symbol, depmap_id = DepMap_ID) %>%
  distinct(gene, depmap_id)

wide <- data %>%
  pivot_wider(
    names_from = depmap_id,
    values_from = depmap_id,
    values_fn = function(x) {
      !is.na(x)
    },
    values_fill = FALSE
  )

saveRDS(wide, "../cellpanelr data/22Q1/mutations.rds", compress = "gzip")
dwassarman/cellpanelr documentation built on Jan. 3, 2023, 8:27 a.m.