Refactor plate to fill its own wells in its constructor

This commit is contained in:
2022-02-27 14:17:16 -06:00
parent 974d2d650c
commit b53f5f1cc0

View File

@@ -227,16 +227,14 @@ public class InteractiveInterface {
Plate samplePlate;
PlateFileWriter writer;
if(exponential){
samplePlate = new Plate(numWells, dropOutRate, populations);
samplePlate.fillWellsExponential(cellFile, cells.getCells(), lambda);
samplePlate = new Plate(cells, cellFile, numWells, populations, dropOutRate, lambda, true);
writer = new PlateFileWriter(filename, samplePlate);
}
else {
if (poisson) {
stdDev = Math.sqrt(cells.getCellCount()); //gaussian with square root of elements approximates poisson
}
samplePlate = new Plate(numWells, dropOutRate, populations);
samplePlate.fillWells(cellFile, cells.getCells(), stdDev);
samplePlate = new Plate(cells, cellFile, numWells, populations, dropOutRate, stdDev, false);
writer = new PlateFileWriter(filename, samplePlate);
}
System.out.println("Writing Sample Plate to file");