import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
+import java.util.Scanner;
import javax.help.HelpSetException;
import javax.swing.JColorChooser;
{
frame.updateHMMERStatus(hmmerStatus);
}
+ if (hmmerStatus)
+ {
+ String ver = getHMMERVersion();
+ Cache.setProperty("HMMER_VERSION", ver);
+ }
trimTermini.setSelected(Cache.getDefault("TRIM_TERMINI", false));
return true;
}
+ private String getHMMERVersion()
+ {
+ File file = new File(hmmerPath.getText() + "/release-notes.txt");
+ Scanner scanner = null;
+ try
+ {
+ scanner = new Scanner(file);
+ } catch (IOException e)
+ {
+ e.printStackTrace();
+ return null;
+ }
+ scanner.next();
+ String res = scanner.next();
+ scanner.close();
+ return res;
+ }
+
private boolean validateHMMERPath()
{
return validateHMMERPath(true);
return false;
}
String command = cmds.HMMERFOLDER + cmds.HMMALIGN;
- if (!hmm.getFileHeader().contains("HMMER3/f"))
+ String version = Cache.getProperty("HMMER_VERSION");
+ if (!"3.1b2".equals(version))
{
command += cmds.ALLCOL;
}
{
command += cmds.TRIM;
}
- command += " -o" + inputTemp.getAbsolutePath() + cmds.SPACE
+ command += " -o " + inputTemp.getAbsolutePath() + cmds.SPACE
+ hmmTemp.getAbsolutePath() + cmds.SPACE
+ outTemp.getAbsolutePath();
return cmds.runCommand(command);