Command line arguments working, need better documentation and error handling
This commit is contained in:
@@ -20,8 +20,57 @@ public class Simulator {
|
||||
private static int cdr1BetaIndex = 3;
|
||||
|
||||
|
||||
|
||||
|
||||
//Tested generating the cell sample file itself with a set distribution, but it wasn't working well
|
||||
//realized I'd have to change matching algos as well, so abandoned it.
|
||||
// public static CellSample generateCellSampleExp(Integer numDistinctCells, Integer cdr1Freq){
|
||||
// //was told I=in real T cells, CDR1s have about one third the diversity of CDR3s
|
||||
// //this could be wrong, though. could be less diversity than that.
|
||||
// //previous sim was only CDR3s
|
||||
// //Integer numDistinctCells = 1000000;
|
||||
// //int cdr1Freq = 3;
|
||||
//
|
||||
// List<Integer> numbersCDR3 = new ArrayList<>();
|
||||
// List<Integer> numbersCDR1 = new ArrayList<>();
|
||||
// Integer numDistCDR3s = 2 * numDistinctCells + 1;
|
||||
// IntStream.range(1, numDistCDR3s + 1).forEach(i -> numbersCDR3.add(i));
|
||||
// IntStream.range(numDistCDR3s + 1, numDistCDR3s + 1 + (numDistCDR3s / cdr1Freq) + 1).forEach(i -> numbersCDR1.add(i));
|
||||
// Collections.shuffle(numbersCDR3);
|
||||
// Collections.shuffle(numbersCDR1);
|
||||
//
|
||||
// //Each cell represented by 4 values
|
||||
// //two CDR3s, and two CDR1s. First two values are CDR3s, second two are CDR1s
|
||||
// List<Integer[]> distinctCells = new ArrayList<>();
|
||||
// for(int i = 0; i < numbersCDR3.size() - 1; i = i + 2){
|
||||
// Integer tmpCDR3a = numbersCDR3.get(i);
|
||||
// Integer tmpCDR3b = numbersCDR3.get(i+1);
|
||||
// Integer tmpCDR1a = numbersCDR1.get(i % numbersCDR1.size());
|
||||
// Integer tmpCDR1b = numbersCDR1.get((i+1) % numbersCDR1.size());
|
||||
// Integer[] tmp = {tmpCDR3a, tmpCDR3b, tmpCDR1a, tmpCDR1b};
|
||||
// distinctCells.add(tmp);
|
||||
// }
|
||||
// List<Integer[]>sampleCells = new ArrayList<>();
|
||||
// int count;
|
||||
// int lastFactor = 0;
|
||||
// int factor = 10;
|
||||
// int index = 0;
|
||||
// while(numDistinctCells / factor >= 1){
|
||||
// int i = index;
|
||||
// while(i < index + factor - lastFactor){
|
||||
// count = 0;
|
||||
// while(count < (numDistinctCells/(factor * 10))){
|
||||
// sampleCells.add(distinctCells.get(i));
|
||||
// count++;
|
||||
// }
|
||||
// i++;
|
||||
// }
|
||||
// index = i;
|
||||
// lastFactor = factor;
|
||||
// factor *=10;
|
||||
// }
|
||||
// System.out.println("Total cells in sample: " + sampleCells.size());
|
||||
// System.out.println("Distinct cells in sample: " + index);
|
||||
// return new CellSample(sampleCells, cdr1Freq);
|
||||
// }
|
||||
public static CellSample generateCellSample(Integer numDistinctCells, Integer cdr1Freq) {
|
||||
//In real T cells, CDR1s have about one third the diversity of CDR3s
|
||||
//previous sim was only CDR3s
|
||||
|
||||
Reference in New Issue
Block a user