Skip to content
Snippets Groups Projects
Commit 096a4fa3 authored by tjc's avatar tjc
Browse files

set j2ssh for fasta and blast only

git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@3387 ee4ac58c-ac51-4696-9907-e4b3aa274f04
parent 479bc3f6
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
*
* This file is part of Artemis
*
* Copyright(C) 1998-2003 Genome Research Limited
* Copyright(C) 1998-2005 Genome Research Limited
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
......@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/ExternalProgram.java,v 1.4 2005-08-12 09:10:25 tjc Exp $
* $Header: //tmp/pathsoft/artemis/uk/ac/sanger/artemis/ExternalProgram.java,v 1.5 2005-08-12 16:01:48 tjc Exp $
**/
package uk.ac.sanger.artemis;
......@@ -41,7 +41,7 @@ import java.util.Enumeration;
* and contains methods for invoking it.
*
* @author Kim Rutherford
* @version $Id: ExternalProgram.java,v 1.4 2005-08-12 09:10:25 tjc Exp $
* @version $Id: ExternalProgram.java,v 1.5 2005-08-12 16:01:48 tjc Exp $
**/
public class ExternalProgram
......@@ -146,7 +146,8 @@ public class ExternalProgram
// {
try
{
if(System.getProperty("j2ssh") != null)
if( System.getProperty("j2ssh") != null &&
(getRealName().indexOf("blast") > -1 || getRealName().startsWith("fast")) )
{
String [] args = { "-f", file_of_filenames.getPath(),
"-cmd", getRealName(),
......
......@@ -129,6 +129,7 @@ public class SshPSUClient extends Thread
else if(cmd.equals("fastx") && settings.getProperty("fastx") != null)
cmd = settings.getProperty("fastx");
boolean completed = false;
try
{
// Setup a logfile
......@@ -265,6 +266,8 @@ public class SshPSUClient extends Thread
actualCMD = bsub+" -o "+ outputfile +" -e "+ outputfile + ".err " +
cmd+" "+db+" "+wdir+filename;
// run the application
if(System.getProperty("debug") != null)
System.out.println(actualCMD);
session.executeCommand(actualCMD);
......@@ -307,17 +310,19 @@ public class SshPSUClient extends Thread
ioe.printStackTrace();
}
// stdout
if(System.getProperty("debug") != null)
{
// stdout & stderr
System.out.println(stdouth.getOutput());
System.out.println(stderrh.getOutput());
}
// ByteArrayOutputStream os = new ByteArrayOutputStream();
// sftp.get(outputfile, os);
// System.out.println(os.toString());
sftp.get(outputfile, filepath+".out");
completed = true;
session.close();
}
......@@ -335,6 +340,7 @@ public class SshPSUClient extends Thread
} catch(IOException ioe){}
finally
{
if(completed)
JOptionPane.showMessageDialog(null,
"Finished \n" + program,
"Process Finished",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment