label.hmmbuild_group = Build HMM from Selected Group
label.group_hmmbuild = Build HMM from Group
label.hmmsearch = hmmsearch
-label.change_hmmer_location = HMMER Installation Location
+label.change_hmmer_location = HMMER Binaries Installation Location
warn.null_hmm = Please ensure the alignment contains a hidden Markov model.
label.ignore_below_background_frequency = Ignore Below Background Frequency
label.information_description = Information content, measured in bits
-label.enter_location = Please enter the path of your HMMER folder.
+label.enter_location = Please enter the path of your HMMER binaries folder.
label.invalid_hmmer_folder = The folder that you selected does not contain the necessary HMMER binaries.
warn.no_selected_hmm = Please select a hidden Markov model sequence.
label.select_hmm = Select HMM
warn.hmmbuild_failed = hmmbuild was not found.
warn.align_failed = hmmalign was not found.
label.invalid_folder = Invalid Folder
-label.folder_not_exists = HMMER not found. \n Please enter the path to HMMER (if installed).
+label.folder_not_exists = HMMER binaries not found. \n Please enter the path to the HMMER binaries (if installed).
label.hmmer_installed = HMMER installed
\ No newline at end of file
{
int missing = 0;
String message = "";
- String path = hmmerPath.getText().trim();
- if (path.length() > 0)
+ String folder = hmmerPath.getText().trim();
+ if (folder.length() > 0)
{
- File f = new File(path);
+ File f = new File(folder);
if (!f.exists())
{
if (showDialog)
}
return false;
}
-
- File hmmbuild = new File(path + "/binaries/hmmbuild");
- {
- if (!hmmbuild.canExecute())
+ if (!canExecute(folder + "/hmmbuild"))
{
message += MessageManager.getString("label.hmmbuild_not_found")
+ "\n";
missing++;
}
- }
- File hmmalign = new File(path + "/binaries/hmmalign");
- {
- if (!hmmalign.canExecute())
+
+ if (!canExecute(folder + "/hmmalign"))
{
message += MessageManager.getString("label.hmmalign_not_found")
+ "\n";
missing++;
}
- }
- File hmmsearch = new File(path + "/binaries/hmmsearch");
- {
- if (!hmmsearch.canExecute())
+
+ if (!canExecute(folder + "/hmmsearch"))
{
message += MessageManager.getString("label.hmmsearch_not_found")
+ "\n";
}
}
+ return true;
+ }
+
+ /**
+ * Checks if a file can be executed
+ *
+ * @param path
+ * the path to the file
+ * @return
+ */
+ public boolean canExecute(String path)
+ {
+ File file = new File(path);
+ if (!file.canExecute())
+ {
+ file = new File(path + ".exe");
+ {
+ if (!file.canExecute())
+ {
+ return false;
+ }
+ }
}
return true;
}
+ /**
+ * Gets the current version of hmmer
+ *
+ * @return
+ */
private String getHMMERVersion()
{
File file = new File(hmmerPath.getText() + "/release-notes");
private boolean runCommand() throws IOException, InterruptedException
{
- File file = new File(cmds.HMMERFOLDER + "/binaries/hmmalign");
+ File file = new File(cmds.HMMERFOLDER + "/hmmalign");
if (!file.canExecute())
{
- return false;
+ file = new File(cmds.HMMERFOLDER + "/hmmalign.exe");
+ {
+ if (!file.canExecute())
+ {
+ return false;
+ }
+ }
}
String command = cmds.HMMERFOLDER + cmds.HMMALIGN;
String version = Cache.getProperty("HMMER_VERSION");
private boolean runCommand() throws IOException, InterruptedException
{
- File file = new File(cmds.HMMERFOLDER + "/binaries/hmmbuild");
+ File file = new File(cmds.HMMERFOLDER + "/hmmbuild");
if (!file.canExecute())
{
- return false;
+ file = new File(cmds.HMMERFOLDER + "/hmmbuild.exe");
+ {
+ if (!file.canExecute())
+ {
+ return false;
+ }
+ }
}
String command = cmds.HMMERFOLDER + cmds.HMMBUILD + cmds.NAME;
if (forGroup)
public String JALVIEWDIRECTORY = System.getProperty("user.dir")
+ "/";
- public final String HMMALIGN = "/binaries/hmmalign ";
+ public final String HMMALIGN = "/hmmalign ";
- public final String HMMBUILD = "/binaries/hmmbuild ";
+ public final String HMMBUILD = "/hmmbuild ";
- public final String HMMSEARCH = "/binaries/hmmsearch ";
+ public final String HMMSEARCH = "/hmmsearch ";
public String HMMBUFFER;