List<ArgumentI> args = new ArrayList<>();
if ("hmmsearch".equals(name))
{
- args.add(new IntegerParameter(
- MessageManager.getString("label.number_of_results"),
- MessageManager
- .getString("label.number_of_results_desc"),
- true, 100, 0, 100000));
- String names = Cache.getProperty(Preferences.HMMSEARCH_DBS);
- if (names != null && !names.isEmpty())
- {
- Collection<String> databases = new ArrayList<>();
- databases.add(MessageManager.getString("label.this_alignment"));
- Scanner nameScanner = new Scanner(names);
-
- if (nameScanner.hasNext())
- {
- while (nameScanner.hasNext())
- {
- String next = nameScanner.next();
- if (next == "null")
- {
- Cache.setProperty(Preferences.HMMSEARCH_DBS, "");
- Cache.setProperty(Preferences.HMMSEARCH_DB_PATHS, "");
- }
- else
- {
- databases.add(next);
- }
- }
- }
- nameScanner.close();
- args.add(new Option(MessageManager.getString("label.database"),
- MessageManager.getString("label.database_for_hmmsearch"),
- true, MessageManager.getString("label.this_alignment"),
- MessageManager.getString("label.this_alignment"), databases,
- null));
- }
- args.add(new BooleanOption(
- MessageManager.getString("label.auto_align_seqs"),
- MessageManager.getString("label.auto_align_seqs_desc"),
- false, false, true, null));
- args.add(new BooleanOption(
- MessageManager.getString("label.use_accessions"),
- MessageManager.getString("label.use_accessions_desc"),
- false, false, true, null));
- args.add(new BooleanOption(
- MessageManager.getString("label.trim_termini"),
- MessageManager.getString("label.trim_termini_desc"), false,
- false, true, null));
- args.add(new LogarithmicParameter(
- MessageManager.getString("label.seq_e_value"),
- MessageManager.getString("label.seq_e_value_desc"), false,
- 0.001d, -63d, 9d, 4d));
- /*
- args.add(new DoubleParameter(
- MessageManager.getString("label.seq_score"),
- MessageManager.getString("label.seq_score_desc"), false,
- 0d, 0d, 10000d));
- */
- args.add(new LogarithmicParameter(
- MessageManager.getString("label.dom_e_value_desc"),
- MessageManager.getString("label.dom_e_value_desc"), false,
- 0.001d, -63d, 9d, 4d));
- /*
- args.add(new DoubleParameter(
- MessageManager.getString("label.dom_score"),
- MessageManager.getString("label.dom_score_desc"), false, 0d,
- 0d,
- 10000d));
- */
+ getHMMSearchParams(args);
}
if ("hmmalign".equals(name))
{
- args.add(new BooleanOption(
- MessageManager.getString("label.trim_termini"),
- MessageManager.getString(
- "label.trim_termini = Trim Non-Matching Termini_desc"),
- false, false, true, null));
+ getHMMAlignParams(args);
}
if ("hmmbuild".equals(name))
{
- args.add(new BooleanOption(
- MessageManager.getString("label.trim_termini"),
- MessageManager.getString(
- "label.trim_termini = Trim Non-Matching Termini_desc"),
- false, false, true, null));
+
}
return args;
}
+ private void getHMMSearchParams(List<ArgumentI> args)
+ {
+ args.add(new IntegerParameter(
+ MessageManager.getString("label.number_of_results"),
+ MessageManager.getString("label.number_of_results_desc"), true,
+ 100, 0, 100000));
+ String names = Cache.getProperty(Preferences.HMMSEARCH_DBS);
+ if (names != null && !names.isEmpty())
+ {
+ Collection<String> databases = new ArrayList<>();
+ databases.add(MessageManager.getString("label.this_alignment"));
+ Scanner nameScanner = new Scanner(names);
+
+ if (nameScanner.hasNext())
+ {
+ while (nameScanner.hasNext())
+ {
+ String next = nameScanner.next();
+ if (next == "null")
+ {
+ Cache.setProperty(Preferences.HMMSEARCH_DBS, "");
+ Cache.setProperty(Preferences.HMMSEARCH_DB_PATHS, "");
+ }
+ else
+ {
+ databases.add(next);
+ }
+ }
+ }
+ nameScanner.close();
+ args.add(new Option(MessageManager.getString("label.database"),
+ MessageManager.getString("label.database_for_hmmsearch"),
+ true, MessageManager.getString("label.this_alignment"),
+ MessageManager.getString("label.this_alignment"), databases,
+ null));
+ }
+ args.add(new BooleanOption(
+ MessageManager.getString("label.auto_align_seqs"),
+ MessageManager.getString("label.auto_align_seqs_desc"), false,
+ false, true, null));
+ args.add(new BooleanOption(
+ MessageManager.getString("label.use_accessions"),
+ MessageManager.getString("label.use_accessions_desc"), false,
+ false, true, null));
+ args.add(new BooleanOption(
+ MessageManager.getString("label.trim_termini"),
+ MessageManager.getString("label.trim_termini_desc"), false,
+ false, true, null));
+ args.add(new LogarithmicParameter(
+ MessageManager.getString("label.seq_e_value"),
+ MessageManager.getString("label.seq_e_value_desc"), false,
+ -9.96578, -126d, 3.3219d, 2d));
+ /*
+ args.add(new DoubleParameter(
+ MessageManager.getString("label.seq_score"),
+ MessageManager.getString("label.seq_score_desc"), false,
+ 0d, 0d, 10000d));
+ */
+ args.add(new LogarithmicParameter(
+ MessageManager.getString("label.dom_e_value_desc"),
+ MessageManager.getString("label.dom_e_value_desc"), false,
+ -9.96578, -126d, 3.3219d, 2d));
+ /*
+ args.add(new DoubleParameter(
+ MessageManager.getString("label.dom_score"),
+ MessageManager.getString("label.dom_score_desc"), false, 0d,
+ 0d,
+ 10000d));
+ */
+ }
+
+ private void getHMMAlignParams(List<ArgumentI> args)
+ {
+ args.add(new BooleanOption(
+ MessageManager.getString("label.trim_termini"),
+ MessageManager.getString(
+ "label.trim_termini = Trim Non-Matching Termini_desc"),
+ false, false, true, null));
+ }
+
@Override
public boolean presetExists(String name)
{