X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=blobdiff_plain;f=test%2Fjalview%2Fdatamodel%2FPAEContactMatrixTest.java;fp=test%2Fjalview%2Fdatamodel%2FPAEContactMatrixTest.java;h=33f3998f95a5fb42606b12a3ba4dbca753dfcb28;hp=fa7aca5882a325a696b04732f8d70b72cc50e504;hb=eb3e681d6e82ccdd5d312d1981dfb306e7f479f0;hpb=cb31e23d9138e481479623374aed7767bf8934d2 diff --git a/test/jalview/datamodel/PAEContactMatrixTest.java b/test/jalview/datamodel/PAEContactMatrixTest.java index fa7aca5..33f3998 100644 --- a/test/jalview/datamodel/PAEContactMatrixTest.java +++ b/test/jalview/datamodel/PAEContactMatrixTest.java @@ -73,7 +73,8 @@ public class PAEContactMatrixTest verifyPAEmatrix(seq, aa, 0, 0, 4); // test clustering - paematrix.setGroupSet(GroupSet.makeGroups(paematrix, false,0.1f, false)); + paematrix.setGroupSet( + GroupSet.makeGroups(paematrix, false, 0.1f, false)); // remap - test the MappableContactMatrix.liftOver method SequenceI newseq = new Sequence("Seq", "ASDQEASDQEASDQE"); @@ -117,8 +118,9 @@ public class PAEContactMatrixTest newaa = AlignmentUtils.addReferenceAnnotationTo(alForSeq, alseq, newaa, null); // check for null on out of bounds - ContactListI alcl = alForSeq.getContactListFor(newaa, newaa.annotations.length); - assertNull(alcl,"Should've gotten null!"); + ContactListI alcl = alForSeq.getContactListFor(newaa, + newaa.annotations.length); + assertNull(alcl, "Should've gotten null!"); // now check for mapping alcl = alForSeq.getContactListFor(newaa, 1); assertNotNull(alcl); @@ -213,18 +215,18 @@ public class PAEContactMatrixTest /** * check mapping and resolution methods work */ - @Test(groups= {"Functional"}) - public void testMappableContactMatrix() { + @Test(groups = { "Functional" }) + public void testMappableContactMatrix() + { SequenceI newseq = new Sequence("Seq", "ASDQEASDQEASDQE"); - MapList map = new MapList(new int[] - { 5, 9 }, new int[] { 1, 5 }, 1, 1); - AlignmentAnnotation aa = newseq - .addContactList(new PAEContactMatrix(newseq,map, PAEdata,null)); + MapList map = new MapList(new int[] { 5, 9 }, new int[] { 1, 5 }, 1, 1); + AlignmentAnnotation aa = newseq.addContactList( + new PAEContactMatrix(newseq, map, PAEdata, null)); ContactListI clist = newseq.getContactListFor(aa, 4); assertNotNull(clist); clist = newseq.getContactListFor(aa, 3); assertNull(clist); - + ContactMatrixI cm = newseq.getContactMatrixFor(aa); MappableContactMatrixI mcm = (MappableContactMatrixI) cm; int[] pos = mcm.getMappedPositionsFor(newseq, 0); @@ -232,19 +234,18 @@ public class PAEContactMatrixTest pos = mcm.getMappedPositionsFor(newseq, 1); assertNotNull(pos); - assertEquals(pos[0],4+newseq.getStart()); - + assertEquals(pos[0], 4 + newseq.getStart()); + pos = mcm.getMappedPositionsFor(newseq, 6); // after end of matrix assertNull(pos); pos = mcm.getMappedPositionsFor(newseq, 5); // at end of matrix assertNotNull(pos); - assertEquals(pos[0],8+newseq.getStart()); + assertEquals(pos[0], 8 + newseq.getStart()); SequenceI alseq = newseq.deriveSequence(); - alseq.insertCharAt(5,'-'); + alseq.insertCharAt(5, '-'); pos = mcm.getMappedPositionsFor(alseq, 5); // at end of matrix assertNotNull(pos); - assertEquals(pos[0],8+newseq.getStart()); - - + assertEquals(pos[0], 8 + newseq.getStart()); + } }