Skip to content

Commit

Permalink
code cleanup: linter suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLBaker committed Dec 18, 2023
1 parent ef4035e commit 9ad20ad
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 62 deletions.
11 changes: 5 additions & 6 deletions R/summarize_qc_flags.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ get_dp_flags <- function(directory = here::here()) {
A <- suppressWarnings(sum(stringr::str_count(flags_only, "\\bA"),
na.rm = TRUE))
AE <- suppressWarnings(sum(stringr::str_count(flags_only, "\\bAE"),
na.rm = TRUE))
na.rm = TRUE))
R <- suppressWarnings(sum(stringr::str_count(flags_only, "\\bR"),
na.rm = TRUE))
na.rm = TRUE))
P <- suppressWarnings(sum(stringr::str_count(flags_only, "\\bP"),
na.rm = TRUE))
na.rm = TRUE))
# Increment flag counts:
A_flag <- sum(A_flag + A)
AE_flag <- sum(AE_flag + AE)
Expand Down Expand Up @@ -196,8 +196,7 @@ get_df_flags <- function(directory = here::here()) {
A_count <- (Cell_count - R_flag - P_flag)

# Calculate RRU as accepted data/all data
flags$RRU <- ((A_count) /
flags$Cell_count)
flags$RRU <- ((A_count) / flags$Cell_count)

# add to df_flags dataframe:
df_flags <- rbind(df_flags, flags)
Expand Down Expand Up @@ -579,4 +578,4 @@ get_custom_flags <- function(directory = here::here(),
if (output == "all") {
return(qc_summary)
}
}
}
Loading

0 comments on commit 9ad20ad

Please sign in to comment.