Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jpquast committed Feb 19, 2024
1 parent b59c496 commit ef13367
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions R/qc_sequence_coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ qc_sequence_coverage <- function(data,
interactive = FALSE) {

# Validate inputs
if (!all(c({{ protein_identifier }},{{ coverage }}) %in% colnames(data))) {
if (!all(c(rlang::as_name(rlang::enquo(protein_identifier)), rlang::as_name(rlang::enquo(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 All @@ -77,7 +77,7 @@ qc_sequence_coverage <- function(data,
size = 1
) +
ggplot2::geom_vline(data = result %>% dplyr::distinct(.data$median_coverage, {{ sample }}),
mapping = aes(xintercept = median_coverage),
mapping = aes(xintercept = .data$median_coverage),
linewidth = 1,
linetype = "dashed") +
ggplot2::labs(
Expand Down
3 changes: 2 additions & 1 deletion man/normalise.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/qc_sequence_coverage.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef13367

Please sign in to comment.