Skip to content

Commit

Permalink
refactor: fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
bczech committed Oct 30, 2024
1 parent 8689767 commit 691eb06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/add_annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ annotate_dt_with_cell_line <- function(
) {
checkmate::assert_data_table(data)
checkmate::assert_data_table(cell_line_annotation)
checkmate::assert_names(names(cell_line_annotation), must.include = c(cellline, unlist(add_clid)))

cellline <- gDRutils::get_env_identifiers("cellline")
add_clid <- gDRutils::get_header("add_clid")

checkmate::assert_names(names(cell_line_annotation), must.include = c(cellline, unlist(add_clid)))

# Remove existing annotations if any
existing_cols <- intersect(unlist(add_clid), names(data))
if (length(existing_cols) > 0) {
Expand Down

0 comments on commit 691eb06

Please sign in to comment.