1 /* Copyright (c) 2011 Peter Troshin
\r
3 * JAva Bioinformatics Analysis Web Services (JABAWS) @version: 2.0
\r
5 * This library is free software; you can redistribute it and/or modify it under the terms of the
\r
6 * Apache License version 2 as published by the Apache Software Foundation
\r
8 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
\r
9 * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache
\r
10 * License for more details.
\r
12 * A copy of the license is in apache_license.txt. It is also available here:
\r
13 * @see: http://www.apache.org/licenses/LICENSE-2.0.txt
\r
15 * Any republication or derived work distributed in source code form
\r
16 * must include this copyright and license notice.
\r
19 package compbio.data.msa;
\r
21 import java.security.InvalidParameterException;
\r
22 import java.util.List;
\r
24 import javax.jws.WebParam;
\r
25 import javax.jws.WebService;
\r
27 import compbio.data.sequence.Alignment;
\r
28 import compbio.data.sequence.FastaSequence;
\r
29 import compbio.metadata.JobSubmissionException;
\r
30 import compbio.metadata.LimitExceededException;
\r
31 import compbio.metadata.Option;
\r
32 import compbio.metadata.Preset;
\r
33 import compbio.metadata.ResultNotAvailableException;
\r
34 import compbio.metadata.UnsupportedRuntimeException;
\r
35 import compbio.metadata.WrongParameterException;
\r
38 * Multiple Sequence Alignment (MSA) Web Services Interface
\r
42 * Date November 2010
\r
45 * executable type / web service type
\r
47 @WebService(targetNamespace = "http://msa.data.compbio/01/01/2010/")
\r
48 public interface MsaWS<T> extends JABAService, JManagement, Metadata<T> {
\r
51 * Align a list of sequences with default settings.
\r
53 * Any dataset containing a greater number of sequences or when the average
\r
54 * length of the sequences are greater then defined in the default Limit,
\r
55 * will not be accepted for an alignment operation and
\r
56 * JobSubmissionException will be thrown.
\r
59 * List of FastaSequence objects. The program does not perform
\r
60 * any sequence validity checks. Nor does it checks whether the
\r
61 * sequences names are unique. It is responsibility of the caller
\r
62 * to make sure of this
\r
63 * @return jobId - unique identifier for the job
\r
64 * @throws JobSubmissionException
\r
65 * is thrown when the job could not be submitted due to the
\r
66 * following reasons: 1) The number of sequences in the
\r
67 * submission or their average length is greater then defined by
\r
68 * the default Limit. 2) Any problems on the server side e.g. it
\r
69 * is misconfigured or malfunction, is reported via this
\r
70 * exception. In the first case the information on the limit
\r
71 * could be obtained from an exception.
\r
72 * @throws InvalidParameterException
\r
73 * thrown if input list of FASTA sequences is null or empty
\r
74 * @throws UnsupportedRuntimeException
\r
75 * thrown if server OS does not support native executables for a
\r
76 * given web service, e.g. JABAWS is deployed on Windows and
\r
77 * Mafft service is called
\r
78 * @throws LimitExceededException
\r
79 * is throw if the input sequences number or their average
\r
80 * length exceeds what is defined by the limit
\r
83 @WebParam(name = "fastaSequences") List<FastaSequence> sequences)
\r
84 throws UnsupportedRuntimeException, LimitExceededException,
\r
85 JobSubmissionException;
\r
88 * Align a list of sequences with options.
\r
92 * Default Limit is used to decide whether the calculation will be
\r
93 * permitted or denied
\r
96 * List of FastaSequence objects. The programme does not perform
\r
97 * any sequence validity checks. Nor does it checks whether the
\r
98 * sequences names are unique. It is responsibility of the caller
\r
99 * to validate this information
\r
101 * A list of Options
\r
102 * @return jobId - unique identifier for the job
\r
103 * @throws JobSubmissionException
\r
104 * is thrown when the job could not be submitted due to the
\r
105 * following reasons: 1) The number of sequences in the
\r
106 * submission or their average length is greater then defined by
\r
107 * the default Limit. 2) Any problems on the server side e.g. it
\r
108 * is misconfigured or malfunction, is reported via this
\r
109 * exception. In the first case the information on the limit
\r
110 * could be obtained from an exception.
\r
111 * @throws WrongParameterException
\r
112 * is throws when 1) One of the Options provided is not
\r
113 * supported, 2) The value of the option is defined outside the
\r
114 * boundaries. In both cases exception object contain the
\r
115 * information on the violating Option.
\r
116 * @throws InvalidParameterException
\r
117 * thrown if input list of FASTA sequence is null or empty
\r
118 * @throws UnsupportedRuntimeException
\r
119 * thrown if server OS does not support native executables for a
\r
120 * given web service, e.g. JABAWS is deployed on Windows and
\r
121 * Mafft service is called
\r
122 * @throws LimitExceededException
\r
123 * is throw if the input sequences number or their average
\r
124 * length exceeds what is defined by the limit
\r
126 String customAlign(
\r
127 @WebParam(name = "fastaSequences") List<FastaSequence> sequences,
\r
128 @WebParam(name = "options") List<Option<T>> options)
\r
129 throws UnsupportedRuntimeException, LimitExceededException,
\r
130 JobSubmissionException, WrongParameterException;
\r
133 * Align a list of sequences with preset.
\r
135 * Limit for a presetName is used whether the calculation will be permitted
\r
136 * or denied. If no Limit was defined for a presetName, than default limit
\r
140 * List of FastaSequence objects. The programme does not perform
\r
141 * any sequence validity checks. Nor does it checks whether the
\r
142 * sequences names are unique. It is responsibility of the caller
\r
143 * to validate this information
\r
145 * A list of Options
\r
146 * @return String - jobId - unique identifier for the job
\r
147 * @throws JobSubmissionException
\r
148 * is thrown when the job could not be submitted due to the
\r
149 * following reasons: 1) The number of sequences in the
\r
150 * submission or their average length is greater then defined by
\r
151 * the default Limit. 2) Any problems on the server side e.g. it
\r
152 * is misconfigured or malfunction, is reported via this
\r
153 * exception. In the first case the information on the limit
\r
154 * could be obtained from an exception.
\r
155 * @throws WrongParameterException
\r
156 * is throws when 1) One of the Options provided is not
\r
157 * supported, 2) The value of the option is defined outside the
\r
158 * boundaries. In both cases exception object contain the
\r
159 * information on the violating Option.
\r
160 * @throws InvalidParameterException
\r
161 * thrown if input list of FASTA sequence is null or empty
\r
162 * @throws UnsupportedRuntimeException
\r
163 * thrown if server OS does not support native executables for a
\r
164 * given web service, e.g. JABAWS is deployed on Windows and
\r
165 * Mafft service is called
\r
166 * @throws LimitExceededException
\r
167 * is throw if the input sequences number or average length
\r
168 * exceeds what is defined by the limit
\r
171 String presetAlign(
\r
172 @WebParam(name = "fastaSequences") List<FastaSequence> sequences,
\r
173 @WebParam(name = "preset") Preset<T> preset)
\r
174 throws UnsupportedRuntimeException, LimitExceededException,
\r
175 JobSubmissionException, WrongParameterException;
\r
178 * Return the result of the job. This method waits for the job
\r
179 * <code>jobId</code> to complete before return.
\r
182 * a unique job identifier
\r
183 * @return Alignment
\r
184 * @throws ResultNotAvailableException
\r
185 * this exception is throw if the job execution was not
\r
186 * successful or the result of the execution could not be found.
\r
187 * (e.g. removed). Exception could also be thrown due to the
\r
188 * lower level problems on the server i.e. IOException,
\r
189 * FileNotFoundException problems as well as
\r
190 * UnknownFileFormatException.
\r
191 * @throws InvalidParameterException
\r
192 * thrown if jobId is empty or is not recognised e.g. in invalid
\r
195 Alignment getResult(@WebParam(name = "jobId") String jobId)
\r
196 throws ResultNotAvailableException;
\r