use of edu.ucsf.rbvi.clusterMaker2.internal.algorithms.networkClusterers.TransClust.de.layclust.taskmanaging.io.UniqueFilter in project clusterMaker2 by RBVI.
the class TransClust method main.
/**
* The main method for the TransClust program. Starts the program
* appropriately.
* @param args The input variables.
*/
public static void main(String[] args) {
TransClust.args = args;
/* initialise logging */
Logger logger = Logger.getLogger("");
Handler[] handler = logger.getHandlers();
for (Handler h : handler) {
if (h instanceof ConsoleHandler) {
h.setLevel(Level.INFO);
h.setFormatter(new ConsoleFormatter());
h.setFilter(new UniqueFilter());
}
}
/* check if no input is given */
if (args.length == 0) {
log.severe("ERROR: Please define at least an input file/directory and an " + "output file for the results. Use -help for more details or see the " + "respective documentation.\n\n");
System.out.println(ArgsUtility.createUsage().toString());
System.exit(-1);
}
/* print usage */
if ((args.length == 1) && ((args[0].trim().equalsIgnoreCase("-help")) || (args[0].trim().equalsIgnoreCase("--help")))) {
System.out.println(ArgsUtility.createUsage().toString());
System.exit(-1);
} else /* start with parameters from console */
{
try {
new Console(args);
} catch (InvalidInputFileException e) {
log.severe("ERROR: An invalid file/path name was given.");
e.printStackTrace();
System.exit(-1);
} catch (ArgsParseException e) {
log.severe(e.getMessage());
log.severe("ERROR: please see usage details!");
System.out.println(ArgsUtility.createUsage().toString());
} catch (IOException e) {
}
}
}
Aggregations