diff --git a/src/main/java/Plate.java b/src/main/java/Plate.java index c790be8..64860c0 100644 --- a/src/main/java/Plate.java +++ b/src/main/java/Plate.java @@ -61,12 +61,25 @@ public class Plate { this.wells = wells; this.size = wells.size(); + double totalCellCount = 0.0; + double totalDropoutCount = 0.0; List concentrations = new ArrayList<>(); for (List w: wells) { + totalCellCount += w.size(); if(!concentrations.contains(w.size())){ concentrations.add(w.size()); } + for (String[] cell: w) { + totalCellCount += 1.0; + for (String sequence: cell) { + if("-1".equals(sequence)) { + totalDropoutCount += 1.0; + } + } + } } + double totalSequenceCount = totalCellCount * 4; + this.error = totalDropoutCount / totalSequenceCount; this.populations = new Integer[concentrations.size()]; for (int i = 0; i < this.populations.length; i++) { this.populations[i] = concentrations.get(i);