'STRAP:multiple sequence alignments '

charite.christo
Class AbstractExecutable

java.lang.Object
  extended by charite.christo.AbstractExecutable
All Implemented Interfaces:
CanBeStopped, ChRunnable, Disposable, HasControlPanel, HasSharedControlPanel, NeedsSharedInstance
Direct Known Subclasses:
NativeTools

public abstract class AbstractExecutable
extends Object
implements CanBeStopped, HasControlPanel, HasSharedControlPanel, Disposable, ChRunnable, NeedsSharedInstance

HELP

Introduction

For the default sequence and 3D alignment programs, WIKI:executables are included in STRAP - ready to use for Windows, Macintosh and Linux. The versions of these pre-compiled executables may not be up-to-date. STRAP provides a more general installation method for all external programs embedded in STRAP: Installation from WIKI:Source_code. This method is applicable to all embedded programs and ensures that the most recent version is installed. It may result in higher execution speed.

Two program packages are required on your PC to enable installation from source code: WIKI:compilers and WIKI:make_(software). If you are an expert you may enhance execution speed by specifying optimized compiler options.

Installing compilers

XXX

Adding support for C/C++ and Fortran to your system does not improve already installed programs unless they are deinstalled: Simply delete the respective folders in the directory ~/.StrapAlign/bin/.

Testing, whether compilers are already installed

Usually, the C-compiler is started with the command "cc" and the C++ compiler with the command "c++". Fortran compilers are started with "gfortran" or "f77" or "f95". If C++ is installed then typing into the command shell "c++" brings the output
c++: no input files
But the message
c++: command not found
indicates that either C++ is not installed yet or that the PATH-variable is not set correctly.


Field Summary
static String DEFAULT_BINARY
           
 
Fields inherited from interface charite.christo.interfaces.CanBeStopped
vALIGNMENTS
 
Fields inherited from interface charite.christo.interfaces.ChRunnable
APPEND, DOWNLOAD_FINISHED, INTERPRET_LINE, LOG, SET_ICON_IMAGE
 
Constructor Summary
AbstractExecutable()
           
 
Method Summary
static Class[] checkForUpdates(Class[] classes)
           
 File dirBinaries()
          The directory of the installed program.
 File dirTmp()
          temporary directory for transient data.
 void dispose()
           
 ChExec exec()
           
 boolean execNZ()
           
 void failedToLaunch()
          Show a message telling that the program could not be started
 File fileExecutable()
          The File of the executable.
 File fileIn()
          You can use this as your input file.
 File fileOut()
          You can use this as your output file.
 Container getControlPanel()
          returns the control panel of the Exec object.
 String getName()
           
 PanelCommandLineOptions getOptionPanel()
           
 String[] getOptionsAsStringArray()
           
 Container getSharedControlPanel()
          A Container containing GUI controles that are independent of a certain instance.
 Object getSharedInstance()
           
 byte[] getStderr()
          What the program wrote on stderr stream
 byte[] getStdout()
          What the program wrote on stdout stream
 void iniT()
           
static void installBioPerl()
          If BioPerl is not yet installed then install it or tell the user to do so.
 void installPackage()
           
static boolean isBioPerlInstalled()
           
static boolean isPerlInstalled()
           
 boolean isStopped()
          Download zip file and directory name and executable file name are derived from name()
static String msgInstallCompilers()
           
static String perlCommand()
           
 Object run(String id, Object arg)
          For internal use.
 void setBinaryPackageURLs(String... urlPipeFileExecutable)
          Set URL of the zip-archive for the program binary.
 void setCommandLineOptions(String[][] options, String ctrl)
           
 void setName(String n)
           
 void setSharedInstance(Object shared)
           
 String setSourceInstallationScript(String shell_script)
           
 void setSourcePackageURLs(String... urls)
          Set URL of the zip-archive for the program source.
 void stop()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_BINARY

public static final String DEFAULT_BINARY
See Also:
Constant Field Values
Constructor Detail

AbstractExecutable

public AbstractExecutable()
Method Detail

setName

public void setName(String n)

getName

public final String getName()

iniT

public final void iniT()

toString

public String toString()
Overrides:
toString in class Object

dispose

public void dispose()
Specified by:
dispose in interface Disposable

dirTmp

public final File dirTmp()
temporary directory for transient data. Will be deleted after the program session.


fileIn

public final File fileIn()
You can use this as your input file.


fileOut

public final File fileOut()
You can use this as your output file.


dirBinaries

public final File dirBinaries()
The directory of the installed program.


fileExecutable

public File fileExecutable()
The File of the executable. is name() plus dot "exe"


setBinaryPackageURLs

public void setBinaryPackageURLs(String... urlPipeFileExecutable)
Set URL of the zip-archive for the program binary. An array of alternative URLs can be provided. Each String may contain a list of required zip files. Each URL may be followed by a file path denoting a file inside the zip archive that is the exe file.


setSourcePackageURLs

public final void setSourcePackageURLs(String... urls)
Set URL of the zip-archive for the program source. An array of alternative URLs can be provided. Each String may contain a list of required zip files.


setSourceInstallationScript

public String setSourceInstallationScript(String shell_script)
Returns:
a shell script, usually a compile command. Type the string "C_COMPILER" instead of "gcc" and "C_PLUS_PLUS_COMPILER" instead of "g++".

installPackage

public void installPackage()

failedToLaunch

public final void failedToLaunch()
Show a message telling that the program could not be started


run

public Object run(String id,
                  Object arg)
For internal use. If override please make a call super.run(...)

Specified by:
run in interface ChRunnable

perlCommand

public static String perlCommand()
Returns:
usually "perl". If Windows and cygwin installed then returen the path to perl.exe

isPerlInstalled

public static boolean isPerlInstalled()

isBioPerlInstalled

public static boolean isBioPerlInstalled()

installBioPerl

public static void installBioPerl()
If BioPerl is not yet installed then install it or tell the user to do so.


getOptionPanel

public final PanelCommandLineOptions getOptionPanel()

getOptionsAsStringArray

public String[] getOptionsAsStringArray()

setCommandLineOptions

public void setCommandLineOptions(String[][] options,
                                  String ctrl)

getSharedControlPanel

public Container getSharedControlPanel()
A Container containing GUI controles that are independent of a certain instance.

Specified by:
getSharedControlPanel in interface HasSharedControlPanel

getControlPanel

public Container getControlPanel()
returns the control panel of the Exec object. Can be overridden.

Specified by:
getControlPanel in interface HasControlPanel

exec

public ChExec exec()

execNZ

public boolean execNZ()

getStdout

public final byte[] getStdout()
What the program wrote on stdout stream


getStderr

public final byte[] getStderr()
What the program wrote on stderr stream


isStopped

public boolean isStopped()
Download zip file and directory name and executable file name are derived from name()


stop

public void stop()
Specified by:
stop in interface CanBeStopped

setSharedInstance

public void setSharedInstance(Object shared)
Specified by:
setSharedInstance in interface NeedsSharedInstance

getSharedInstance

public Object getSharedInstance()
Specified by:
getSharedInstance in interface NeedsSharedInstance

checkForUpdates

public static Class[] checkForUpdates(Class[] classes)

msgInstallCompilers

public static String msgInstallCompilers()

'STRAP:multiple sequence alignments '

'The most important classes are StrapAlign, StrapProtein and StrapEvent.'