Implemented parameter for CDR1 frequency

This commit is contained in:
2021-11-18 11:55:54 -06:00
parent 4157cfb556
commit 2064d7e9fc
4 changed files with 19 additions and 22 deletions

View File

@@ -41,6 +41,7 @@ public class UserInterface {
private static void makeCells() {
String filename = null;
Integer numCells = 0;
Integer cdr1Freq = 1;
try {
System.out.println("\nSimulated T-Cells consist of integer values representing:\n" +
"* a pair of alpha and beta CDR3 peptides (unique within simulated population)\n" +
@@ -48,6 +49,9 @@ public class UserInterface {
System.out.println("\nThe cells will be written to a file.");
System.out.print("Please enter a file name: ");
filename = sc.next();
System.out.println("CDR3 sequences are more diverse than CDR1 sequences.");
System.out.println("Please enter the factor by which distinct CDR3s outnumber CDR1s: ");
cdr1Freq = sc.nextInt();
System.out.print("Please enter the number of T-cells to generate: ");
numCells = sc.nextInt();
if(numCells <= 0){
@@ -57,7 +61,7 @@ public class UserInterface {
System.out.println(ex);
sc.next();
}
CellSample sample = Simulator.generateExpandedCellSample(numCells);
CellSample sample = Simulator.generateCellSample(numCells, cdr1Freq);
CellFileWriter writer = new CellFileWriter(filename, sample);
writer.writeCellsToFile();
}