use of edu.ucsf.rbvi.clusterMaker2.internal.algorithms.networkClusterers.TransClust.de.costmatrixcreation.gui.MainFrame in project clusterMaker2 by RBVI.
the class CostMatrixCreator method main.
/**
* @param args
* @throws IOException
* @throws ArgsParseException
*/
public static void main(String[] args) throws IOException, ArgsParseException {
Args options = new Args(args, "-");
if (options.options.containsKey("help") || options.options.containsKey("h") || options.options.containsKey("-help")) {
printUsage();
System.exit(0);
}
Config.init(options);
if (Config.gui) {
MainFrame f = new MainFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
// f.pack();
f.setSize(900, 900);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
int top = (screenSize.height - f.getHeight()) / 2;
int left = (screenSize.width - f.getWidth()) / 2;
f.setLocation(left, top);
JPanel fPanel = (JPanel) f.getContentPane();
fPanel.add(new JSeparator());
fPanel.add(new JLabel(" "));
fPanel.add(new JLabel("Status:"));
fPanel.add(new JLabel(" "));
fPanel.add(Console.getConsolePanel());
Console.println("Welcome...");
fPanel.updateUI();
} else {
HashMap<Integer, String> proteins2integers = new HashMap<Integer, String>();
HashMap<String, Integer> integers2proteins = new HashMap<String, Integer>();
if (Config.createSimilarityFile) {
Creator c = new Creator();
c.run(proteins2integers, integers2proteins);
}
if (Config.splitAndWriteCostMatrices) {
Splitter s = new Splitter();
s.run(proteins2integers, integers2proteins);
}
}
}