package jalview.hmmer;
import jalview.analysis.SeqsetUtils;
+import jalview.analysis.SeqsetUtils.SequenceInfo;
import jalview.bin.Cache;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentAnnotation;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
/**
* Base class for hmmbuild, hmmalign and hmmsearch
*
* @param seqs
*/
- protected Hashtable stashSequences(SequenceI[] seqs)
+ protected Map<String, SequenceInfo> stashSequences(SequenceI[] seqs)
{
return SeqsetUtils.uniquify(seqs, true);
}
/**
* Restores the sequence data lost by uniquifying
*
- * @param hashtable
+ * @param sequencesHash
* @param seqs
*/
- protected void recoverSequences(Hashtable hashtable, SequenceI[] seqs)
+ protected void recoverSequences(Map<String, SequenceInfo> sequencesHash, SequenceI[] seqs)
{
- SeqsetUtils.deuniquify(hashtable, seqs);
+ SeqsetUtils.deuniquify(sequencesHash, seqs);
}
/**
public boolean runCommand(List<String> commands)
throws IOException
{
- List<String> args = Platform.isWindows() ? wrapWithCygwin(commands)
+ List<String> args = Platform.isWindowsAndNotJS() ? wrapWithCygwin(commands)
: commands;
try
{
ProcessBuilder pb = new ProcessBuilder(args);
pb.redirectErrorStream(true); // merge syserr to sysout
- if (Platform.isWindows())
+ if (Platform.isWindowsAndNotJS())
{
String path = pb.environment().get("Path");
path = jalview.bin.Cache.getProperty("CYGWIN_PATH") + ";" + path;
protected String getFilePath(File resultFile, boolean isInCygwin)
{
String path = resultFile.getAbsolutePath();
- if (Platform.isWindows() && isInCygwin)
+ if (Platform.isWindowsAndNotJS() && isInCygwin)
{
// the first backslash escapes '\' for the regular expression argument
path = path.replaceAll("\\" + File.separator, "/");