import jalview.ws.params.WsParamSetI;
import jalview.ws.params.simple.BooleanOption;
import jalview.ws.params.simple.DoubleParameter;
+import jalview.ws.params.simple.FileParameter;
import jalview.ws.params.simple.IntegerParameter;
import jalview.ws.params.simple.LogarithmicParameter;
import jalview.ws.params.simple.Option;
+import jalview.ws.params.simple.RadioChoiceParameter;
import jalview.ws.params.simple.StringParameter;
import java.io.File;
args.add(new BooleanOption(
MessageManager.getString(HMMSearch.AUTO_ALIGN_SEQS_KEY),
MessageManager.getString("label.auto_align_seqs_desc"), false,
- false, true, null));
+ false, false, null));
args.add(new BooleanOption(
MessageManager.getString(HMMSearch.USE_ACCESSIONS_KEY),
MessageManager.getString("label.use_accessions_desc"), false,
*/
addChoiceOfHmm(args);
- addChoiceOfDatabase(args);
-
+ // addChoiceOfDatabase(args);
+
+ String thisAlignment = MessageManager
+ .getString(HMMSearch.THIS_ALIGNMENT_KEY);
+ String database = MessageManager.getString("label.database");
+ args.add(new RadioChoiceParameter(
+ MessageManager.getString("action.search"), null,
+ Arrays.asList(thisAlignment,
+ database),
+ thisAlignment));
+ args.add(new FileParameter(database, "", false, "", ""));
args.add(new IntegerParameter(
MessageManager.getString(HMMSearch.NUMBER_OF_RESULTS_KEY),
MessageManager.getString("label.number_of_results_desc"), true,
100, 0, 100000));
- args.add(new StringParameter(
+ args.add(new RadioChoiceParameter(
MessageManager.getString(HMMSearch.REPORTING_CUTOFF_KEY), null,
- true, HMMSearch.CUTOFF_NONE, HMMSearch.CUTOFF_NONE,
Arrays.asList(HMMSearch.CUTOFF_NONE, HMMSearch.CUTOFF_EVALUE,
HMMSearch.CUTOFF_SCORE),
- null));
+ HMMSearch.CUTOFF_EVALUE));
args.add(new LogarithmicParameter(
MessageManager.getString(HMMSearch.SEQ_EVALUE_KEY),
MessageManager.getString("label.seq_e_value_desc"), false, 1D,
String seqScoreCutoff = null;
String domScoreCutoff = null;
databaseName = "Alignment";
+ boolean searchAlignment = false;
if (params != null)
{
{
seqsToReturn = Integer.parseInt(arg.getValue());
}
+ else if (MessageManager.getString("action.search").equals(name))
+ {
+ searchAlignment = arg.getValue().equals(
+ MessageManager.getString(HMMSearch.THIS_ALIGNMENT_KEY));
+ }
+ else if (MessageManager.getString(DATABASE_KEY).equals(name))
+ {
+ dbPath = arg.getValue();
+ int pos = dbPath.lastIndexOf(File.separator);
+ databaseName = dbPath.substring(pos + 1);
+ databaseFile = new File(dbPath);
+ }
else if (MessageManager.getString(AUTO_ALIGN_SEQS_KEY)
.equals(name))
{
args.add(domScoreCutoff);
}
- if (!dbFound || MessageManager.getString(THIS_ALIGNMENT_KEY)
- .equals(dbPath))
+// if (!dbFound || MessageManager.getString(THIS_ALIGNMENT_KEY)
+// .equals(dbPath))
+ if (searchAlignment)
{
/*
* no external database specified for search, so