- return limits;\r
- }\r
-\r
- public static synchronized <T> RunnerConfig<T> getSupportedOptions(\r
- Class<? extends Executable<T>> clazz) {\r
- try {\r
- return ConfExecutable.getRunnerOptions(clazz);\r
- } catch (FileNotFoundException e) {\r
- log.error("Could not load " + clazz + " Parameters !"\r
- + e.getMessage(), e.getCause());\r
- } catch (IOException e) {\r
- log.error("IO exception while reading " + clazz + " Parameters !"\r
- + e.getMessage(), e.getCause());\r
+\r
+ public static <T> PresetManager<T> getPresets(\r
+ Class<? extends Executable<T>> clazz) {\r
+ try {\r
+ return ConfExecutable.getRunnerPresets(clazz);\r
+ } catch (FileNotFoundException e) {\r
+ log.warn(\r
+ "No presets are found for " + clazz + " executable! "\r
+ + e.getLocalizedMessage(), e.getCause());\r
+ } catch (IOException e) {\r
+ log.warn("IO exception while reading presents! for " + clazz\r
+ + " executable! " + e.getLocalizedMessage(), e.getCause());\r
+ }\r
+ return null;\r
+ }\r
+\r
+ public static final Alignment readClustalFile(String workDirectory,\r
+ String clustFile) throws UnknownFileFormatException, IOException,\r
+ FileNotFoundException, NullPointerException {\r
+ assert !compbio.util.Util.isEmpty(workDirectory);\r
+ assert !compbio.util.Util.isEmpty(clustFile);\r
+ File cfile = new File(compbio.engine.client.Util.getFullPath(\r
+ workDirectory, clustFile));\r
+ log.trace("CLUSTAL OUTPUT FILE PATH: " + cfile.getAbsolutePath());\r
+ if (!(cfile.exists() && cfile.length() > 0)) {\r
+ throw new FileNotFoundException("Result for the jobId "\r
+ + workDirectory + " with file name " + clustFile\r
+ + " is not found!");\r
+ }\r
+ return ClustalAlignmentUtil.readClustalFile(cfile);\r
+ }\r
+\r
+ public static final Map<String, Score> readJronnFile(String workDirectory,\r
+ String clustFile) throws UnknownFileFormatException, IOException,\r
+ FileNotFoundException, NullPointerException {\r
+ assert !compbio.util.Util.isEmpty(workDirectory);\r
+ assert !compbio.util.Util.isEmpty(clustFile);\r
+ File cfile = new File(compbio.engine.client.Util.getFullPath(\r
+ workDirectory, clustFile));\r
+ log.trace("Jronn OUTPUT FILE PATH: " + cfile.getAbsolutePath());\r
+ if (!(cfile.exists() && cfile.length() > 0)) {\r
+ throw new FileNotFoundException("Result for the jobId "\r
+ + workDirectory + " with file name " + clustFile\r
+ + " is not found!");\r
+ }\r
+ return SequenceUtil.readJRonn(cfile);\r