- /**\r
- * Calls alignment with preset\r
- * \r
- * @param <T>\r
- * @param msaws\r
- * @param presets\r
- * list of the Preset\r
- * @throws UnsupportedRuntimeException\r
- */\r
- static <T> boolean presetAlign(MsaWS<T> msaws, List<Preset<T>> presets)\r
- throws UnsupportedRuntimeException {\r
- boolean succeed = false;\r
- for (Preset<T> preset : presets) {\r
- System.out.print("Aligning with preset '" + preset.getName()\r
- + "'... ");\r
- Alignment al = null;\r
- try {\r
- String taskId = msaws.presetAlign(seqs, preset);\r
- al = msaws.getResult(taskId);\r
- if (al != null) {\r
- System.out.println(OK);\r
+ /**\r
+ * Calls alignment with preset\r
+ * \r
+ * @param <T>\r
+ * @param msaws\r
+ * @param presets\r
+ * list of the Preset\r
+ * @throws UnsupportedRuntimeException\r
+ */\r
+ static <T> boolean presetAlign(MsaWS<T> msaws, List<Preset<T>> presets)\r
+ throws UnsupportedRuntimeException {\r
+ boolean succeed = false;\r
+ for (Preset<T> preset : presets) {\r
+ System.out.print("Aligning with preset '" + preset.getName()\r
+ + "'... ");\r
+ Alignment al = null;\r
+ try {\r
+ String taskId = msaws.presetAlign(seqs, preset);\r
+ al = msaws.getResult(taskId);\r
+ if (al != null) {\r
+ System.out.println(OK);\r
+ }\r
+ succeed = true;\r
+ } catch (UnsupportedRuntimeException e) {\r
+ System.out.println(FAILED);\r
+ // If executable is not supported than none of the presets are\r
+ // going to work\r
+ throw new UnsupportedRuntimeException(e);\r
+ } catch (JobSubmissionException e) {\r
+ // TODO custom message\r
+ System.out.println(FAILED);\r
+ System.out.println();\r
+ e.printStackTrace();\r
+ continue;\r
+ } catch (WrongParameterException e) {\r
+ // TODO custom message\r
+ System.out.println(FAILED);\r
+ System.out.println();\r
+ e.printStackTrace();\r
+ continue;\r
+ } catch (ResultNotAvailableException e) {\r
+ // TODO custom message\r
+ System.out.println(FAILED);\r
+ System.out.println();\r
+ e.printStackTrace();\r
+ continue;\r
+ }\r