package jalview.ws.ebi;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
+import jalview.datamodel.SequenceI;
import jalview.io.FileParse;
import jalview.io.FormatAdapter;
HmmerJSONProcessor hjsp = new HmmerJSONProcessor(searchResult);
hjsp.parseFrom(new FileParse(hmmerResultFile, FormatAdapter.FILE));
+ AlignmentAnnotation[] aa = searchResult.getSequenceAt(5)
+ .getAnnotation();
+ Assert.assertNotNull(aa);
+ Assert.assertEquals(aa.length, 3,
+ "didn't get expected set of annotation.\n");
+ // DPTSERWFHGHLSGKEAEKLLTeKGKHGSFLVRESQSHPGDFVLSVRTgddkgesndgKSKVTHVMIR-CQELKYDVGGGERFDSLTDLVEHYKKNPmvet
+ // LGTVLQLKQP
+ // 5789*****************9799***********************999998888888********.99**************************9999
+ // 899999*999
+ // AlignmentAnnotation
+ // 101 == 8
+ String seq = "tLGT";
+ SequenceI s5 = searchResult.getSequenceAt(5);
+ Assert.assertEquals(
+ s5.getSubSequence(s5.findIndex(225), s5.findIndex(229))
+ .getSequenceAsString(),
+ seq);
+ int pos = s5.findIndex(226);
+ for (AlignmentAnnotation an : aa)
+ {
+ if (an.label.startsWith("Posterior"))
+ {
+ Assert.assertEquals(an.annotations[pos].value, 8f);
+
+ }
+ }
+ ;
// check that
// scores, posterior probabilities and stuff exist.
}