Deciding which samples go in which batch I have 370 samples to sequence, we probably will end up using only 96 samples per run (due to the barcode with the primers we'll use). This means running 4 batches. To minimize the batch effect I need to decide which samples are sequenced in which run. 

I have several variables from these samples, some of them are categoric (sex, disease status, treatment stage, ...) and some of them are numeric (age, clinical score...).

To minimize the batch effect I wouldn't group all samples from the same category in one run, and I would distribute as uniformly as possible the samples according to the numeric variables. However, I could find many papers about adjusting, taking into account, but I couldn't find a paper about software to help designing the runs.

Is there any software to help designing each batch?

If there are several I would like to point out that I would define best as the one with easier user interface
I found the OSAT package which does almost what I want. 


However it is specific for Illumina and for a limited number of plates: "plates that hold 2, 4, 8 IlluminaBeadChip chips and have 24, 48, 96 wells, respectively."
It doesn't take in consideration the numeric values:

library(OSAT)
inPath &lt;- system.file('extdata', package='OSAT')
pheno &lt;- read.table(file.path(inPath, 'samples.txt'), 
                    header=TRUE, sep="\t", colClasses="factor")
pheno$AgeGrp &lt;- runif(576, 0, 100)
gs &lt;- setup.sample(pheno, optimal=c("SampleType", "Race", "AgeGrp"))
gc &lt;- setup.container(IlluminaBeadChip96Plate, 6, batch='plates')
gSetup &lt;- create.optimized.setup(sample=gs, container=gc, nSim=1000)





The minDiff package reported in Stats.SE.


It handles both numeric and categorical data, but it can only optimize for two nominal criteria.


I wrote experDesign which does everything I wanted


It can handle both numeric and categorical data for an arbitrary number of variables. It is not restricted to an even number of samples per batch.