@Test public void testCombine() throws IOException { NewickTree tree1 = new NewickTree("(((A:1,B:1):1,C:1),(D:1,E:1):1);"); NewickTree tree2 = new NewickTree("(((A:1,B:1):1,((H:1,D:1):1,E:1):1),(F:1,G:1):1);"); QuartetSystemList qsl = new QuartetSystemList(); qsl.add(new QuartetSystem(tree1)); qsl.add(new QuartetSystem(tree2)); GroupedQuartetSystem qsc = new QMaker().execute(qsl); assertTrue(true); }
@Override protected void execute(CommandLine commandLine) throws IOException { File outputDir = DEFAULT_OUTPUT_DIR; String prefix = DEFAULT_OUTPUT_PREFIX; if (commandLine.hasOption(OPT_OUTPUT_PREFIX)) { File op = new File(commandLine.getOptionValue(OPT_OUTPUT_PREFIX)); if (op.getParentFile() != null) { outputDir = op.getParentFile(); } prefix = op.getName(); } String[] args = commandLine.getArgs(); if (args == null || args.length == 0) { throw new IOException("You must specify at least one input file"); } File[] inputFiles = new File[args.length]; for (int i = 0; i < args.length; i++) { inputFiles[i] = new File(args[i].trim()); } try { Optimiser optimiser = commandLine.hasOption(OPT_OPTIMISER) ? OptimiserFactory.getInstance().createOptimiserInstance( commandLine.getOptionValue(OPT_OPTIMISER), Objective.ObjectiveType.QUADRATIC) : null; this.execute(inputFiles, optimiser, outputDir, prefix); } catch (OptimiserException oe) { throw new IOException(oe); } }
QMaker extends SpectreTool { @Override protected void execute(CommandLine commandLine) throws IOException { File outputDir = DEFAULT_OUTPUT_DIR; String prefix = DEFAULT_OUTPUT_PREFIX; if (commandLine.hasOption(OPT_OUTPUT_PREFIX)) { File op = new File(commandLine.getOptionValue(OPT_OUTPUT_PREFIX)); if (op.getParentFile() != null) { outputDir = op.getParentFile(); } prefix = op.getName(); } String[] args = commandLine.getArgs(); if (args == null || args.length == 0) { throw new IOException("You must specify at least one input file"); } File[] inputFiles = new File[args.length]; for (int i = 0; i < args.length; i++) { inputFiles[i] = new File(args[i].trim()); } try { Optimiser optimiser = commandLine.hasOption(OPT_OPTIMISER) ? OptimiserFactory.getInstance().createOptimiserInstance( commandLine.getOptionValue(OPT_OPTIMISER), Objective.ObjectiveType.QUADRATIC) : null; this.execute(inputFiles, optimiser, outputDir, prefix); } catch (OptimiserException oe) { throw new IOException(oe); } } }
QMaker extends SpectreTool { @Override protected void execute(CommandLine commandLine) throws IOException { File outputDir = DEFAULT_OUTPUT_DIR; String prefix = DEFAULT_OUTPUT_PREFIX; if (commandLine.hasOption(OPT_OUTPUT_PREFIX)) { File op = new File(commandLine.getOptionValue(OPT_OUTPUT_PREFIX)); if (op.getParentFile() != null) { outputDir = op.getParentFile(); } prefix = op.getName(); } String[] args = commandLine.getArgs(); if (args == null || args.length == 0) { throw new IOException("You must specify at least one input file"); } File[] inputFiles = new File[args.length]; for (int i = 0; i < args.length; i++) { inputFiles[i] = new File(args[i].trim()); } try { Optimiser optimiser = commandLine.hasOption(OPT_OPTIMISER) ? OptimiserFactory.getInstance().createOptimiserInstance( commandLine.getOptionValue(OPT_OPTIMISER), Objective.ObjectiveType.QUADRATIC) : null; this.execute(inputFiles, optimiser, outputDir, prefix); } catch (OptimiserException oe) { throw new IOException(oe); } }  }
QMaker extends SpectreTool { @Override protected void execute(CommandLine commandLine) throws IOException { File outputDir = DEFAULT_OUTPUT_DIR; String prefix = DEFAULT_OUTPUT_PREFIX; if (commandLine.hasOption(OPT_OUTPUT_PREFIX)) { File op = new File(commandLine.getOptionValue(OPT_OUTPUT_PREFIX)); if (op.getParentFile() != null) { outputDir = op.getParentFile(); } prefix = op.getName(); } String[] args = commandLine.getArgs(); if (args == null || args.length == 0) { throw new IOException("You must specify at least one input file"); } File[] inputFiles = new File[args.length]; for (int i = 0; i < args.length; i++) { inputFiles[i] = new File(args[i].trim()); } try { Optimiser optimiser = commandLine.hasOption(OPT_OPTIMISER) ? OptimiserFactory.getInstance().createOptimiserInstance( commandLine.getOptionValue(OPT_OPTIMISER), Objective.ObjectiveType.QUADRATIC) : null; this.execute(inputFiles, optimiser, outputDir, prefix); } catch (OptimiserException oe) { throw new IOException(oe); } }  @Override String getName(); @Override String getPosArgs(); @Override String getDescription(); File getInfoFile(); File getQuartetFile(); GroupedQuartetSystem execute(File[] inputFiles, Optimiser optimiser, File outputDir, String outputPrefix); GroupedQuartetSystem execute(File[] inputFiles); GroupedQuartetSystem execute(File[] inputFiles, Optimiser optimiser); GroupedQuartetSystem execute(QuartetSystemList quartetSystems, Optimiser optimiser); GroupedQuartetSystem execute(QuartetSystemList quartetSystems); static void main(String[] args); }
QMaker extends SpectreTool { @Override protected void execute(CommandLine commandLine) throws IOException { File outputDir = DEFAULT_OUTPUT_DIR; String prefix = DEFAULT_OUTPUT_PREFIX; if (commandLine.hasOption(OPT_OUTPUT_PREFIX)) { File op = new File(commandLine.getOptionValue(OPT_OUTPUT_PREFIX)); if (op.getParentFile() != null) { outputDir = op.getParentFile(); } prefix = op.getName(); } String[] args = commandLine.getArgs(); if (args == null || args.length == 0) { throw new IOException("You must specify at least one input file"); } File[] inputFiles = new File[args.length]; for (int i = 0; i < args.length; i++) { inputFiles[i] = new File(args[i].trim()); } try { Optimiser optimiser = commandLine.hasOption(OPT_OPTIMISER) ? OptimiserFactory.getInstance().createOptimiserInstance( commandLine.getOptionValue(OPT_OPTIMISER), Objective.ObjectiveType.QUADRATIC) : null; this.execute(inputFiles, optimiser, outputDir, prefix); } catch (OptimiserException oe) { throw new IOException(oe); } }  @Override String getName(); @Override String getPosArgs(); @Override String getDescription(); File getInfoFile(); File getQuartetFile(); GroupedQuartetSystem execute(File[] inputFiles, Optimiser optimiser, File outputDir, String outputPrefix); GroupedQuartetSystem execute(File[] inputFiles); GroupedQuartetSystem execute(File[] inputFiles, Optimiser optimiser); GroupedQuartetSystem execute(QuartetSystemList quartetSystems, Optimiser optimiser); GroupedQuartetSystem execute(QuartetSystemList quartetSystems); static void main(String[] args);  }