import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
-import jalview.gui.Desktop;
-import jalview.structure.StructureMapping;
-import jalview.structure.StructureSelectionManager;
import java.io.File;
AlignmentI al;
- String pdbStr = "examples/1gaq.txt";
-
String pdbId;
+ /**
+ * Ensure 'process secondary structure from PDB and add annotations' are set
+ * in preferences, and load PDB example file 1gaq
+ *
+ * @throws Exception
+ */
@BeforeMethod(alwaysRun = true)
public void setup() throws Exception
{
Cache.applicationProperties.setProperty("ADD_SS_ANN",
Boolean.TRUE.toString());
FileLoader loader = new FileLoader(false);
- AlignFrame af = loader.LoadFileWaitTillLoaded(pdbStr,
+ AlignFrame af = loader.LoadFileWaitTillLoaded("examples/1gaq.txt",
FormatAdapter.FILE);
al = af.getViewport().getAlignment();
- pdbId = al.getSequenceAt(0).getDatasetSequence().getPDBId()
+ pdbId = al.getSequenceAt(0).getDatasetSequence().getAllPDBEntries()
.get(0).getId();
}
@Test(groups ={ "Functional" })
public void checkPDBSequenceFeatures()
{
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Desktop.instance);
- StructureMapping[] mappings = ssm.getMapping("1gaq");
- // suspect we really want to make assertions on sequence features
- // in these mappings' sequencess
/*
* 1GAQ/A
*/
SequenceFeature[] sf = al.getSequenceAt(0).getSequenceFeatures();
assertEquals(296, sf.length);
assertEquals("RESNUM", sf[0].getType());
- assertEquals("GLU:19 1gaqA", sf[0].getDescription());
+ assertEquals("GLU: 19 1gaqA", sf[0].getDescription());
assertEquals("RESNUM", sf[295].getType());
- assertEquals("TYR:314 1gaqA", sf[295].getDescription());
+ assertEquals("TYR: 314 1gaqA", sf[295].getDescription());
/*
* 1GAQ/B
sf = al.getSequenceAt(1).getSequenceFeatures();
assertEquals(98, sf.length);
assertEquals("RESNUM", sf[0].getType());
- assertEquals("ALA:1 1gaqB", sf[0].getDescription());
+ assertEquals("ALA: 1 1gaqB", sf[0].getDescription());
assertEquals("RESNUM", sf[97].getType());
- assertEquals("ALA:98 1gaqB", sf[97].getDescription());
+ assertEquals("ALA: 98 1gaqB", sf[97].getDescription());
/*
* 1GAQ/C
sf = al.getSequenceAt(2).getSequenceFeatures();
assertEquals(296, sf.length);
assertEquals("RESNUM", sf[0].getType());
- assertEquals("GLU:19 1gaqC", sf[0].getDescription());
+ assertEquals("GLU: 19 1gaqC", sf[0].getDescription());
assertEquals("RESNUM", sf[295].getType());
- assertEquals("TYR:314 1gaqC", sf[295].getDescription());
+ assertEquals("TYR: 314 1gaqC", sf[295].getDescription());
}
@Test(groups ={ "Functional" })
@BeforeClass(alwaysRun = true)
public static void setUpBeforeClass() throws Exception
{
- jalview.bin.Jalview.main(new String[]
- { "-props", "test/src/jalview/io/testProps.jvprops" });
+ jalview.bin.Jalview.main(new String[] { "-props",
+ "test/jalview/io/testProps.jvprops" });
}
/**
{
sq = sq.getDatasetSequence();
}
- assertNotNull(sq.getPDBId());
- assertEquals("Expected only one PDB ID", sq.getPDBId().size(), 1);
- for (PDBEntry pdbentry : sq.getPDBId())
+ assertNotNull(sq.getAllPDBEntries());
+ assertEquals("Expected only one PDB ID", sq.getAllPDBEntries().size(), 1);
+ for (PDBEntry pdbentry : sq.getAllPDBEntries())
{
System.err.println("PDB Entry " + pdbentry.getId() + " "
+ pdbentry.getFile());