I'm not sure I understood the examples of the Omixer pacakge. Because when I try to use a layout for multiple batch I was not able to make it work. Now that I made sure there are enough sites to allocate all the samples it tells me that the layout must match exactly with the number of samples to distribute on the plates..
data(survey, package = "MASS") survey$ID <- seq_len(nrow(survey)) VoI <- c("Sex", "Smoke", "Age") n_batch <- 3 iterations <- 1000 library("Omixer") layout <- data.frame(well = 1:96, row = factor(rep(1:8, each=12), labels = LETTERS[1:8]), column = rep(1:12, 8), plate = 1, chip = as.integer(ceiling(rep(1:12, 8)/2))) layout$chipPos <- ifelse(layout$column %% 2 == 0, as.numeric(layout$row) + 8, layout$row) layout2 <- layout layout2$plate <- 2 layout3 <- layout layout3$plate <- 3 plates <- rbind(layout, layout2, layout3) Omixer_index <- omixerRand(survey, sampleId = "ID", block = "block", iterNum = 10, wells = 96, plateNum = n_batch, randVars = VoI, layout = plates, techVars = NULL) #> Error in omixerRand(survey, sampleId = "ID", block = "block", iterNum = 10, : Number of unmasked wells must equal number of samples.
Created on 2021-04-15 by the [reprex package](https://reprex.tidyverse.org) (v2.0.0)
I have a couple of questions related to this:
Is it possible to just use the simple layout (without merging and changing the plate column) and still distribute the samples?
How should work around this?
From the vignette I think that omixerRand will write a file on the working directory. Is there any option to select the name or where the file will be saved?