145 lines
4.8 KiB
Java
145 lines
4.8 KiB
Java
import org.jgrapht.graph.SimpleWeightedGraph;
|
|
|
|
import java.time.Duration;
|
|
import java.util.Map;
|
|
|
|
//Can't just write the graph, because I need the occupancy data too.
|
|
//Makes most sense to serialize object and write that to a file.
|
|
//Which means there's no reason to split map data and graph data up.
|
|
//Custom vertex class means a lot of the map data can now be encoded in the graph itself
|
|
public class GraphWithMapData implements java.io.Serializable {
|
|
|
|
private String cellFilename;
|
|
private int cellSampleSize;
|
|
private String plateFilename;
|
|
private final SimpleWeightedGraph graph;
|
|
private final int numWells;
|
|
private final Integer[] wellPopulations;
|
|
private final int alphaCount;
|
|
private final int betaCount;
|
|
private final double dropoutRate;
|
|
private final int readDepth;
|
|
private final double readErrorRate;
|
|
private final double errorCollisionRate;
|
|
private final double realSequenceCollisionRate;
|
|
private final Map<String, String> distCellsMapAlphaKey;
|
|
// private final Map<Integer, Integer> plateVtoAMap;
|
|
// private final Map<Integer, Integer> plateVtoBMap;
|
|
// private final Map<Integer, Integer> plateAtoVMap;
|
|
// private final Map<Integer, Integer> plateBtoVMap;
|
|
// private final Map<Integer, Integer> alphaWellCounts;
|
|
// private final Map<Integer, Integer> betaWellCounts;
|
|
private final Duration time;
|
|
|
|
public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer[] wellConcentrations,
|
|
Map<String, String> distCellsMapAlphaKey, Integer alphaCount, Integer betaCount,
|
|
Double dropoutRate, Integer readDepth, Double readErrorRate, Double errorCollisionRate,
|
|
Double realSequenceCollisionRate, Duration time){
|
|
|
|
// Map<Integer, Integer> plateVtoAMap,
|
|
// Map<Integer,Integer> plateVtoBMap, Map<Integer, Integer> plateAtoVMap,
|
|
// Map<Integer, Integer> plateBtoVMap, Map<Integer, Integer> alphaWellCounts,
|
|
// Map<Integer, Integer> betaWellCounts,) {
|
|
this.graph = graph;
|
|
this.numWells = numWells;
|
|
this.wellPopulations = wellConcentrations;
|
|
this.alphaCount = alphaCount;
|
|
this.betaCount = betaCount;
|
|
this.distCellsMapAlphaKey = distCellsMapAlphaKey;
|
|
// this.plateVtoAMap = plateVtoAMap;
|
|
// this.plateVtoBMap = plateVtoBMap;
|
|
// this.plateAtoVMap = plateAtoVMap;
|
|
// this.plateBtoVMap = plateBtoVMap;
|
|
// this.alphaWellCounts = alphaWellCounts;
|
|
// this.betaWellCounts = betaWellCounts;
|
|
this.dropoutRate = dropoutRate;
|
|
this.readDepth = readDepth;
|
|
this.readErrorRate = readErrorRate;
|
|
this.errorCollisionRate = errorCollisionRate;
|
|
this.realSequenceCollisionRate = realSequenceCollisionRate;
|
|
this.time = time;
|
|
}
|
|
|
|
public SimpleWeightedGraph getGraph() {
|
|
return graph;
|
|
}
|
|
|
|
public Integer getNumWells() {
|
|
return numWells;
|
|
}
|
|
|
|
public Integer[] getWellPopulations() {
|
|
return wellPopulations;
|
|
}
|
|
|
|
public Integer getAlphaCount() {
|
|
return alphaCount;
|
|
}
|
|
|
|
public Integer getBetaCount() {
|
|
return betaCount;
|
|
}
|
|
|
|
public Map<String, String> getDistCellsMapAlphaKey() {
|
|
return distCellsMapAlphaKey;
|
|
}
|
|
|
|
// public Map<Integer, Integer> getPlateVtoAMap() {
|
|
// return plateVtoAMap;
|
|
// }
|
|
//
|
|
// public Map<Integer, Integer> getPlateVtoBMap() {
|
|
// return plateVtoBMap;
|
|
// }
|
|
//
|
|
// public Map<Integer, Integer> getPlateAtoVMap() {
|
|
// return plateAtoVMap;
|
|
// }
|
|
//
|
|
// public Map<Integer, Integer> getPlateBtoVMap() {
|
|
// return plateBtoVMap;
|
|
// }
|
|
//
|
|
// public Map<Integer, Integer> getAlphaWellCounts() {
|
|
// return alphaWellCounts;
|
|
// }
|
|
//
|
|
// public Map<Integer, Integer> getBetaWellCounts() {
|
|
// return betaWellCounts;
|
|
// }
|
|
|
|
public Integer getReadDepth() { return readDepth; }
|
|
|
|
public Duration getTime() {
|
|
return time;
|
|
}
|
|
|
|
public void setCellFilename(String filename) { this.cellFilename = filename; }
|
|
|
|
public String getCellFilename() { return this.cellFilename; }
|
|
|
|
public Integer getCellSampleSize() { return this.cellSampleSize; }
|
|
|
|
public void setCellSampleSize(int size) { this.cellSampleSize = size;}
|
|
|
|
public void setPlateFilename(String filename) {
|
|
this.plateFilename = filename;
|
|
}
|
|
|
|
public String getPlateFilename() {
|
|
return plateFilename;
|
|
}
|
|
|
|
public Double getReadErrorRate() {
|
|
return readErrorRate;
|
|
}
|
|
|
|
public Double getErrorCollisionRate() {
|
|
return errorCollisionRate;
|
|
}
|
|
|
|
public Double getRealSequenceCollisionRate() { return realSequenceCollisionRate; }
|
|
|
|
public Double getDropoutRate() { return dropoutRate; }
|
|
}
|