Skip to content

Commit

Permalink
check input
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-krismer authored Feb 19, 2024
1 parent 6416e65 commit 516d710
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/qc_sequence_coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ qc_sequence_coverage <- function(data,
coverage,
sample = NULL,
interactive = FALSE) {

# Validate inputs
if (!all(c(protein_identifier, coverage) %in% colnames(data))) {
stop("Column names for protein_identifier and coverage must exist in the dataset.")
}

result <- data %>%
dplyr::distinct({{ protein_identifier }}, {{ coverage }}, {{ sample }}) %>%
tidyr::drop_na({{ coverage }}) %>%
Expand Down

0 comments on commit 516d710

Please sign in to comment.