package jalview.ws.jws1; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; import jalview.datamodel.Sequence; import jalview.datamodel.SequenceI; import org.testng.Assert; import org.testng.annotations.Test; public class JPredWSUtilsTest { @Test(groups = { "Functional" }) public void testSingleSeqPrediction() { } @Test(groups = { "Functional" }) public void testSingleSeqPredictionHiddenRegion() { } @Test(groups = { "Functional" }) public void testMsaPrediction() { } @Test(groups = { "Functional" }) public void testMsaPredictionHiddenRegion() { } @Test(groups = { "Functional" }) public void testInsertHiddenResidues() { // orig: asdfPPPPPPPasdfPPPPasdf // pred: PPPPPPPPPPP // al: -----P-P-P---P---P----P---P-P--PP---P--- // s1: SSSSSSS-SS---S---SSSSSS---S-S--SSSSSSSSS // s2: SSSSSSS-SSSSSSSSSSS----SSS-S-SSS-----SSS SequenceI orig = new Sequence("orig", "asdfPPPPPPPasdfPPPPasdf"), pred = new Sequence( "pred", "PPPPPPPPPPP"), al = new Sequence("al/5-23", "-----P-P-P---P---P----P---P-P--PP---P---"), s1 = new Sequence( "s1", "SSSSSSS-SS---S---SSSSSS---S-S--SSSSSSSSS"), s2 = new Sequence( "s2", "SSSSSSS-SSSSSSSSSSS----SSS-S-SSS-----SSS"); AlignmentI alpred = new Alignment(new SequenceI[] { al, s1, s2 }); JPredWSUtils.insertHiddenResidues(alpred, '.', new int[] { 5, 6, 7, 8, 9, 10, 11, 16, 17, 18, 19 }, orig); Assert.assertEquals(alpred.getSequenceAt(2).getSequenceAsString(), "....SSSSSSS-SS---S---SSSSSS---S....-S--SSSSSSSSS...."); Assert.assertEquals(alpred.getSequenceAt(1).getSequenceAsString(), "....SSSSSSS-SSSSSSSSSSS----SSS-....S-SSS-----SSS...."); Assert.assertEquals(alpred.getSequenceAt(0).getSequenceAsString(), "asdf-----P-P-P---P---P----P---Pasdf-P--PP---P---asdf"); // result: // // al: asdf-----P-P-P---P---P----P---Pasdf-P--PP---P---asdf // s1: ....SSSSSSS-SS---S---SSSSSS---S....-S--SSSSSSSSS.... // s2: ....SSSSSSS-SSSSSSSSSSS----SSS-....S-SSS-----SSS.... } }