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; Plate samplePlate;
PlateFileWriter writer; PlateFileWriter writer;
if(exponential){ if(exponential){
samplePlate = new Plate(numWells, dropOutRate, populations); samplePlate = new Plate(cells, cellFile, numWells, populations, dropOutRate, lambda, true);
samplePlate.fillWellsExponential(cellFile, cells.getCells(), lambda);
writer = new PlateFileWriter(filename, samplePlate); writer = new PlateFileWriter(filename, samplePlate);
} }
else { else {
if (poisson) { if (poisson) {
stdDev = Math.sqrt(cells.getCellCount()); //gaussian with square root of elements approximates poisson stdDev = Math.sqrt(cells.getCellCount()); //gaussian with square root of elements approximates poisson
} }
samplePlate = new Plate(numWells, dropOutRate, populations); samplePlate = new Plate(cells, cellFile, numWells, populations, dropOutRate, stdDev, false);
samplePlate.fillWells(cellFile, cells.getCells(), stdDev);
writer = new PlateFileWriter(filename, samplePlate); writer = new PlateFileWriter(filename, samplePlate);
} }
System.out.println("Writing Sample Plate to file"); System.out.println("Writing Sample Plate to file");