Output sequence counts before and after pre-filtering (currently pre-filtering only sequences present in all wells)

This commit is contained in:
eugenefischer
2022-09-25 17:20:50 -05:00
parent 58fa140ee5
commit 8a77d53f1f
2 changed files with 17 additions and 15 deletions

View File

@@ -25,9 +25,9 @@ public class GraphWithMapData implements java.io.Serializable {
private final Duration time; private final Duration time;
public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer[] wellConcentrations, public GraphWithMapData(SimpleWeightedGraph graph, Integer numWells, Integer[] wellConcentrations,
Map<Integer, Integer> distCellsMapAlphaKey, Duration time){ Map<Integer, Integer> distCellsMapAlphaKey, Integer alphaCount, Integer betaCount, Duration time){
// Map<Integer, Integer> plateVtoAMap, Integer alphaCount, Integer betaCount, // Map<Integer, Integer> plateVtoAMap,
// Map<Integer,Integer> plateVtoBMap, Map<Integer, Integer> plateAtoVMap, // Map<Integer,Integer> plateVtoBMap, Map<Integer, Integer> plateAtoVMap,
// Map<Integer, Integer> plateBtoVMap, Map<Integer, Integer> alphaWellCounts, // Map<Integer, Integer> plateBtoVMap, Map<Integer, Integer> alphaWellCounts,
// Map<Integer, Integer> betaWellCounts,) { // Map<Integer, Integer> betaWellCounts,) {
@@ -58,13 +58,13 @@ public class GraphWithMapData implements java.io.Serializable {
return wellPopulations; return wellPopulations;
} }
// public Integer getAlphaCount() { public Integer getAlphaCount() {
// return alphaCount; return alphaCount;
// } }
//
// public Integer getBetaCount() { public Integer getBetaCount() {
// return betaCount; return betaCount;
// } }
public Map<Integer, Integer> getDistCellsMapAlphaKey() { public Map<Integer, Integer> getDistCellsMapAlphaKey() {
return distCellsMapAlphaKey; return distCellsMapAlphaKey;

View File

@@ -129,7 +129,7 @@ public class Simulator implements GraphModificationFunctions {
Duration time = Duration.between(start, stop); Duration time = Duration.between(start, stop);
//create GraphWithMapData object //create GraphWithMapData object
GraphWithMapData output = new GraphWithMapData(graph, numWells, samplePlate.getPopulations(), distCellsMapAlphaKey, time); GraphWithMapData output = new GraphWithMapData(graph, numWells, samplePlate.getPopulations(), distCellsMapAlphaKey, alphaCount, betaCount, time);
//Set source file name in graph to name of sample plate //Set source file name in graph to name of sample plate
output.setSourceFilename(samplePlate.getFilename()); output.setSourceFilename(samplePlate.getFilename());
//return GraphWithMapData object //return GraphWithMapData object
@@ -158,8 +158,8 @@ public class Simulator implements GraphModificationFunctions {
betas.add(v); betas.add(v);
} }
} }
Integer alphaCount = alphas.size(); Integer graphAlphaCount = alphas.size();
Integer betaCount = betas.size(); Integer graphBetaCount = betas.size();
//remove edges with weights outside given overlap thresholds, add those to removed edge list //remove edges with weights outside given overlap thresholds, add those to removed edge list
if(verbose){System.out.println("Eliminating edges with weights outside overlap threshold values");} if(verbose){System.out.println("Eliminating edges with weights outside overlap threshold values");}
@@ -266,7 +266,7 @@ public class Simulator implements GraphModificationFunctions {
//Metadata comments for CSV file //Metadata comments for CSV file
String algoType = "LEDA book with heap: " + heapType; String algoType = "LEDA book with heap: " + heapType;
int min = Math.min(alphaCount, betaCount); int min = Math.min(graphAlphaCount, graphBetaCount);
//matching weight //matching weight
BigDecimal totalMatchingWeight = maxWeightMatching.getMatchingWeight(); BigDecimal totalMatchingWeight = maxWeightMatching.getMatchingWeight();
//rate of attempted matching //rate of attempted matching
@@ -301,8 +301,10 @@ public class Simulator implements GraphModificationFunctions {
metadata.put("algorithm type", algoType); metadata.put("algorithm type", algoType);
metadata.put("matching weight", totalMatchingWeight.toString()); metadata.put("matching weight", totalMatchingWeight.toString());
metadata.put("well populations", wellPopulationsString); metadata.put("well populations", wellPopulationsString);
metadata.put("total alphas found", alphaCount.toString()); metadata.put("total alphas on plate", data.getAlphaCount().toString());
metadata.put("total betas found", betaCount.toString()); metadata.put("total betas on plate", data.getBetaCount().toString());
metadata.put("alphas in graph (after pre-filtering)", graphAlphaCount.toString());
metadata.put("betas in graph (after pre-filtering)", graphBetaCount.toString());
metadata.put("high overlap threshold", highThreshold.toString()); metadata.put("high overlap threshold", highThreshold.toString());
metadata.put("low overlap threshold", lowThreshold.toString()); metadata.put("low overlap threshold", lowThreshold.toString());
metadata.put("minimum overlap percent", minOverlapPercent.toString()); metadata.put("minimum overlap percent", minOverlapPercent.toString());