+ /*
+ * more test data
+ *
+ * 1QCF|A/101-121 SFQKGDQMVVLEESGEWWKAR Ser 114 jumps to Gly 116 at position
+ * 115 in PDB Res Numbering secondary structure numbers in jmol seem to be in
+ * msd numbering, not pdb res numbering.
+ */
+ @Test(groups = { "Functional" }, enabled = false)
+ public void pdbEntryPositionMap() throws Exception
+ {
+ Assert.fail("This test intentionally left to fail");
+ for (int offset = 0; offset < 20; offset += 6)
+ {
+ // check we put the secondary structure in the right position
+ Sequence uprot = new Sequence("TheProtSeq",
+ "DAWEIPRESLKLEKKLGAGQFGEVWMATYNKHTKVAVKTMKPGSMSVEAFLAEANVMKTL");
+ uprot.setStart(offset + 258); // make it harder - create a fake
+ // relocation problem for jalview to
+ // deal with
+ uprot.setEnd(uprot.getStart() + uprot.getLength() - 1);
+ // original numbers taken from
+ // http://www.ebi.ac.uk/pdbe-srv/view/entry/1qcf/secondary.html
+ // these are in numbering relative to the subsequence above
+ int coils[] = { 266, 275, 278, 287, 289, 298, 302, 316 }, helices[] = new int[]
+ { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 };
+
+ StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager();
+ PDBfile pmap = ssm.setMapping(true, new SequenceI[] { uprot },
+ new String[] { "A" }, "test/jalview/ext/jmol/1QCF.pdb",
+ jalview.io.FormatAdapter.FILE);
+ assertTrue(pmap != null);
+ SequenceI protseq = pmap.getSeqsAsArray()[0];
+ AlignmentAnnotation pstra = protseq
+ .getAnnotation("Secondary Structure")[0];
+ int pinds, pinde;
+ pstra.restrict((pinds = protseq.findIndex(258) - 1),
+ pinde = (protseq.findIndex(317) - 1));
+ int op;
+ System.out.println("PDB Annot");
+ for (char c : protseq.getSubSequence(pinds, pinde).getSequence())
+ {
+ System.out.print(c + ", ");
+ }
+ System.out.println("\n" + pstra + "\n\nsubsequence\n");
+ for (char c : uprot.getSequence())
+ {
+ System.out.print(c + ", ");
+ }
+ System.out.println("");
+ for (AlignmentAnnotation ss : uprot
+ .getAnnotation("Secondary Structure"))
+ {
+ ss.adjustForAlignment();
+ System.out.println("Uniprot Annot\n" + ss);
+ assertTrue(ss.hasIcons);
+ char expected = 'H';
+ for (int p : helices)
+ {
+ Annotation a = ss.annotations[op = (uprot.findIndex(offset + p) - 1)];
+ assertTrue(
+ "Expected a helix at position " + p + uprot.getCharAt(op)
+ + " but got coil", a != null);
+ assertEquals("Expected a helix at position " + p,
+ a.secondaryStructure, expected);
+ }
+ expected = 'E';
+ for (int p : sheets)
+ {
+ Annotation a = ss.annotations[uprot.findIndex(offset + p) - 1];
+ assertTrue(
+ "Expected a strand at position " + p + " but got coil",
+ a != null);
+ assertEquals("Expected a strand at position " + p,
+ a.secondaryStructure, expected);
+ }
+ expected = ' ';
+ for (int p : coils)
+ {
+ Annotation a = ss.annotations[uprot.findIndex(offset + p) - 1];
+ assertTrue("Expected coil at position " + p + " but got "
+ + a.secondaryStructure, a == null);
+ }
+ }
+ }
+ }
+
+ @Test(groups = { "Functional" }, enabled = false)