List<String> args = new ArrayList<>();
args.add(command);
+ buildArguments(args, searchOutputFile, hitsAlignmentFile, hmmFile);
+
+ return runCommand(args);
+ }
+
+ /**
+ * Appends command line arguments to the given list, to specify input and
+ * output files for the search, and any additional options that may have been
+ * passed from the parameters dialog
+ *
+ * @param args
+ * @param searchOutputFile
+ * @param hitsAlignmentFile
+ * @param hmmFile
+ * @throws IOException
+ */
+ protected void buildArguments(List<String> args, File searchOutputFile,
+ File hitsAlignmentFile, File hmmFile) throws IOException
+ {
args.add("-o");
args.add(getFilePath(searchOutputFile));
args.add("-A");
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
args.add(getFilePath(hmmFile));
args.add(getFilePath(databaseFile));
-
- return runCommand(args);
}
/**