Correct propogation of peptide counts

This commit is contained in:
2022-02-19 22:33:38 -06:00
parent 5b2ed165d0
commit c4633da9eb
4 changed files with 22 additions and 22 deletions

View File

@@ -11,11 +11,11 @@ public class GraphWithMapData implements java.io.Serializable {
private String sourceFilename;
private final SimpleWeightedGraph graph;
private Integer numWells;
private Integer alphaCount;
private Integer betaCount;
private Integer lowThreshold;
private Integer highThreshold;
private final Map<Integer, Integer> distCellsMapAlphaKey;
private final Map<Integer, Integer> allAlphas;
private final Map<Integer, Integer> allBetas;
private final Map<Integer, Integer> plateVtoAMap;
private final Map<Integer, Integer> plateVtoBMap;
private final Map<Integer, Integer> plateAtoVMap;
@@ -24,19 +24,19 @@ public class GraphWithMapData implements java.io.Serializable {
private final Map<Integer, Integer> betaWellCounts;
private final Duration time;
public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer lowThreshold, Integer highThreshold,
Map<Integer, Integer> distCellsMapAlphaKey, Map<Integer, Integer> allAlphas,
Map<Integer, Integer> allBetas, Map<Integer, Integer> plateVtoAMap,
public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer alphaCount, Integer betaCount,
Integer lowThreshold, Integer highThreshold,
Map<Integer, Integer> distCellsMapAlphaKey, Map<Integer, Integer> plateVtoAMap,
Map<Integer,Integer> plateVtoBMap, Map<Integer, Integer> plateAtoVMap,
Map<Integer, Integer> plateBtoVMap, Map<Integer, Integer> alphaWellCounts,
Map<Integer, Integer> betaWellCounts, Duration time) {
this.graph = graph;
this.numWells = numWells;
this.alphaCount = alphaCount;
this.betaCount = betaCount;
this.lowThreshold = lowThreshold;
this.highThreshold = highThreshold;
this.distCellsMapAlphaKey = distCellsMapAlphaKey;
this.allAlphas = allAlphas;
this.allBetas = allBetas;
this.plateVtoAMap = plateVtoAMap;
this.plateVtoBMap = plateVtoBMap;
this.plateAtoVMap = plateAtoVMap;
@@ -54,6 +54,14 @@ public class GraphWithMapData implements java.io.Serializable {
return numWells;
}
public Integer getAlphaCount() {
return alphaCount;
}
public Integer getBetaCount() {
return betaCount;
}
public Integer getLowThreshold() {
return lowThreshold;
}
@@ -66,14 +74,6 @@ public class GraphWithMapData implements java.io.Serializable {
return distCellsMapAlphaKey;
}
public Map<Integer, Integer> getAllAlphas() {
return allAlphas;
}
public Map<Integer, Integer> getAllBetas() {
return allBetas;
}
public Map<Integer, Integer> getPlateVtoAMap() {
return plateVtoAMap;
}

View File

@@ -142,9 +142,9 @@ public class Simulator {
if(verbose){System.out.println("Over- and under-weight edges set to 0.0");}
Instant stop = Instant.now();
Duration time = Duration.between(start, stop);
return new GraphWithMapData(graph, numWells, lowThreshold, highThreshold, distCellsMapAlphaKey, allAlphas,
allBetas, plateVtoAMap, plateVtoBMap, plateAtoVMap, plateBtoVMap, alphaWellCounts, betaWellCounts,
time);
return new GraphWithMapData(graph, numWells, alphaCount, betaCount, lowThreshold, highThreshold,
distCellsMapAlphaKey, plateVtoAMap, plateVtoBMap, plateAtoVMap,
plateBtoVMap, alphaWellCounts, betaWellCounts, time);
}
//match CDR3s
@@ -154,15 +154,13 @@ public class Simulator {
int numWells = data.getNumWells();
Integer highThreshold = data.getHighThreshold();
Integer lowThreshold = data.getLowThreshold();
Integer alphaCount = data.getAlphaCount();
Integer betaCount = data.getBetaCount();
Map<Integer, Integer> distCellsMapAlphaKey = data.getDistCellsMapAlphaKey();
Map<Integer, Integer> plateVtoAMap = data.getPlateVtoAMap();
Map<Integer, Integer> plateVtoBMap = data.getPlateVtoBMap();
Map<Integer, Integer> allAlphas = data.getAllAlphas();
Map<Integer, Integer> allBetas = data.getAllBetas();
Map<Integer, Integer> alphaWellCounts = data.getAlphaWellCounts();
Map<Integer, Integer> betaWellCounts = data.getBetaWellCounts();
Integer alphaCount = allAlphas.size();
Integer betaCount = allBetas.size();
SimpleWeightedGraph<Integer, DefaultWeightedEdge> graph = data.getGraph();

View File

@@ -533,6 +533,8 @@ public class UserInterface {
}
//read object data from file
GraphDataObjectReader dataReader = new GraphDataObjectReader(dataFile);
System.out.println("Reading data from file. This may take some time");
System.out.println("Time to read file is not included in simulation time data");
GraphWithMapData data = dataReader.getData();
//set source file name
data.setSourceFilename(dataFile);