create populations string correctly
This commit is contained in:
@@ -16,7 +16,7 @@ public class PlateFileWriter {
|
||||
private Double error;
|
||||
private String filename;
|
||||
private String sourceFileName;
|
||||
private Integer[] concentrations;
|
||||
private Integer[] populations;
|
||||
private boolean isExponential = false;
|
||||
|
||||
public PlateFileWriter(String filename, Plate plate) {
|
||||
@@ -35,8 +35,8 @@ public class PlateFileWriter {
|
||||
}
|
||||
this.error = plate.getError();
|
||||
this.wells = plate.getWells();
|
||||
this.concentrations = plate.getPopulations();
|
||||
Arrays.sort(concentrations);
|
||||
this.populations = plate.getPopulations();
|
||||
Arrays.sort(populations);
|
||||
}
|
||||
|
||||
public void writePlateFile(){
|
||||
@@ -73,14 +73,12 @@ public class PlateFileWriter {
|
||||
// rows.add(tmp);
|
||||
// }
|
||||
|
||||
//get list of well populations
|
||||
List<Integer> wellPopulations = Arrays.asList(concentrations);
|
||||
//make string out of populations list
|
||||
//make string out of populations array
|
||||
StringBuilder populationsStringBuilder = new StringBuilder();
|
||||
populationsStringBuilder.append(wellPopulations.remove(0).toString());
|
||||
for(Integer i: wellPopulations){
|
||||
populationsStringBuilder.append(populations[0].toString());
|
||||
for(int i = 1; i < populations.length; i++){
|
||||
populationsStringBuilder.append(", ");
|
||||
populationsStringBuilder.append(i.toString());
|
||||
populationsStringBuilder.append(populations[i].toString());
|
||||
}
|
||||
String wellPopulationsString = populationsStringBuilder.toString();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user