/**\r
* Sequences to be used as input for all WS\r
*/\r
- public static final String fastaInput = ">Foo\n"\r
+ public static final String fastaInput2records = ">Foo\n"\r
+ "MTADGPRELLQLRAAVRHRPQDFVAWLMLADAELGMGDTTAGEMAVQRGLALHPGHPEAV"\r
+ "\n>Bar\n"\r
+ "ASDAAPEHPGIALWLHALEDAGQAEAAAAYTRAHQLLPEEPYITAQLLNAVA\n";\r
+ public static final String fastaInput1record = ">Foo\n"\r
+ + "MTADGPRELLQLRAAVRHRPQDFVAWLMLADAELGMGDTTAGEMAVQRGLALHPGHPEAV"\r
+ + "\n";\r
\r
public static final String fastaAlignment = ">Foo\n"\r
+ "MTADGPRELLQLRAAVRHRPQDFVAWLMLADAELGMGDTTAGEMAVQRGLALHPGHPEAV--------\n"\r
+ "ASDAAPEH------------PGIALWLHALE-DAGQAEAAA---AYTRAHQLLPEEPYITAQLLNAVA\n"\r
+ "";\r
\r
- static final List<FastaSequence> seqs = loadSeqs();\r
+ static final List<FastaSequence> seqs = loadSeqs(2);\r
\r
private static final String FAILED = "FAILED";\r
private static final String OK = "OK";\r
* \r
* @return List of FastaSequence records\r
*/\r
- private static List<FastaSequence> loadSeqs() {\r
+ private static List<FastaSequence> loadSeqs(int nLines) {\r
try {\r
- return SequenceUtil.readFasta(new ByteArrayInputStream(fastaInput\r
- .getBytes()));\r
+ if (nLines == 1) {\r
+ return SequenceUtil.readFasta(new ByteArrayInputStream(fastaInput1record.getBytes()));\r
+ }\r
+ return SequenceUtil.readFasta(new ByteArrayInputStream(fastaInput2records.getBytes()));\r
} catch (IOException ignored) {\r
// Should not happen as a source is not a external stream\r
ignored.printStackTrace();\r
SequenceAnnotation<T> wservice, Services service) throws Exception {\r
writer.print("Calling analyse.........");\r
\r
- List<FastaSequence> input = loadSeqs();\r
+ List<FastaSequence> input = loadSeqs(2);\r
if (service == Services.AAConWS) {\r
input = loadAlignment();\r
}\r
+ if (service == Services.JpredWS) {\r
+ input = loadSeqs(1);\r
+ }\r
boolean success = testDefaultAnalyse(input, wservice, null, null);\r
\r
PresetManager<T> presetman = wservice.getPresets();\r