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 @@ ...@@ -4,7 +4,7 @@
* *
* This file is part of Artemis * 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 * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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; package uk.ac.sanger.artemis;
...@@ -41,7 +41,7 @@ import java.util.Enumeration; ...@@ -41,7 +41,7 @@ import java.util.Enumeration;
* and contains methods for invoking it. * and contains methods for invoking it.
* *
* @author Kim Rutherford * @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 public class ExternalProgram
...@@ -146,7 +146,8 @@ public class ExternalProgram ...@@ -146,7 +146,8 @@ public class ExternalProgram
// { // {
try 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(), String [] args = { "-f", file_of_filenames.getPath(),
"-cmd", getRealName(), "-cmd", getRealName(),
......
...@@ -129,6 +129,7 @@ public class SshPSUClient extends Thread ...@@ -129,6 +129,7 @@ public class SshPSUClient extends Thread
else if(cmd.equals("fastx") && settings.getProperty("fastx") != null) else if(cmd.equals("fastx") && settings.getProperty("fastx") != null)
cmd = settings.getProperty("fastx"); cmd = settings.getProperty("fastx");
boolean completed = false;
try try
{ {
// Setup a logfile // Setup a logfile
...@@ -265,7 +266,9 @@ public class SshPSUClient extends Thread ...@@ -265,7 +266,9 @@ public class SshPSUClient extends Thread
actualCMD = bsub+" -o "+ outputfile +" -e "+ outputfile + ".err " + actualCMD = bsub+" -o "+ outputfile +" -e "+ outputfile + ".err " +
cmd+" "+db+" "+wdir+filename; cmd+" "+db+" "+wdir+filename;
System.out.println(actualCMD); // run the application
if(System.getProperty("debug") != null)
System.out.println(actualCMD);
session.executeCommand(actualCMD); session.executeCommand(actualCMD);
// Reading from the session InputStream // Reading from the session InputStream
...@@ -307,17 +310,19 @@ public class SshPSUClient extends Thread ...@@ -307,17 +310,19 @@ public class SshPSUClient extends Thread
ioe.printStackTrace(); ioe.printStackTrace();
} }
// stdout if(System.getProperty("debug") != null)
System.out.println(stdouth.getOutput()); {
System.out.println(stderrh.getOutput()); // stdout & stderr
System.out.println(stdouth.getOutput());
System.out.println(stderrh.getOutput());
}
// ByteArrayOutputStream os = new ByteArrayOutputStream(); // ByteArrayOutputStream os = new ByteArrayOutputStream();
// sftp.get(outputfile, os); // sftp.get(outputfile, os);
// System.out.println(os.toString()); // System.out.println(os.toString());
sftp.get(outputfile, filepath+".out"); sftp.get(outputfile, filepath+".out");
completed = true;
session.close(); session.close();
} }
...@@ -335,7 +340,8 @@ public class SshPSUClient extends Thread ...@@ -335,7 +340,8 @@ public class SshPSUClient extends Thread
} catch(IOException ioe){} } catch(IOException ioe){}
finally finally
{ {
JOptionPane.showMessageDialog(null, if(completed)
JOptionPane.showMessageDialog(null,
"Finished \n" + program, "Finished \n" + program,
"Process Finished", "Process Finished",
JOptionPane.INFORMATION_MESSAGE); JOptionPane.INFORMATION_MESSAGE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment