Cleanup file output, add UI verbosity

This commit is contained in:
2022-02-20 18:31:31 -06:00
parent 405fbf17ff
commit 2023bb9d7e
5 changed files with 63 additions and 39 deletions

View File

@@ -73,6 +73,7 @@ public class PlateFileWriter {
}
rows.add(tmp);
}
//build string of well concentrations
StringBuilder concen = new StringBuilder();
for(Integer i: concentrations){
concen.append(i.toString());
@@ -80,7 +81,9 @@ public class PlateFileWriter {
}
String concenString = concen.toString();
CSVFormat plateFileFormat = CSVFormat.Builder.create().setCommentMarker('#').build();
CSVFormat plateFileFormat = CSVFormat.Builder.create()
.setCommentMarker('#')
.build();
try(BufferedWriter writer = Files.newBufferedWriter(Path.of(filename), StandardOpenOption.CREATE_NEW);
CSVPrinter printer = new CSVPrinter(writer, plateFileFormat);
@@ -96,7 +99,7 @@ public class PlateFileWriter {
else {
printer.printComment("Std. dev.: " + stdDev);
}
printer.printRecords(wellsAsStrings);
printer.printRecords(rows);
} catch(IOException ex){
System.out.println("Could not make new file named "+filename);
System.err.println(ex);