From a5f7c0641d30a368f6527e13fa7b4ccec91561b9 Mon Sep 17 00:00:00 2001 From: efischer Date: Sun, 27 Feb 2022 14:51:53 -0600 Subject: [PATCH] Refactor for better encapsulation with CellSamples --- src/main/java/InteractiveInterface.java | 3 +-- src/main/java/Simulator.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/InteractiveInterface.java b/src/main/java/InteractiveInterface.java index 0de7a8e..d826b1f 100644 --- a/src/main/java/InteractiveInterface.java +++ b/src/main/java/InteractiveInterface.java @@ -304,8 +304,7 @@ public class InteractiveInterface { System.out.println("Returning to main menu."); } else{ - List cells = cellSample.getCells(); - GraphWithMapData data = Simulator.makeGraph(cells, plate, true); + GraphWithMapData data = Simulator.makeGraph(cellSample, plate, true); assert filename != null; if(BiGpairSEQ.outputBinary()) { GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data); diff --git a/src/main/java/Simulator.java b/src/main/java/Simulator.java index 0cc6df1..da13878 100644 --- a/src/main/java/Simulator.java +++ b/src/main/java/Simulator.java @@ -24,8 +24,9 @@ public class Simulator implements GraphModificationFunctions { private static final int cdr1BetaIndex = 3; //Make the graph needed for matching CDR3s - public static GraphWithMapData makeGraph(List distinctCells, Plate samplePlate, boolean verbose) { + public static GraphWithMapData makeGraph(CellSample cellSample, Plate samplePlate, boolean verbose) { Instant start = Instant.now(); + List distinctCells = cellSample.getCells(); int[] alphaIndex = {cdr3AlphaIndex}; int[] betaIndex = {cdr3BetaIndex};