|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.ac.ebi.intact.application.intSeq.business.RunSimilaritySearch
This class manages the multiple alignment algorithm command line, defined in
the web.xml file (it can be wu-blast, ncbi-blast or fasta).
It makes two different ManagerFiles:
* the input file which contains the query protein sequence.
* the output file which contains the result.
The parsing method required for this kind of output file is called.
These two files are randomly created, and afterwards, they are deleted because this
web application is intended to be multi-user.
| Field Summary | |
protected java.lang.String |
command
command line required to manage the blast program. |
protected double |
evalueMin
E-Value initialized at "0" to make a test afterwards. |
protected ManagerFilesBlast |
fileInput
the both ManagerFiles -> 1 input file and 1 output file for each execution of BLAST or FASTA |
protected ManagerFilesBlast |
fileOutput
|
protected java.lang.String |
sequence
protein sequence written in the input file |
| Constructor Summary | |
RunSimilaritySearch(java.lang.String seq,
java.lang.String command,
double eValue)
constructor which retrieves the Evalue minimum, required to validate the results, in addition to the command line and the protein sequence. |
|
| Method Summary | |
protected boolean |
ExecBlast()
FillSeqFileConcatCommand
1) creates and full the input file, and also complete the command line. |
protected void |
FillSeqFileConcatCommand(java.lang.String inputDir,
boolean input)
This method creates a random file name in the good directory: input files and output files are managed in two different directories. |
boolean |
GetCommandExecResponse()
keep inform the Action Class whether the command line was executed well or not. |
static long |
getId()
Returns the unique id based on the current time; the ids are unique for a session. |
java.lang.String |
getSequence()
|
protected void |
OutputProcessManagement(java.lang.Object stream,
boolean in)
This method manages the output stream of a process: limited buffer size: the process needs that a bufferReader reads the screen output stream and the error output stream. |
protected java.util.ArrayList |
ParamTest(int indexTab,
java.util.ArrayList alignResults)
This method tests if the evalue is smaller than the constant defined in the web.xml file, which means that the alignment is acceptable. |
java.util.ArrayList |
RetrieveParseResult()
In case of a good blast execution, the output blast file would be parsed. |
protected boolean |
SearchOptionTab(java.lang.String split,
java.util.ArrayList options)
This method splits the command line according to the spaces, and retrieve an item in it. |
void |
setSequence(java.lang.String seq)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String command
protected java.lang.String sequence
protected double evalueMin
protected ManagerFilesBlast fileInput
protected ManagerFilesBlast fileOutput
| Constructor Detail |
public RunSimilaritySearch(java.lang.String seq,
java.lang.String command,
double eValue)
seq - String the protein sequence in the Fasta formatcommand - String the multiple alignment program will be launched by this command lineeValue - double remind the maximum E-Value allowed in the result file| Method Detail |
public static long getId()
public java.lang.String getSequence()
public void setSequence(java.lang.String seq)
public boolean GetCommandExecResponse()
GetCommandExecResponse in interface RunSimilaritySearchIF
public java.util.ArrayList RetrieveParseResult()
throws IntactException
RetrieveParseResult in interface RunSimilaritySearchIFIntactException
protected boolean ExecBlast()
throws IntactException
FillSeqFileConcatCommand
1) creates and full the input file, and also complete the command line.
2) creates the output file, and also complete the command line.
Runtime
3) processes the command line created.
When Runtime.exec() isn't, the subprocess might be block or deadlock:
if the program launched produces output, ensure that the InputStream
is immediately processed.
IntactException
protected void FillSeqFileConcatCommand(java.lang.String inputDir,
boolean input)
throws IntactException
inputDir - String which describes the relative path of the file to create.input - boolean which informs whether the file to manage with the command line
is the input file or the output file.
IntactException
protected boolean SearchOptionTab(java.lang.String split,
java.util.ArrayList options)
split - String "regex" according to which the line will be splitted.options - List which contains String to retrieve in the line already splitted.
protected void OutputProcessManagement(java.lang.Object stream,
boolean in)
stream - manage this screen output stream with the appropriate object.in - boolean to specify if the previous Object parameter is an InputStream
or an OutputStream.
protected java.util.ArrayList ParamTest(int indexTab,
java.util.ArrayList alignResults)
indexTab - int which corresponds to the "evalue column" in the tabular output file.alignResults - List which contains all the results from the parsing of the output file.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||