Recording source file names in output files, allowing output of intermediate results
This commit is contained in:
@@ -15,6 +15,7 @@ public class PlateFileWriter {
|
||||
private double stdDev;
|
||||
private Double error;
|
||||
private String filename;
|
||||
private String sourceFileName;
|
||||
private String[] headers;
|
||||
private List<Integer> concentrations;
|
||||
|
||||
@@ -23,6 +24,7 @@ public class PlateFileWriter {
|
||||
filename = filename + ".csv";
|
||||
}
|
||||
this.filename = filename;
|
||||
this.sourceFileName = plate.getSourceFileName();
|
||||
this.size = plate.getSize();
|
||||
this.stdDev = plate.getStdDev();
|
||||
this.error = plate.getError();
|
||||
@@ -32,10 +34,6 @@ public class PlateFileWriter {
|
||||
}
|
||||
|
||||
public void writePlateFile(){
|
||||
//works as is, but too many columns in csv, need to make them all rows.
|
||||
|
||||
//will now redo it so that every column is a well, with well names as headers
|
||||
//need to give plate error, sample pop size, stdDev, num sections, concentration per section as comments
|
||||
Comparator<List<Integer[]>> listLengthDescending = Comparator.comparingInt(List::size);
|
||||
wells.sort(listLengthDescending.reversed());
|
||||
int maxLength = wells.get(0).size();
|
||||
@@ -79,6 +77,7 @@ public class PlateFileWriter {
|
||||
try(BufferedWriter writer = Files.newBufferedWriter(Path.of(filename), StandardOpenOption.CREATE_NEW);
|
||||
CSVPrinter printer = new CSVPrinter(writer, plateFileFormat);
|
||||
){
|
||||
printer.printComment("Cell source file name: " + sourceFileName);
|
||||
printer.printComment("Each row represents one well on the plate.");
|
||||
printer.printComment("Plate size: " + size);
|
||||
printer.printComment("Error rate: " + error);
|
||||
|
||||
Reference in New Issue
Block a user