// 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 };
+ int coils[] = { 266, 275, 278, 287, 289, 298, 302, 316 },
+ helices[] = new int[]
+ { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 };
StructureSelectionManager ssm = StructureSelectionManager
.getStructureSelectionManager(null);
StructureFile pmap = ssm.setMapping(true, new SequenceI[] { uprot },
- new String[] { "A" }, "test/jalview/ext/jmol/1QCF.pdb",
+ new String[]
+ { "A" }, "test/jalview/ext/jmol/1QCF.pdb",
DataSourceType.FILE);
assertTrue(pmap != null);
SequenceI protseq = pmap.getSeqsAsArray()[0];
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);
+ 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);
}
for (int p : sheets)
{
Annotation a = ss.annotations[uprot.findIndex(offset + p) - 1];
- assertTrue(
- "Expected a strand at position " + p + " but got coil",
+ assertTrue("Expected a strand at position " + p + " but got coil",
a != null);
assertEquals("Expected a strand at position " + p,
a.secondaryStructure, expected);
public void testPDBentryMapping() throws Exception
{
Assert.fail("This test intentionally left to fail");
- Sequence sq = new Sequence(
- "1GAQ A subseq 126 to 219",
+ Sequence sq = new Sequence("1GAQ A subseq 126 to 219",
"EIVKGVCSNFLCDLQPGDNVQITGPVGKEMLMPKDPNATIIMLATGTGIAPFRSFLWKMFFEKHDDYKFNGLGWLFLGVPTSSSLLYKEEFGKM");
Sequence sq1 = new Sequence(sq);
String inFile;
// source
StructureFile pde = ssm.setMapping(true, new SequenceI[] { sq },
new String[]
- { "A" }, inFile = "examples/1gaq.txt", DataSourceType.FILE);
+ { "A" }, inFile = "examples/1gaq.txt", DataSourceType.FILE);
assertTrue("PDB File couldn't be found", pde != null);
StructureMapping[] mp = ssm.getMapping(inFile);
assertTrue("No mappings made.", mp != null && mp.length > 0);
if (origMap.getSequence() == sq)
{
assertEquals("Mapping was incomplete.", sq.getLength() - 1,
- (origMap.getPDBResNum(sq.getEnd()) - origMap
- .getPDBResNum(sq.getStart())));
+ (origMap.getPDBResNum(sq.getEnd())
+ - origMap.getPDBResNum(sq.getStart())));
// sanity check - if this fails, mapping from first position in sequence
// we want to transfer to is not where we expect
assertEquals(1, origMap.getSeqPos(126));
{
// walk along the pdb chain's jalview sequence
int rseqpos;
- int fpos = origMap.getSeqPos(rseqpos = firstChain
- .findPosition(p));
+ int fpos = origMap
+ .getSeqPos(rseqpos = firstChain.findPosition(p));
// only look at positions where there is a corresponding position in
// mapping
if (fpos < 1)
break;
}
- Annotation a = transfer.annotations[tanpos], b = alan.annotations[p];
- assertEquals("Non-equivalent annotation element at " + p + "("
- + rseqpos + ")" + " expected at " + fpos + " (alIndex "
- + tanpos + ")", a == null ? a : a.toString(),
+ Annotation a = transfer.annotations[tanpos],
+ b = alan.annotations[p];
+ assertEquals(
+ "Non-equivalent annotation element at " + p + "("
+ + rseqpos + ")" + " expected at " + fpos
+ + " (alIndex " + tanpos + ")",
+ a == null ? a : a.toString(),
b == null ? b : b.toString());
System.out.print("(" + a + "|" + b + ")");
}
@Test(groups = { "Functional" })
public void mapFer1From3W5V() throws Exception
{
- AlignFrame seqf = new FileLoader(false)
- .LoadFileWaitTillLoaded(
- ">FER1_MAIZE/1-150 Ferredoxin-1, chloroplast precursor\nMATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVGIMGRSASSRRRLRAQATYNVKLITPEGEVELQVPD\nDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKE\nEELTGA",
- DataSourceType.PASTE, FileFormat.Fasta);
+ AlignFrame seqf = new FileLoader(false).LoadFileWaitTillLoaded(
+ ">FER1_MAIZE/1-150 Ferredoxin-1, chloroplast precursor\nMATVLGSPRAPAFFFSSSSLRAAPAPTAVALPAAKVGIMGRSASSRRRLRAQATYNVKLITPEGEVELQVPD\nDVYILDQAEEDGIDLPYSCRAGSCSSCAGKVVSGSVDQSDQSYLDDGQIADGWVLTCHAYPTSDVVIETHKE\nEELTGA",
+ DataSourceType.PASTE, FileFormat.Fasta);
SequenceI newseq = seqf.getViewport().getAlignment().getSequenceAt(0);
StructureSelectionManager ssm = StructureSelectionManager
.getStructureSelectionManager(null);
StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
- new String[] { null }, "examples/3W5V.pdb",
- DataSourceType.FILE);
+ new String[]
+ { null }, "examples/3W5V.pdb", DataSourceType.FILE);
if (pmap == null)
{
AssertJUnit.fail("Couldn't make a mapping for 3W5V to FER1_MAIZE");
StructureImportSettings.setProcessSecondaryStructure(true);
StructureImportSettings.setVisibleChainAnnotation(true);
StructureImportSettings.setShowSeqFeatures(true);
- AlignFrame ref = new FileLoader(false)
- .LoadFileWaitTillLoaded("test/jalview/ext/jmol/1QCF.pdb",
- DataSourceType.FILE);
+ AlignFrame ref = new FileLoader(false).LoadFileWaitTillLoaded(
+ "test/jalview/ext/jmol/1QCF.pdb", DataSourceType.FILE);
SequenceI refseq = ref.getViewport().getAlignment().getSequenceAt(0);
SequenceI newseq = new Sequence(refseq.getName() + "Copy",
refseq.getSequenceAsString());
ssm.setProcessSecondaryStructure(true);
ssm.setAddTempFacAnnot(true);
StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq },
- new String[] { null }, "test/jalview/ext/jmol/1QCF.pdb",
+ new String[]
+ { null }, "test/jalview/ext/jmol/1QCF.pdb",
DataSourceType.FILE);
assertTrue(pmap != null);
assertEquals("Original and copied sequence of different lengths.",
{
for (int p = 0, pSize = refseq.getLength(); p < pSize; p++)
{
- Annotation orig = oannot.annotations[p], tran = tannot.annotations[p];
- assertTrue("Mismatch: coil and non coil site " + p, orig == tran
- || orig != null && tran != null);
+ Annotation orig = oannot.annotations[p],
+ tran = tannot.annotations[p];
+ assertTrue("Mismatch: coil and non coil site " + p,
+ orig == tran || orig != null && tran != null);
if (tran != null)
{
assertEquals("Mismatch in secondary structure at site " + p,