}
private static String getPathToCmd() {
- //TODO this needs to come from env variable, etc.
+ //TODO this needs to come from config file!!
//FIXME ..
//should not be in this class!
String path = "";
path = "C:\\Program Files\\mafft-win\\mafft.bat";
}
else {
- path = "/home/czmasek/SOFTWARE/MSA/MAFFT/mafft-6.864-without-extensions/scripts/mafft";
+ path = "/home/czmasek/bin/mafft";
}
return path;
}
my_opts.add( path_to_input_seqs.getAbsolutePath() );
final SystemCommandExecutor command_executor = new SystemCommandExecutor( my_opts );
final int _exit_code = command_executor.executeCommand();
+ final StringBuilder stderr = command_executor.getStandardErrorFromCommand();
+ _error = stderr.toString();
if ( _exit_code != 0 ) {
- throw new IOException( "MAFFT program failed, exit code: " + _exit_code + ", command: " + my_opts );
+ throw new IOException( "MAFFT program failed, exit code: " + _exit_code + "\nCommand:\n" + my_opts
+ + "\nError:\n" + stderr );
}
final StringBuilder stdout = command_executor.getStandardOutputFromCommand();
- final StringBuilder stderr = command_executor.getStandardErrorFromCommand();
if ( ( stdout == null ) || ( stdout.length() < 2 ) ) {
- throw new IOException( "MAFFT program did not produce any output, command: " + my_opts );
+ throw new IOException( "MAFFT program did not produce any output\nCommand:\n" + my_opts + "\nError:\n"
+ + stderr );
}
- _error = stderr.toString();
final Msa msa = FastaParser.parseMsa( stdout.toString() );
return msa;
}