Skip to content

Commit

Permalink
Merge branch 'main' into handle_lm_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy authored Sep 23, 2024
2 parents 9124e32 + 588b580 commit 357bd61
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ Imports:
janitor,
broom,
utils,
stats,
stringr
stats,
stringr,
fastmap (>= 1.2.0)
Suggests:
testthat (>= 3.0.0),
roxygen2,
Expand Down
1 change: 1 addition & 0 deletions R/00-setup_data.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#' Making a new gimap dataset
#' @description This function allows people to have their data ready to be processed by gimap
#' @param counts a matrix of data that contains the counts where rows are each paired_guide target and columns are each sample
Expand Down
19 changes: 19 additions & 0 deletions R/03-annotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ gimap_annotate <- function(.data = NULL,
dplyr::filter(stripped_cell_line_name == toupper(cell_line)) %>%
dplyr::pull(DepMap_ID)

if (length(my_depmap_id) == 0) stop("The cell line specified, ", cell_line, "was not found in the DepMap data. Run supported_cell_lines() to see the full list")

tpm_file <- file.path(system.file("extdata", package = "gimap"), "CCLE_expression.csv")

if (!file.exists(tpm_file)) tpm_setup()
Expand Down Expand Up @@ -245,3 +247,20 @@ crtl_genes <- function() {

return(crtl_genes$gene_symbol)
}


#' List the supported cell lines
#' @description This function downloads the metadata for DepMap and lists which cell lines are supported.
#' @export
#' @examples \dontrun{
#'
#' cell_lines <- supported_cell_lines()
#'
#' }
supported_cell_lines <- function() {

depmap_metadata <- readr::read_csv("https://figshare.com/ndownloader/files/35020903", show_col_types = FALSE)

return(sort(depmap_metadata$stripped_cell_line_name))

}

0 comments on commit 357bd61

Please sign in to comment.