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IELHLNGPLQWLDKVLTQMGSPSIRCSSVS
+>gi|45383213|ref|NP_989806.1|/1-426
+DLQPVTYCEPAFWCSISYYELNQRVGETFHASQPSMTVDGFTDPSNS-ERFCLGLLSNVNRNAAVELTRRHI
+GRGVRLYYIGGEVFAECLSDSAIFVQSPNCNQRYGWHPATVCKIPPGCNLKIFNNQEF----AALLAQSVNQ
+GFEAVYQLTRMCTIRMSFVKGWGAEYRRQTVTSTPCWIELHLNGPLQWLDKVLTQMGSPSIRCSSVS
+>gi|47523074|ref|NP_999302.1|/1-425
+DLQPVTYCEPAFWCSISYYELNQRVGETFHASQPSMTVDGFTDPSNS-ERFCLGLLSNVNRNAAVELTRRHI
+GRGVRLYYIGGEVFAECLSDSAIFVQSPNCNQRYGWHPATVCKIPPGCNLKIFNNQEF----AALLAQSVNQ
+GFEAVYQLTRMCTIRMSFVKGWGAEYRRQTVTSTPCWIELHLNGPLQWLDKVLTQMGSPSIRCSSVS
return valid;
}
- public static void main(String argv[])
- {
- // test separator list
- try
- {
- assert (separatorListToArray("foo=',',min='foo',max='1,2,3',fa=','",
- ",").length == 4);
- if (separatorListToArray("minsize='2', sep=','", ",").length == 2)
- {
- assert (false);
- }
-
- } catch (AssertionError x)
- {
- System.err.println("separatorListToArray is faulty.");
- }
- if (argv.length == 0)
- {
- if (!testRsdExchange("Test using default Shmmr service",
- RestClient.makeShmmrRestClient().service))
- {
- System.err.println("default test failed.");
- }
- else
- {
- System.err.println("default test passed.");
- }
- }
- else
- {
- int i = 0, p = 0;
- for (String svc : argv)
- {
- p += testRsdExchange("Test " + (++i), svc) ? 1 : 0;
- }
- System.err.println("" + p + " out of " + i + " tests passed.");
-
- }
- }
-
- private static boolean testRsdExchange(String desc, String servicestring)
- {
- try
- {
- RestServiceDescription newService = new RestServiceDescription(
- servicestring);
- if (!newService.isValid())
- {
- throw new Error("Failed to create service from '" + servicestring
- + "'.\n" + newService.getInvalidMessage());
- }
- return testRsdExchange(desc, newService);
- } catch (Throwable x)
- {
- System.err.println("Failed for service (" + desc + "): "
- + servicestring);
- x.printStackTrace();
- return false;
- }
- }
-
- private static boolean testRsdExchange(String desc,
- RestServiceDescription service)
- {
- try
- {
- String fromservicetostring = service.toString();
- RestServiceDescription newService = new RestServiceDescription(
- fromservicetostring);
- if (!newService.isValid())
- {
- throw new Error("Failed to create service from '"
- + fromservicetostring + "'.\n"
- + newService.getInvalidMessage());
- }
-
- if (!service.equals(newService))
- {
- System.err.println("Failed for service (" + desc + ").");
- System.err.println("Original service and parsed service differ.");
- System.err.println("Original: " + fromservicetostring);
- System.err.println("Parsed : " + newService.toString());
- return false;
- }
- } catch (Throwable x)
- {
- System.err.println("Failed for service (" + desc + "): "
- + service.toString());
- x.printStackTrace();
- return false;
- }
- return true;
- }
-
/**
* covenience method to generate the id and sequence string vector from a set
* of seuqences using each sequence's getName() and getSequenceAsString()
--- /dev/null
+/**
+ *
+ */
+package jalview.ws.rest;
+
+import static org.junit.Assert.*;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.AlignmentView;
+import jalview.gui.AlignFrame;
+import jalview.io.FileParse;
+import jalview.ws.rest.InputType;
+import jalview.ws.rest.params.SeqGroupIndexVector;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * @author jimp
+ *
+ */
+public class ShmmrRSBSService
+{
+
+ @Test
+ public void testSeparatorListToArrayForRestServiceDescriptions()
+ {
+ assertTrue(
+ "separatorListToArray is faulty.",
+ RestServiceDescription.separatorListToArray(
+ "foo=',',min='foo',max='1,2,3',fa=','", ",").length == 4);
+ assertTrue("separatorListToArray is faulty.",
+ RestServiceDescription.separatorListToArray(
+ "minsize='2', sep=','", ",").length != 2); // probably should come as 2
+ }
+
+ @Test
+ public void testShmmrService()
+ {
+
+ assertTrue(
+ "Test Rsd Exchange using using default Shmmr service failed.",
+ testRsdExchange("Test using default Shmmr service",
+ RestClient.makeShmmrRestClient().service));
+ }
+ @Test
+ public void testShmmrServiceDataprep() throws Exception
+ {
+ RestClient _rc = RestClient.makeShmmrRestClient();
+ assertNotNull(_rc);
+ AlignFrame alf = new jalview.io.FileLoader(false).LoadFileWaitTillLoaded("examples/testdata/smad.fa", jalview.io.FormatAdapter.FILE);
+ assertNotNull("Couldn't find test data.",alf);
+ alf.loadJalviewDataFile("examples/testdata/smad_groups.jva",
+ jalview.io.FormatAdapter.FILE, null, null);
+ assertTrue("Couldn't load the test data's annotation file (should be 5 groups but found "+alf.getViewport().getAlignment().getGroups().size()+").", alf.getViewport().getAlignment().getGroups().size()==5);
+
+ RestClient rc = new RestClient(_rc.service, alf, true);
+
+
+
+ assertNotNull("Couldn't creat RestClient job.",rc);
+ jalview.bin.Cache.initLogger();
+ RestJob rjb = new RestJob(0, new RestJobThread(rc),rc.av.getAlignment(),null);
+ rjb.setAlignmentForInputs(rc.service.getInputParams().values(), rc.av.getAlignment());
+ for (Map.Entry<String,InputType> e:rc.service.getInputParams().entrySet()) {
+ System.out.println("For Input '"+e.getKey()+":\n"+e.getValue().formatForInput(rjb).getContentLength());
+ }
+ }
+
+ private static boolean testRsdExchange(String desc, String servicestring)
+ {
+ try
+ {
+ RestServiceDescription newService = new RestServiceDescription(
+ servicestring);
+ if (!newService.isValid())
+ {
+ throw new Error("Failed to create service from '" + servicestring
+ + "'.\n" + newService.getInvalidMessage());
+ }
+ return testRsdExchange(desc, newService);
+ } catch (Throwable x)
+ {
+ System.err.println("Failed for service (" + desc + "): "
+ + servicestring);
+ x.printStackTrace();
+ return false;
+ }
+ }
+
+ private static boolean testRsdExchange(String desc,
+ RestServiceDescription service)
+ {
+ try
+ {
+ String fromservicetostring = service.toString();
+ RestServiceDescription newService = new RestServiceDescription(
+ fromservicetostring);
+ if (!newService.isValid())
+ {
+ throw new Error("Failed to create service from '"
+ + fromservicetostring + "'.\n"
+ + newService.getInvalidMessage());
+ }
+
+ if (!service.equals(newService))
+ {
+ System.err.println("Failed for service (" + desc + ").");
+ System.err.println("Original service and parsed service differ.");
+ System.err.println("Original: " + fromservicetostring);
+ System.err.println("Parsed : " + newService.toString());
+ return false;
+ }
+ } catch (Throwable x)
+ {
+ System.err.println("Failed for service (" + desc + "): "
+ + service.toString());
+ x.printStackTrace();
+ return false;
+ }
+ return true;
+ }
+
+}