Add read depth option to interface
This commit is contained in:
@@ -250,6 +250,11 @@ public class InteractiveInterface {
|
||||
String filename = null;
|
||||
String cellFile = null;
|
||||
String plateFile = null;
|
||||
Boolean simulateReadDepth = false;
|
||||
//number of times to read each sequence in a well
|
||||
Integer readDepth = 1;
|
||||
Double readErrorRate = 0.0;
|
||||
Double errorCollisionRate = 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.");
|
||||
@@ -258,6 +263,23 @@ public class InteractiveInterface {
|
||||
cellFile = sc.next();
|
||||
System.out.print("\nPlease enter name of an existing sample plate file: ");
|
||||
plateFile = sc.next();
|
||||
System.out.println("\nEnable simulation of sequence read depth and sequence read errors? (y/n)");
|
||||
String ans = sc.next();
|
||||
Pattern pattern = Pattern.compile("(?:yes|y)", Pattern.CASE_INSENSITIVE);
|
||||
Matcher matcher = pattern.matcher(ans);
|
||||
if(matcher.matches()){
|
||||
simulateReadDepth = true;
|
||||
}
|
||||
if (simulateReadDepth) {
|
||||
System.out.print("\nPlease enter read depth (the integer number of reads per sequence): ");
|
||||
readDepth = sc.nextInt();
|
||||
System.out.print("\nPlease enter probability of a sequence read error (0.0 to 1.0): ");
|
||||
readErrorRate = sc.nextDouble();
|
||||
System.out.println("\nPlease enter the probability of read error collision");
|
||||
System.out.println("(the likelihood that two read errors produce the same spurious sequence)");
|
||||
System.out.print("(0.0 to 1.0): ");
|
||||
errorCollisionRate = sc.nextDouble();
|
||||
}
|
||||
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: ");
|
||||
filename = sc.next();
|
||||
@@ -505,8 +527,7 @@ public class InteractiveInterface {
|
||||
System.out.println("3) Turn " + getOnOff(!BiGpairSEQ.cacheGraph()) + " graph/data file caching");
|
||||
System.out.println("4) Turn " + getOnOff(!BiGpairSEQ.outputBinary()) + " serialized binary graph output");
|
||||
System.out.println("5) Turn " + getOnOff(!BiGpairSEQ.outputGraphML()) + " GraphML graph output (for data portability to other programs)");
|
||||
System.out.println("6) Turn " + getOnOff(!BiGpairSEQ.simulateReadDepth()) + " simulation of read depth and sequence read errors");
|
||||
System.out.println("7) Maximum weight matching algorithm options");
|
||||
System.out.println("6) Maximum weight matching algorithm options");
|
||||
System.out.println("0) Return to main menu");
|
||||
try {
|
||||
input = sc.nextInt();
|
||||
@@ -516,8 +537,7 @@ public class InteractiveInterface {
|
||||
case 3 -> BiGpairSEQ.setCacheGraph(!BiGpairSEQ.cacheGraph());
|
||||
case 4 -> BiGpairSEQ.setOutputBinary(!BiGpairSEQ.outputBinary());
|
||||
case 5 -> BiGpairSEQ.setOutputGraphML(!BiGpairSEQ.outputGraphML());
|
||||
case 6 -> BiGpairSEQ.setSimulateReadDepth(!BiGpairSEQ.simulateReadDepth());
|
||||
case 7 -> algorithmOptions();
|
||||
case 6 -> algorithmOptions();
|
||||
case 0 -> backToMain = true;
|
||||
default -> System.out.println("Invalid input");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user