122 lines
3.2 KiB
Java
122 lines
3.2 KiB
Java
import java.util.Random;
|
|
|
|
//main class. For choosing interface type and caching file data
|
|
public class BiGpairSEQ {
|
|
|
|
private static final Random rand = new Random();
|
|
private static CellSample cellSampleInMemory = null;
|
|
private static String cellFilename = null;
|
|
private static Plate plateInMemory = null;
|
|
private static String plateFilename = null;
|
|
private static GraphWithMapData graphInMemory = null;
|
|
private static String graphFilename = null;
|
|
private static boolean cacheCells = false;
|
|
private static boolean cachePlate = false;
|
|
private static boolean cacheGraph = true;
|
|
|
|
public static void main(String[] args) {
|
|
if (args.length == 0) {
|
|
InteractiveInterface.startInteractive();
|
|
}
|
|
else {
|
|
//This will be uncommented when command line arguments are re-implemented.
|
|
//CommandLineInterface.startCLI(args);
|
|
System.out.println("Command line arguments are still being re-implemented.");
|
|
}
|
|
}
|
|
|
|
public static Random getRand() {
|
|
return rand;
|
|
}
|
|
|
|
public static CellSample getCellSampleInMemory() {
|
|
return cellSampleInMemory;
|
|
}
|
|
|
|
public static void setCellSampleInMemory(CellSample cellSampleInMemory) {
|
|
BiGpairSEQ.cellSampleInMemory = cellSampleInMemory;
|
|
}
|
|
|
|
public static void clearCellSampleInMemory() {
|
|
cellSampleInMemory = null;
|
|
System.gc();
|
|
}
|
|
|
|
public static String getCellFilename() {
|
|
return cellFilename;
|
|
}
|
|
|
|
public static void setCellFilename(String cellFilename) {
|
|
BiGpairSEQ.cellFilename = cellFilename;
|
|
}
|
|
|
|
public static Plate getPlateInMemory() {
|
|
return plateInMemory;
|
|
}
|
|
|
|
public static void setPlateInMemory(Plate plateInMemory) {
|
|
BiGpairSEQ.plateInMemory = plateInMemory;
|
|
}
|
|
|
|
public static void clearPlateInMemory() {
|
|
plateInMemory = null;
|
|
System.gc();
|
|
}
|
|
|
|
public static String getPlateFilename() {
|
|
return plateFilename;
|
|
}
|
|
|
|
public static void setPlateFilename(String plateFilename) {
|
|
BiGpairSEQ.plateFilename = plateFilename;
|
|
}
|
|
|
|
public static GraphWithMapData getGraphInMemory() {
|
|
return graphInMemory;
|
|
}
|
|
|
|
public static void setGraphInMemory(GraphWithMapData g) {
|
|
if (graphInMemory != null) {
|
|
clearGraphInMemory();
|
|
}
|
|
graphInMemory = g;
|
|
}
|
|
|
|
public static void clearGraphInMemory() {
|
|
graphInMemory = null;
|
|
System.gc();
|
|
}
|
|
|
|
public static String getGraphFilename() {
|
|
return graphFilename;
|
|
}
|
|
|
|
public static void setGraphFilename(String filename) {
|
|
graphFilename = filename;
|
|
}
|
|
|
|
public static boolean cacheCells() {
|
|
return cacheCells;
|
|
}
|
|
|
|
public static void setCacheCells(boolean cacheCells) {
|
|
BiGpairSEQ.cacheCells = cacheCells;
|
|
}
|
|
|
|
public static boolean cachePlate() {
|
|
return cachePlate;
|
|
}
|
|
|
|
public static void setCachePlate(boolean cachePlate) {
|
|
BiGpairSEQ.cachePlate = cachePlate;
|
|
}
|
|
|
|
public static boolean cacheGraph() {
|
|
return cacheGraph;
|
|
}
|
|
|
|
public static void setCacheGraph(boolean cacheGraph) {
|
|
BiGpairSEQ.cacheGraph = cacheGraph;
|
|
}
|
|
}
|