Skip to content

Commit

Permalink
Check for wellID and generalization of plate layout (#21)
Browse files Browse the repository at this point in the history
Co-authored-by: DriesSchaumont <[email protected]>
  • Loading branch information
mvanmoerbeke and DriesSchaumont authored Dec 17, 2024
1 parent 82647a4 commit da93558
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# New functionality

* Make sure that the Well ID matches the required format (PR #22).
* Make sure that the Well ID matches the required format (PR #22 and PR #21).

# demultiplex v0.1.0

Expand Down
8 changes: 7 additions & 1 deletion src/report/plateLayouts.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ plateLayout.annotation <- function(
if (!(all(c("WellID", "SampleName") %in% colnames(plateData)))) {
stop(" 'WellID' and 'SampleName' column required in plateData object")
}

#Check WellID Format
checkWellID <- grepl("^[[:upper:]]{1,2}[[:digit:]]{1,2}$", plateData$WellID)
if(!all(checkWellID)){
stop("WellID does not have the correct format")
}


plateData[, WellID := paste0(
Expand All @@ -49,7 +55,7 @@ plateLayout.annotation <- function(
)
)]

plateData <- platetools::fill_plate(plateData, "WellID", plate = 384)
plateData <- platetools::fill_plate(plateData, "WellID", plate = layout[1]*layout[2])

plateData$column <- factor(
sprintf(
Expand Down

0 comments on commit da93558

Please sign in to comment.