From cf771ce57427ac0c81285252daff90db305ca813 Mon Sep 17 00:00:00 2001 From: eugenefischer <66030419+eugenefischer@users.noreply.github.com> Date: Wed, 21 Sep 2022 13:15:49 -0500 Subject: [PATCH] parameterized sequence indices --- readme.md | 2 ++ src/main/java/Simulator.java | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index 5c3210b..99da1a3 100644 --- a/readme.md +++ b/readme.md @@ -356,6 +356,8 @@ roughly as though it had a constant well population equal to the plate's average * Add controllable algorithm-type parameter? * This would be fun and valuable, but probably take more time than I have for a hobby project. * Implement Vose's alias method for arbitrary statistical distributions of cells + * Should probably refactor to use apache commons rng for this +* Use commons JCS for caching ## CITATIONS diff --git a/src/main/java/Simulator.java b/src/main/java/Simulator.java index 1c62872..933ad0e 100644 --- a/src/main/java/Simulator.java +++ b/src/main/java/Simulator.java @@ -47,10 +47,11 @@ public class Simulator implements GraphModificationFunctions { if(verbose){System.out.println("All betas count: " + betaCount);} if(verbose){System.out.println("Well maps made");} - if(verbose){System.out.println("Removing singleton sequences and sequences present in all wells.");} - filterByOccupancyThresholds(allAlphas, 2, numWells - 1); - filterByOccupancyThresholds(allBetas, 2, numWells - 1); - if(verbose){System.out.println("Sequences removed");} + +// if(verbose){System.out.println("Removing singleton sequences and sequences present in all wells.");} +// filterByOccupancyThresholds(allAlphas, 2, numWells - 1); +// filterByOccupancyThresholds(allBetas, 2, numWells - 1); +// if(verbose){System.out.println("Sequences removed");} int pairableAlphaCount = allAlphas.size(); if(verbose){System.out.println("Remaining alphas count: " + pairableAlphaCount);} int pairableBetaCount = allBetas.size(); @@ -239,6 +240,8 @@ public class Simulator implements GraphModificationFunctions { //Metadata comments for CSV file String algoType = "LEDA book with heap: " + heapType; int min = Math.min(alphaCount, betaCount); + //matching weight + BigDecimal totalMatchingWeight = maxWeightMatching.getMatchingWeight(); //rate of attempted matching double attemptRate = (double) (trueCount + falseCount) / min; BigDecimal attemptRateTrunc = new BigDecimal(attemptRate, mc); @@ -269,6 +272,7 @@ public class Simulator implements GraphModificationFunctions { metadata.put("sample plate filename", data.getSourceFilename()); metadata.put("graph filename", dataFilename); metadata.put("algorithm type", algoType); + metadata.put("matching weight", totalMatchingWeight.toString()); metadata.put("well populations", wellPopulationsString); metadata.put("total alphas found", alphaCount.toString()); metadata.put("total betas found", betaCount.toString());