Command line arguments working, need better documentation and error handling
This commit is contained in:
@@ -13,11 +13,13 @@ public class PlateFileWriter {
|
||||
private int size;
|
||||
private List<List<Integer[]>> wells;
|
||||
private double stdDev;
|
||||
private double lambda;
|
||||
private Double error;
|
||||
private String filename;
|
||||
private String sourceFileName;
|
||||
private String[] headers;
|
||||
private List<Integer> concentrations;
|
||||
private boolean isExponential = false;
|
||||
|
||||
public PlateFileWriter(String filename, Plate plate) {
|
||||
if(!filename.matches(".*\\.csv")){
|
||||
@@ -26,7 +28,13 @@ public class PlateFileWriter {
|
||||
this.filename = filename;
|
||||
this.sourceFileName = plate.getSourceFileName();
|
||||
this.size = plate.getSize();
|
||||
this.stdDev = plate.getStdDev();
|
||||
this.isExponential = plate.isExponential();
|
||||
if(isExponential) {
|
||||
this.lambda = plate.getLambda();
|
||||
}
|
||||
else{
|
||||
this.stdDev = plate.getStdDev();
|
||||
}
|
||||
this.error = plate.getError();
|
||||
this.wells = plate.getWells();
|
||||
this.concentrations = Arrays.asList(plate.getConcentrations());
|
||||
@@ -82,7 +90,12 @@ public class PlateFileWriter {
|
||||
printer.printComment("Plate size: " + size);
|
||||
printer.printComment("Error rate: " + error);
|
||||
printer.printComment("Concentrations: " + concenString);
|
||||
printer.printComment("Std. dev.: " + stdDev);
|
||||
if(isExponential){
|
||||
printer.printComment("Lambda: " + lambda);
|
||||
}
|
||||
else {
|
||||
printer.printComment("Std. dev.: " + stdDev);
|
||||
}
|
||||
printer.printRecords(wellsAsStrings);
|
||||
} catch(IOException ex){
|
||||
System.out.println("Could not make new file named "+filename);
|
||||
|
||||
Reference in New Issue
Block a user