-
Notifications
You must be signed in to change notification settings - Fork 1
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
Blocked design first #47
Comments
The solution might be simple: create a new index with the blocked variables and then randomizes what is left... Should be mentioned in the vignette |
Here is the code that I ended up using. Some of it could be used to adapt it and incorporate it into the package... # Randomization ####
# Randomize the first samples that are not ALI
posi <- seq_len(NROW(samples_plates[-c(1:41), ]))
samp_plate1 <- sample(posi, 47)
i <- list(plate_1 = samp_plate1,
plate_2 = setdiff(posi, samp_plate1)) # ALI second plate
# New plate Olink
columns <- 12
rows <- 8
# Last column cannot be used (it is used for O-link controls)
last_column <- paste0(LETTERS[1:8], 12)
set.seed(4927)
pn <- experDesign:::position_name(rows = LETTERS[seq_len(rows)],
columns = seq_len(columns))
i1 <- lapply(i, function(x){x + 41})
i1[["plate_1"]] <- c(i1[["plate_1"]], 1:41)
stopifnot(all(lengths(i1) == 88L))
s <- spatial(index = i1,
pheno = samples_plates[, c("Participant_id", "infection")],
rows = LETTERS[seq_len(rows)], columns = seq_len(columns),
remove_positions = last_column,
)
insp1 <- inspect(i1, samples_plates, index_name = "plate_olink")
insp2 <- inspect(s, insp1, index_name = "new_position") |
I think this is really skipping some of them positions for the first plate distribution. The design function might become too complex if it also has a block argument. |
If possible to make the distribution blocked by variable.
If there is a dataset with 6 samples of group A and 6 samples of group B and the batch size is of 6. Check that 3 and 3 are distributed (if no other variable is needed).
This makes it easier for the technicians to prepare the experiments.
Check if this exists in other tools too!
The text was updated successfully, but these errors were encountered: