From 9dacd8cd3488cced5142aecfa76d8035513bb75d Mon Sep 17 00:00:00 2001 From: eugenefischer <66030419+eugenefischer@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:43:21 -0500 Subject: [PATCH] Add real sequence collision rate --- src/main/java/InteractiveInterface.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/InteractiveInterface.java b/src/main/java/InteractiveInterface.java index 5c1f14f..4c568c4 100644 --- a/src/main/java/InteractiveInterface.java +++ b/src/main/java/InteractiveInterface.java @@ -255,6 +255,7 @@ public class InteractiveInterface { int readDepth = 1; double readErrorRate = 0.0; double errorCollisionRate = 0.0; + double realSequenceCollisionRate = 0.0; try { String str = "\nGenerating bipartite weighted graph encoding occupancy overlap data "; str = str.concat("\nrequires a cell sample file and a sample plate file."); @@ -271,22 +272,29 @@ public class InteractiveInterface { simulateReadDepth = true; } if (simulateReadDepth) { - System.out.print("\nPlease enter read depth (the integer number of reads per sequence): "); + System.out.print("\nPlease enter the read depth (the integer number of times a sequence is read): "); readDepth = sc.nextInt(); if(readDepth < 1) { throw new InputMismatchException("The read depth must be an integer >= 1"); } - System.out.print("\nPlease enter probability of a sequence read error (0.0 to 1.0): "); + System.out.println("\nPlease enter the read error probability (0.0 to 1.0)"); + System.out.print("(The probability that a sequence will be misread): "); readErrorRate = sc.nextDouble(); if(readErrorRate < 0.0 || readErrorRate > 1.0) { throw new InputMismatchException("The read error probability must be in the range [0.0, 1.0]"); } - System.out.println("\nPlease enter the probability of read error collision (0.0 to 1.0)"); - System.out.print("(The probability that two misreads produce the same spurious sequence): "); + System.out.println("\nPlease enter the error collision probability (0.0 to 1.0)"); + System.out.print("(The probability of a sequence being misread in a way it has been misread before): "); errorCollisionRate = sc.nextDouble(); if(errorCollisionRate < 0.0 || errorCollisionRate > 1.0) { throw new InputMismatchException("The error collision probability must be an in the range [0.0, 1.0]"); } + System.out.println("\nPlease enter the real sequence collision probability (0.0 to 1.0)"); + System.out.print("(The probability that a (non-collision) misread produces a different, real sequence): "); + realSequenceCollisionRate = sc.nextDouble(); + if(realSequenceCollisionRate < 0.0 || realSequenceCollisionRate > 1.0) { + throw new InputMismatchException("The real sequence collision probability must be an in the range [0.0, 1.0]"); + } } System.out.println("\nThe graph and occupancy data will be written to a file."); System.out.print("Please enter a name for the output file: "); @@ -334,7 +342,8 @@ public class InteractiveInterface { System.out.println("Returning to main menu."); } else{ - GraphWithMapData data = Simulator.makeCDR3Graph(cellSample, plate, readDepth, readErrorRate, errorCollisionRate, true); + GraphWithMapData data = Simulator.makeCDR3Graph(cellSample, plate, readDepth, readErrorRate, + errorCollisionRate, realSequenceCollisionRate, true); assert filename != null; if(BiGpairSEQ.outputBinary()) { GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data);