Add real sequence collision rate

This commit is contained in:
eugenefischer
2022-09-28 17:43:21 -05:00
parent 89687fa849
commit 9dacd8cd34

View File

@@ -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);