public class ClustalWS extends java.lang.Object implements MsaWS<ClustalW>
Modifier and Type | Field and Description |
---|---|
private static RunnerConfig<ClustalW> |
clustalOptions |
private static PresetManager<ClustalW> |
clustalPresets |
private static LimitsManager<ClustalW> |
limitMan |
private static org.apache.log4j.Logger |
log |
JABAWS_VERSION, SERVICE_NAMESPACE, V2_SERVICE_NAMESPACE, V3_SERVICE_NAMESPACE
Constructor and Description |
---|
ClustalWS() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
align(java.util.List<FastaSequence> sequences)
Align a list of sequences with default settings.
|
boolean |
cancelJob(java.lang.String jobId)
Stop running the job
jobId but leave its output untouched |
java.lang.String |
customAlign(java.util.List<FastaSequence> sequences,
java.util.List<Option<ClustalW>> options)
Align a list of sequences with options.
|
JobStatus |
getJobStatus(java.lang.String jobId)
Return the status of the job.
|
Limit<ClustalW> |
getLimit(java.lang.String presetName)
Get a Limit for a preset.
|
LimitsManager<ClustalW> |
getLimits()
List Limits supported by a web service.
|
PresetManager<ClustalW> |
getPresets()
Get presets supported by a web service
|
Alignment |
getResult(java.lang.String jobId)
Return the result of the job.
|
RunnerConfig<ClustalW> |
getRunnerOptions()
Get options supported by a web service
|
(package private) ConfiguredExecutable<ClustalW> |
init(java.util.List<FastaSequence> dataSet) |
java.lang.String |
presetAlign(java.util.List<FastaSequence> sequences,
Preset<ClustalW> preset)
Align a list of sequences with preset.
|
ChunkHolder |
pullExecStatistics(java.lang.String jobId,
long position)
Reads 1kb chunk from the statistics file which is specific to a given web
service from the
position . |
private static org.apache.log4j.Logger log
private static final RunnerConfig<ClustalW> clustalOptions
private static final PresetManager<ClustalW> clustalPresets
private static final LimitsManager<ClustalW> limitMan
public java.lang.String align(java.util.List<FastaSequence> sequences) throws JobSubmissionException
MsaWS
align
in interface MsaWS<ClustalW>
sequences
- List of FastaSequence objects. The program does not perform
any sequence validity checks. Nor does it checks whether the
sequences names are unique. It is responsibility of the caller
to make sure of thisJobSubmissionException
- is thrown when the job could not be submitted due to the
following reasons: 1) The number of sequences in the
submission or their average length is greater then defined by
the default Limit. 2) Any problems on the server side e.g. it
is misconfigured or malfunction, is reported via this
exception. In the first case the information on the limit
could be obtained from an exception.UnsupportedRuntimeException
- thrown if server OS does not support native executables for a
given web service, e.g. JABAWS is deployed on Windows and
Mafft service is calledLimitExceededException
- is throw if the input sequences number or their average
length exceeds what is defined by the limitConfiguredExecutable<ClustalW> init(java.util.List<FastaSequence> dataSet) throws JobSubmissionException
JobSubmissionException
public java.lang.String presetAlign(java.util.List<FastaSequence> sequences, Preset<ClustalW> preset) throws JobSubmissionException, WrongParameterException
MsaWS
presetAlign
in interface MsaWS<ClustalW>
sequences
- List of FastaSequence objects. The programme does not perform
any sequence validity checks. Nor does it checks whether the
sequences names are unique. It is responsibility of the caller
to validate this informationpreset
- A list of OptionsJobSubmissionException
- is thrown when the job could not be submitted due to the
following reasons: 1) The number of sequences in the
submission or their average length is greater then defined by
the default Limit. 2) Any problems on the server side e.g. it
is misconfigured or malfunction, is reported via this
exception. In the first case the information on the limit
could be obtained from an exception.UnsupportedRuntimeException
- thrown if server OS does not support native executables for a
given web service, e.g. JABAWS is deployed on Windows and
Mafft service is calledLimitExceededException
- is throw if the input sequences number or average length
exceeds what is defined by the limitWrongParameterException
- is throws when 1) One of the Options provided is not
supported, 2) The value of the option is defined outside the
boundaries. In both cases exception object contain the
information on the violating Option.Preset
public java.lang.String customAlign(java.util.List<FastaSequence> sequences, java.util.List<Option<ClustalW>> options) throws JobSubmissionException, WrongParameterException
MsaWS
customAlign
in interface MsaWS<ClustalW>
sequences
- List of FastaSequence objects. The programme does not perform
any sequence validity checks. Nor does it checks whether the
sequences names are unique. It is responsibility of the caller
to validate this informationoptions
- A list of OptionsJobSubmissionException
- is thrown when the job could not be submitted due to the
following reasons: 1) The number of sequences in the
submission or their average length is greater then defined by
the default Limit. 2) Any problems on the server side e.g. it
is misconfigured or malfunction, is reported via this
exception. In the first case the information on the limit
could be obtained from an exception.UnsupportedRuntimeException
- thrown if server OS does not support native executables for a
given web service, e.g. JABAWS is deployed on Windows and
Mafft service is calledLimitExceededException
- is throw if the input sequences number or their average
length exceeds what is defined by the limitWrongParameterException
- is throws when 1) One of the Options provided is not
supported, 2) The value of the option is defined outside the
boundaries. In both cases exception object contain the
information on the violating Option.Default Limit is used to decide whether the calculation will be
permitted or denied
public RunnerConfig<ClustalW> getRunnerOptions()
Metadata
getRunnerOptions
in interface Metadata<ClustalW>
public Alignment getResult(java.lang.String jobId) throws ResultNotAvailableException
MsaWS
jobId
to complete before return.getResult
in interface MsaWS<ClustalW>
jobId
- a unique job identifierResultNotAvailableException
- this exception is throw if the job execution was not
successful or the result of the execution could not be found.
(e.g. removed). Exception could also be thrown due to the
lower level problems on the server i.e. IOException,
FileNotFoundException problems as well as
UnknownFileFormatException.public Limit<ClustalW> getLimit(java.lang.String presetName)
Metadata
public LimitsManager<ClustalW> getLimits()
Metadata
public boolean cancelJob(java.lang.String jobId)
JManagement
jobId
but leave its output untouchedcancelJob
in interface JManagement
public JobStatus getJobStatus(java.lang.String jobId)
JManagement
getJobStatus
in interface JManagement
jobId
- - unique job identifierJobStatus
public PresetManager<ClustalW> getPresets()
Metadata
getPresets
in interface Metadata<ClustalW>
public ChunkHolder pullExecStatistics(java.lang.String jobId, long position)
JManagement
position
. If in time of a request less then
1kb data is available from the position to the end of the file, then it
returns all the data available from the position to the end of the file.pullExecStatistics
in interface JManagement
jobId
- - unique job identifierposition
- - next position within the file to readChunkHolder