- try
- {
- Assert.assertTrue(SiftsSettings.isMapWithSifts());
- StructureMapping strucMapping = siftsClient.getSiftsStructureMapping(
- testSeq, testPDBId, "A");
- String expectedMappingOutput = "\nSequence ⟷ Structure mapping details\n"
- + "Method: SIFTS\n\n"
- + "P00221 : 1 - 97 Maps to \n"
- + "1A70|A : 51 - 147\n\n"
- + "P00221 AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLD\n"
- + " |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n"
- + "1A70|A AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLD\n\n"
-
- + "P00221 DDQIDEGWVLTCAAYPVSDVTIETHKEEELTA\n"
- + " |||||||||||||||||||||||||| |||||\n"
- + "1A70|A DDQIDEGWVLTCAAYPVSDVTIETHKKEELTA\n\n" +
-
- "Length of alignment = 97\n" + "Percentage ID = 98.97\n";
-
- Assert.assertEquals(strucMapping.getMappingDetailsOutput(),
- expectedMappingOutput);
- Assert.assertEquals(strucMapping.getMapping(), expectedMapping);
- } catch (SiftsException e)
+ Assert.assertTrue(SiftsSettings.isMapWithSifts());
+ StructureMapping strucMapping = siftsClient.getStructureMapping(
+ testSeq, testPDBId, "A");
+ String expectedMappingOutput = "\nSequence ⟷ Structure mapping details\n"
+ + "Method: SIFTS\n\n"
+ + "P00221 : 51 - 147 Maps to \n"
+ + "1A70|A : 1 - 97\n\n"
+ + "P00221 AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLD\n"
+ + " |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n"
+ + "1A70|A AAYKVTLVTPTGNVEFQCPDDVYILDAAEEEGIDLPYSCRAGSCSSCAGKLKTGSLNQDDQSFLD\n\n"
+
+ + "P00221 DDQIDEGWVLTCAAYPVSDVTIETHKEEELTA\n"
+ + " |||||||||||||||||||||||||| |||||\n"
+ + "1A70|A DDQIDEGWVLTCAAYPVSDVTIETHKKEELTA\n\n" +
+
+ "Length of alignment = 97\n" + "Percentage ID = 98.97\n";
+
+ Assert.assertEquals(strucMapping.getMappingDetailsOutput(),
+ expectedMappingOutput);
+
+ // Can't do Assert.assertEquals(strucMapping.getMapping(), expectedMapping);
+ // because this fails in our version of TestNG
+ Assert.assertEquals(strucMapping.getMapping().size(),
+ expectedMapping.size());
+ Iterator<Map.Entry<Integer, int[]>> it = expectedMapping.entrySet()
+ .iterator();
+ while (it.hasNext())