Read depth simulation is now compatible with plate caching

This commit is contained in:
eugenefischer
2022-09-28 12:47:00 -05:00
parent b7c86f20b3
commit 856063529b

View File

@@ -264,7 +264,6 @@ public class InteractiveInterface {
System.out.print("\nPlease enter name of an existing sample plate file: "); System.out.print("\nPlease enter name of an existing sample plate file: ");
plateFile = sc.next(); plateFile = sc.next();
System.out.println("\nEnable simulation of sequence read depth and sequence read errors? (y/n)"); System.out.println("\nEnable simulation of sequence read depth and sequence read errors? (y/n)");
System.out.println("NOTE: sample plate data cannot be cached when simulating read errors");
String ans = sc.next(); String ans = sc.next();
Pattern pattern = Pattern.compile("(?:yes|y)", Pattern.CASE_INSENSITIVE); Pattern pattern = Pattern.compile("(?:yes|y)", Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(ans); Matcher matcher = pattern.matcher(ans);
@@ -272,8 +271,6 @@ public class InteractiveInterface {
simulateReadDepth = true; simulateReadDepth = true;
} }
if (simulateReadDepth) { if (simulateReadDepth) {
BiGpairSEQ.setCachePlate(false);
BiGpairSEQ.clearPlateInMemory();
System.out.print("\nPlease enter read depth (the integer number of reads per sequence): "); System.out.print("\nPlease enter read depth (the integer number of reads per sequence): ");
readDepth = sc.nextInt(); readDepth = sc.nextInt();
if(readDepth < 1) { if(readDepth < 1) {
@@ -282,11 +279,10 @@ public class InteractiveInterface {
System.out.print("\nPlease enter probability of a sequence read error (0.0 to 1.0): "); System.out.print("\nPlease enter probability of a sequence read error (0.0 to 1.0): ");
readErrorRate = sc.nextDouble(); readErrorRate = sc.nextDouble();
if(readErrorRate < 0.0 || readErrorRate > 1.0) { if(readErrorRate < 0.0 || readErrorRate > 1.0) {
throw new InputMismatchException("The read error rate must be in the range [0.0, 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"); System.out.println("\nPlease enter the probability of read error collision (0.0 to 1.0)");
System.out.println("(the likelihood that two read errors produce the same spurious sequence)"); System.out.print("(The probability that two misreads produce the same spurious sequence): ");
System.out.print("(0.0 to 1.0): ");
errorCollisionRate = sc.nextDouble(); errorCollisionRate = sc.nextDouble();
if(errorCollisionRate < 0.0 || errorCollisionRate > 1.0) { if(errorCollisionRate < 0.0 || errorCollisionRate > 1.0) {
throw new InputMismatchException("The error collision probability must be an in the range [0.0, 1.0]"); throw new InputMismatchException("The error collision probability must be an in the range [0.0, 1.0]");