Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set all b and n wells to 0 conc and after check for any remaining null #181

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions R/tcplWriteLvl0.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ tcplWriteLvl0 <- function(dat, type) {
if (dat[, any(is.na(acid))]) {
stop("No ACID supplied for some samples. Ensure all samples have an ACID then rerun.")
}

#set all na b or n wells to conc = 0
dat[is.na(conc) & (wllt %in% c('b', 'n')), conc:=0]

## Check for 0 concentration values
if (dat[,any(conc == 0)]) {
stop("Cannot process a concentration value of 0. Confirm source document lists 0 as concentration value and rerun with dummy value of .01")
## Check for null concentration values
if (dat[,any(is.na(conc))]) {
stop("Cannot process a NULL concentration value. Update missing concentration value then rerun.")
}

## Check wllt has been set for all samples
Expand Down