public static final String STRUCTURE_DISPLAY = "STRUCTURE_DISPLAY";
public static final String CHIMERA_PATH = "CHIMERA_PATH";
+
+ public static final String HMMER_PATH = "HMMER_PATH";
public static final String SORT_ANNOTATIONS = "SORT_ANNOTATIONS";
frame.setMinimumSize(new Dimension(width, height));
/*
+ * Set HMMER tab defaults
+ */
+ trimTermini.setSelected(Cache.getDefault("TRIM_TERMINI", false));
+ if (Cache.getDefault("USE_UNIPROT", false))
+ {
+ uniprot.setSelected(true);
+ }
+ else
+ {
+ alignment.setSelected(true);
+ }
+ numberOfSequencesToKeepField
+ .setText(Cache.getProperty("SEQUENCES_TO_KEEP"));
+ installationLocationField.setText(Cache.getProperty(HMMER_PATH));
+
+ /*
* Set Visual tab defaults
*/
seqLimit.setSelected(Cache.getDefault("SHOW_JVSUFFIX", true));
maxColour.getBackground());
/*
+ * Save HMMER settings
+ */
+ Cache.applicationProperties.setProperty("TRIM_TERMINI",
+ Boolean.toString(trimTermini.isSelected()));
+ Cache.applicationProperties.setProperty("USE_UNIPROT",
+ Boolean.toString(uniprot.isSelected()));
+ Cache.applicationProperties.setProperty("SEQUENCES_TO_KEEP",
+ numberOfSequencesToKeepField.getText());
+ Cache.applicationProperties.setProperty(HMMER_PATH,
+ installationLocationField.getText());
+ trimTermini.setSelected(Cache.getDefault("TRIM_TERMINI", false));
+ if (Cache.getDefault("USE_UNIPROT", false))
+ {
+ uniprot.setSelected(true);
+ }
+ else
+ {
+ alignment.setSelected(true);
+ }
+ numberOfSequencesToKeepField
+ .setText(Cache.getProperty("SEQUENCES_TO_KEEP"));
+ installationLocationField.setText(Cache.getProperty(HMMER_PATH));
+
+ /*
* Save Structure settings
*/
Cache.applicationProperties.setProperty(ADD_TEMPFACT_ANN,
}
return true;
}
+
+ /**
+ * Returns true if hmmer path contains the necessary valid executables, else show an error
+ * dialog.
+ */
+ private boolean validateHMMERPath()
+ {
+ String path = Cache.getProperty("HMMERPATH");
+ if (path.length() > 0)
+ {
+ File f = new File(path);
+ if (!f.canExecute())
+ {
+ JvOptionPane.showInternalMessageDialog(Desktop.desktop,
+ MessageManager.getString("label.invalid_hmmer_folder"),
+ MessageManager.getString("Invalid folder"),
+ JvOptionPane.ERROR_MESSAGE);
+ return false;
+ }
+ }
+ return true;
+ }
/**
* If Chimera is selected, check it can be found on default or user-specified