Add dropout rate calculation to read-in of data from plate file (this may slow down read-in by a lot)
This commit is contained in:
@@ -61,12 +61,25 @@ public class Plate {
|
||||
this.wells = wells;
|
||||
this.size = wells.size();
|
||||
|
||||
double totalCellCount = 0.0;
|
||||
double totalDropoutCount = 0.0;
|
||||
List<Integer> concentrations = new ArrayList<>();
|
||||
for (List<String[]> 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);
|
||||
|
||||
Reference in New Issue
Block a user