diff --git a/out/artifacts/TCellSim_jar/TCellSim.jar b/out/artifacts/TCellSim_jar/TCellSim.jar index 705ce0a..f9716d7 100644 Binary files a/out/artifacts/TCellSim_jar/TCellSim.jar and b/out/artifacts/TCellSim_jar/TCellSim.jar differ diff --git a/src/main/java/Simulator.java b/src/main/java/Simulator.java index c3b83c8..81a2e02 100644 --- a/src/main/java/Simulator.java +++ b/src/main/java/Simulator.java @@ -196,12 +196,12 @@ public class Simulator { //Filter by overlap size if(verbose){System.out.println("Eliminating edges with weights much less than occupancy values");} - filterByOverlapSize(graph, alphaWellCounts, betaWellCounts); + filterByOverlapSize(graph, alphaWellCounts, betaWellCounts, plateVtoAMap, plateVtoBMap); if(verbose){System.out.println("Edges with weights much less than occupancy values set to 0.0");} //Filter by relative occupancy if(verbose){System.out.println("Eliminating edges between vertices of massively different occupancy");} - filterByRelativeOccupancy(graph, alphaWellCounts, betaWellCounts); + filterByRelativeOccupancy(graph, alphaWellCounts, betaWellCounts, plateVtoAMap, plateVtoBMap); if(verbose){System.out.println("Edges between vertices of massively different occupancy set to 0.0");} @@ -679,10 +679,12 @@ public class Simulator { //Remove edges for pairs with large occupancy discrepancy private static void filterByRelativeOccupancy(SimpleWeightedGraph graph, Map alphaWellCounts, - Map betaWellCounts) { + Map betaWellCounts, + Map plateVtoAMap, + Map plateVtoBMap) { for (DefaultWeightedEdge e : graph.edgeSet()) { - Integer alphaOcc = alphaWellCounts.get(graph.getEdgeSource(e)); - Integer betaOcc = betaWellCounts.get(graph.getEdgeTarget(e)); + Integer alphaOcc = alphaWellCounts.get(plateVtoAMap.get(graph.getEdgeSource(e))); + Integer betaOcc = betaWellCounts.get(plateVtoBMap.get(graph.getEdgeTarget(e))); //Adjust this to something cleverer later if (Math.abs(alphaOcc - betaOcc) >= 20) { graph.setEdgeWeight(e, 0.0); @@ -693,10 +695,12 @@ public class Simulator { //Remove edges for pairs where overlap size is significantly lower than the well occupancy private static void filterByOverlapSize(SimpleWeightedGraph graph, Map alphaWellCounts, - Map betaWellCounts) { + Map betaWellCounts, + Map plateVtoAMap, + Map plateVtoBMap) { for (DefaultWeightedEdge e : graph.edgeSet()) { - Integer alphaOcc = alphaWellCounts.get(graph.getEdgeSource(e)); - Integer betaOcc = betaWellCounts.get(graph.getEdgeTarget(e)); + Integer alphaOcc = alphaWellCounts.get(plateVtoAMap.get(graph.getEdgeSource(e))); + Integer betaOcc = betaWellCounts.get(plateVtoBMap.get(graph.getEdgeTarget(e))); //Adjust this to something cleverer later Integer min = alphaOcc > betaOcc ? betaOcc : alphaOcc; if (min - graph.getEdgeWeight(e) >= 15) {