Clean up interactive text, bugfix
This commit is contained in:
@@ -351,7 +351,7 @@ public class UserInterface {
|
||||
// writer.writePlateFile();
|
||||
// }
|
||||
|
||||
//method to output a CSV of sample plate
|
||||
//Output a CSV of sample plate
|
||||
private static void makePlate() {
|
||||
String cellFile = null;
|
||||
String filename = null;
|
||||
@@ -454,6 +454,7 @@ public class UserInterface {
|
||||
}
|
||||
}
|
||||
|
||||
//Output serialized binary of GraphAndMapData object
|
||||
private static void makeCDR3Graph() {
|
||||
String filename = null;
|
||||
String cellFile = null;
|
||||
@@ -462,7 +463,7 @@ public class UserInterface {
|
||||
Integer highThreshold = Integer.MAX_VALUE;
|
||||
try {
|
||||
String str = "\nGenerating bipartite weighted graph encoding occupancy data requires ";
|
||||
str.concat("a cell sample file and a sample plate file.");
|
||||
str = str.concat("a cell sample file and a sample plate file.");
|
||||
System.out.println(str);
|
||||
System.out.print("Please enter name of an existing cell sample file: ");
|
||||
cellFile = sc.next();
|
||||
@@ -500,10 +501,13 @@ public class UserInterface {
|
||||
List<Integer[]> cells = cellReader.getCells();
|
||||
GraphWithMapData data = Simulator.makeGraph(cells, plate, lowThreshold, highThreshold, true);
|
||||
GraphDataObjectWriter dataWriter = new GraphDataObjectWriter(filename, data);
|
||||
System.out.println("Writing graph and occupancy data to file. This may take some time.");
|
||||
System.out.println("Time to write file is not included in simulation time data.");
|
||||
dataWriter.writeDataToFile();
|
||||
}
|
||||
}
|
||||
|
||||
//Simulate matching and output CSV file of results
|
||||
private static void matchCDR3s() throws IOException {
|
||||
String filename = null;
|
||||
String dataFile = null;
|
||||
@@ -516,6 +520,13 @@ public class UserInterface {
|
||||
System.out.println("The matching results will be written to a file.");
|
||||
System.out.print("Please enter a name for the output file: ");
|
||||
filename = sc.next();
|
||||
System.out.println("What is the maximum difference in alpha/beta occupancy to attempt matching?");
|
||||
maxOccupancyDiff = sc.nextInt();
|
||||
System.out.println("What is the minimum overlap percentage to attempt matching? (0 - 100)");
|
||||
minOverlapPercent = sc.nextInt();
|
||||
if (minOverlapPercent < 0 || minOverlapPercent > 100) {
|
||||
throw new InputMismatchException("Value outside range. Minimum percent set to 0");
|
||||
}
|
||||
} catch (InputMismatchException ex) {
|
||||
System.out.println(ex);
|
||||
sc.next();
|
||||
@@ -529,6 +540,7 @@ public class UserInterface {
|
||||
MatchingResult results = Simulator.matchCDR3s(data, maxOccupancyDiff, minOverlapPercent, true);
|
||||
//write results to file
|
||||
MatchingFileWriter writer = new MatchingFileWriter(filename, results);
|
||||
System.out.println("Writing results to file");
|
||||
writer.writeResultsToFile();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user