From: tcofoegbu Date: Tue, 22 Mar 2016 16:58:53 +0000 (+0000) Subject: JAL-1919 code improvement to make PDB sequence fetcher file format configurable.... X-Git-Tag: Release_2_10_0~291 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=86e1bfc3ed99bee91069b3238eb291c3955338d3;p=jalview.git JAL-1919 code improvement to make PDB sequence fetcher file format configurable. Also fixed issue preventing viewing large structures --- diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 74bec63..df98833 100644 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -26,6 +26,7 @@ import jalview.appletgui.FeatureRenderer; import jalview.appletgui.SequenceRenderer; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import jalview.io.StructureFile; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; import jalview.structure.StructureMapping; @@ -67,7 +68,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, int my = 0; - public PDBfile pdb; + public StructureFile pdb; PDBEntry pdbentry; @@ -204,11 +205,13 @@ public class AppletPDBCanvas extends Panel implements MouseListener, as.traceAlignment(); PrintStream ps = new PrintStream(System.out) { + @Override public void print(String x) { mappingDetails.append(x); } + @Override public void println() { mappingDetails.append("\n"); @@ -267,6 +270,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, addKeyListener(new KeyAdapter() { + @Override public void keyPressed(KeyEvent evt) { doKeyPressed(evt); @@ -470,6 +474,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, centre[2] = ztot / (2 * (float) bsize); } + @Override public void paint(Graphics g) { @@ -774,6 +779,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, } } + @Override public void mousePressed(MouseEvent e) { pdbAction = true; @@ -818,6 +824,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, dragging = false; } + @Override public void mouseMoved(MouseEvent e) { pdbAction = true; @@ -860,18 +867,22 @@ public class AppletPDBCanvas extends Panel implements MouseListener, } } + @Override public void mouseClicked(MouseEvent e) { } + @Override public void mouseEntered(MouseEvent e) { } + @Override public void mouseExited(MouseEvent e) { } + @Override public void mouseDragged(MouseEvent evt) { int x = evt.getX(); @@ -921,6 +932,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, repaint(); } + @Override public void mouseReleased(MouseEvent evt) { dragging = false; @@ -1037,6 +1049,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, return fatom; } + @Override public void update(Graphics g) { paint(g); @@ -1108,6 +1121,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, // //////////////////////////////// // /StructureListener + @Override public String[] getPdbFile() { return new String[] { pdbentry.getFile() }; @@ -1210,6 +1224,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, // return new Color(viewer.getAtomArgb(atomIndex)); } + @Override public void updateColours(Object source) { colourBySequence(); diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index dfe7c8f..1c7a1f7 100644 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -26,6 +26,7 @@ import jalview.datamodel.SequenceI; import jalview.gui.AlignmentPanel; import jalview.gui.FeatureRenderer; import jalview.gui.SequenceRenderer; +import jalview.io.StructureFile; import jalview.structure.AtomSpec; import jalview.structure.StructureListener; import jalview.structure.StructureMapping; @@ -65,7 +66,7 @@ public class PDBCanvas extends JPanel implements MouseListener, int my = 0; - public PDBfile pdb; + public StructureFile pdb; PDBEntry pdbentry; @@ -201,11 +202,13 @@ public class PDBCanvas extends JPanel implements MouseListener, as.traceAlignment(); PrintStream ps = new PrintStream(System.out) { + @Override public void print(String x) { mappingDetails.append(x); } + @Override public void println() { mappingDetails.append("\n"); @@ -245,6 +248,7 @@ public class PDBCanvas extends JPanel implements MouseListener, addKeyListener(new KeyAdapter() { + @Override public void keyPressed(KeyEvent evt) { keyPressed(evt); @@ -452,6 +456,7 @@ public class PDBCanvas extends JPanel implements MouseListener, centre[2] = ztot / (2 * (float) bsize); } + @Override public void paintComponent(Graphics g) { super.paintComponent(g); @@ -745,6 +750,7 @@ public class PDBCanvas extends JPanel implements MouseListener, } } + @Override public void mousePressed(MouseEvent e) { pdbAction = true; @@ -789,6 +795,7 @@ public class PDBCanvas extends JPanel implements MouseListener, dragging = false; } + @Override public void mouseMoved(MouseEvent e) { pdbAction = true; @@ -824,18 +831,22 @@ public class PDBCanvas extends JPanel implements MouseListener, } } + @Override public void mouseClicked(MouseEvent e) { } + @Override public void mouseEntered(MouseEvent e) { } + @Override public void mouseExited(MouseEvent e) { } + @Override public void mouseDragged(MouseEvent evt) { int x = evt.getX(); @@ -885,6 +896,7 @@ public class PDBCanvas extends JPanel implements MouseListener, repaint(); } + @Override public void mouseReleased(MouseEvent evt) { dragging = false; @@ -1065,6 +1077,7 @@ public class PDBCanvas extends JPanel implements MouseListener, // //////////////////////////////// // /StructureListener + @Override public String[] getPdbFile() { return new String[] { pdbentry.getFile() }; @@ -1169,6 +1182,7 @@ public class PDBCanvas extends JPanel implements MouseListener, // return new Color(viewer.getAtomArgb(atomIndex)); } + @Override public void updateColours(Object source) { colourBySequence(); diff --git a/src/MCview/PDBViewer.java b/src/MCview/PDBViewer.java index 309a0e1..da744a4 100755 --- a/src/MCview/PDBViewer.java +++ b/src/MCview/PDBViewer.java @@ -152,7 +152,7 @@ public class PDBViewer extends JInternalFrame implements Runnable { EBIFetchClient ebi = new EBIFetchClient(); String query = "pdb:" + pdbentry.getId(); - pdbentry.setFile(ebi.fetchDataAsFile(query, "default", "raw") + pdbentry.setFile(ebi.fetchDataAsFile(query, "default", "raw", ".xml") .getAbsolutePath()); if (pdbentry.getFile() != null) diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index b9acac0..8374721 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -25,6 +25,7 @@ import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.io.AppletFormatAdapter; import jalview.io.FileParse; +import jalview.io.StructureFile; import jalview.schemes.BuriedColourScheme; import jalview.schemes.HelixColourScheme; import jalview.schemes.HydrophobicColourScheme; @@ -204,7 +205,7 @@ public class AppletJmol extends EmbmenuFrame implements String alreadyMapped = StructureSelectionManager .getStructureSelectionManager(ap.av.applet) .alreadyMappedToFile(pdbentry.getId()); - MCview.PDBfile reader = null; + StructureFile reader = null; if (alreadyMapped != null) { reader = StructureSelectionManager.getStructureSelectionManager( @@ -283,6 +284,7 @@ public class AppletJmol extends EmbmenuFrame implements this.addWindowListener(new WindowAdapter() { + @Override public void windowClosing(WindowEvent evt) { closeViewer(); @@ -415,6 +417,7 @@ public class AppletJmol extends EmbmenuFrame implements this.setVisible(false); } + @Override public void actionPerformed(ActionEvent evt) { if (evt.getSource() == mappingMenuItem) @@ -535,6 +538,7 @@ public class AppletJmol extends EmbmenuFrame implements jmb.setColourBySequence(itm == seqColour); } + @Override public void itemStateChanged(ItemEvent evt) { if (evt.getSource() == jmolColour) @@ -553,6 +557,7 @@ public class AppletJmol extends EmbmenuFrame implements } } + @Override public void keyPressed(KeyEvent evt) { if (evt.getKeyCode() == KeyEvent.VK_ENTER && scriptWindow.isVisible()) @@ -564,10 +569,12 @@ public class AppletJmol extends EmbmenuFrame implements } + @Override public void keyTyped(KeyEvent evt) { } + @Override public void keyReleased(KeyEvent evt) { } @@ -641,11 +648,13 @@ public class AppletJmol extends EmbmenuFrame implements { Dimension currentSize = new Dimension(); + @Override public void update(Graphics g) { paint(g); } + @Override public void paint(Graphics g) { currentSize = this.getSize(); diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index f9480ab..ebc2c21 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -20,6 +20,8 @@ */ package jalview.bin; +import jalview.datamodel.DBRefSource; +import jalview.ws.dbsources.Pdb; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.dbsources.das.datamodel.DasSourceRegistry; import jalview.ws.sifts.SiftsSettings; @@ -226,6 +228,8 @@ public class Cache private final static String DEFAULT_FAIL_SAFE_PID_THRESHOLD = "30"; + private final static String DEFAULT_STRUCTURE_FOMART = DBRefSource.MMCIF; + /** * Initialises the Jalview Application Log */ @@ -422,6 +426,8 @@ public class Cache System.out .println("Jalview Version: " + codeVersion + codeInstallation); + Pdb.setCurrentDefaultFomart(jalview.bin.Cache.getDefault( + "DEFAULT_STRUCTURE_FOMART", DEFAULT_STRUCTURE_FOMART)); // jnlpVersion will be null if we're using InstallAnywhere // Dont do this check if running in headless mode if (jnlpVersion == null diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 7c3d192..3f0847b 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -28,6 +28,7 @@ import jalview.datamodel.ColumnSelection; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.io.AppletFormatAdapter; +import jalview.io.StructureFile; import jalview.schemes.ColourSchemeI; import jalview.schemes.ResidueProperties; import jalview.structure.AtomSpec; @@ -1121,7 +1122,7 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel { String fileName = modelfilenames[modelnum]; boolean foundEntry = false; - MCview.PDBfile pdb = null; + StructureFile pdb = null; String pdbfile = null; // model was probably loaded inline - so check the pdb file hashcode if (loadedInline) diff --git a/src/jalview/gui/AssociatePdbFileWithSeq.java b/src/jalview/gui/AssociatePdbFileWithSeq.java index 1247ace..e2637a9 100644 --- a/src/jalview/gui/AssociatePdbFileWithSeq.java +++ b/src/jalview/gui/AssociatePdbFileWithSeq.java @@ -23,6 +23,7 @@ package jalview.gui; import jalview.api.StructureSelectionManagerProvider; import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; +import jalview.io.StructureFile; import jalview.structure.StructureSelectionManager; import jalview.util.MessageManager; @@ -48,7 +49,7 @@ public class AssociatePdbFileWithSeq StructureSelectionManagerProvider ssmp) { PDBEntry entry = new PDBEntry(); - MCview.PDBfile pdbfile = null; + StructureFile pdbfile = null; pdbfile = StructureSelectionManager.getStructureSelectionManager(ssmp) .setMapping(false, new SequenceI[] { sequence }, null, choice, protocol); diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index 2e396aa..89ba84b 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -44,6 +44,7 @@ import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Objects; +import java.util.Vector; import javax.swing.JCheckBox; import javax.swing.JComboBox; @@ -740,7 +741,12 @@ public class StructureChooser extends GStructureChooser implements SequenceI selectedSeq = (SequenceI) tbl_summary.getValueAt(row, refSeqColIndex); selectedSeqsToView.add(selectedSeq); - PDBEntry pdbEntry = selectedSeq.getPDBEntry(pdbIdStr); + PDBEntry pdbEntry = selectedSeq.getPDBEntry(pdbIdStr); + if (pdbEntry == null) + { + pdbEntry = getFindEntry(pdbIdStr, + selectedSeq.getAllPDBEntries()); + } if (pdbEntry == null) { pdbEntry = new PDBEntry(); @@ -821,6 +827,21 @@ public class StructureChooser extends GStructureChooser implements }).start(); } + private PDBEntry getFindEntry(String id, Vector pdbEntries) + { + Objects.requireNonNull(id); + Objects.requireNonNull(pdbEntries); + PDBEntry foundEntry = null; + for (PDBEntry entry : pdbEntries) + { + if (entry.getId().equalsIgnoreCase(id)) + { + return entry; + } + } + return foundEntry; + } + private void launchStructureViewer(StructureSelectionManager ssm, final PDBEntry[] pdbEntriesToView, final AlignmentPanel alignPanel, SequenceI[] sequences) diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 00b3143..6bb04ab 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -34,6 +34,7 @@ import jalview.datamodel.SearchResults; import jalview.datamodel.SequenceI; import jalview.gui.IProgressIndicator; import jalview.io.AppletFormatAdapter; +import jalview.io.StructureFile; import jalview.util.MappingUtils; import jalview.util.MessageManager; import jalview.ws.sifts.SiftsClient; @@ -319,12 +320,13 @@ public class StructureSelectionManager * - how to resolve data from resource * @return null or the structure data parsed as a pdb file */ - synchronized public PDBfile setMapping(SequenceI[] sequence, + synchronized public StructureFile setMapping(SequenceI[] sequence, String[] targetChains, String pdbFile, String protocol) { return setMapping(true, sequence, targetChains, pdbFile, protocol); } + /** * create sequence structure mappings between each sequence and the given * pdbFile (retrieved via the given protocol). @@ -343,7 +345,7 @@ public class StructureSelectionManager * - how to resolve data from resource * @return null or the structure data parsed as a pdb file */ - synchronized public PDBfile setMapping(boolean forStructureView, + synchronized public StructureFile setMapping(boolean forStructureView, SequenceI[] sequenceArray, String[] targetChainIds, String pdbFile, String protocol) @@ -378,12 +380,21 @@ public class StructureSelectionManager } } } - PDBfile pdb = null; + StructureFile pdb = null; boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts(); try { - pdb = new PDBfile(addTempFacAnnot, parseSecStr, secStructServices, - pdbFile, protocol); + + if (pdbFile != null && isCIFFile(pdbFile)) + { + pdb = new jalview.ext.jmol.JmolParser(addTempFacAnnot, parseSecStr, + secStructServices, pdbFile, protocol); + } + else + { + pdb = new PDBfile(addTempFacAnnot, parseSecStr, secStructServices, + pdbFile, protocol); + } if (pdb.getId() != null && pdb.getId().trim().length() > 0 && AppletFormatAdapter.FILE.equals(protocol)) @@ -525,8 +536,15 @@ public class StructureSelectionManager return pdb; } + private boolean isCIFFile(String filename) + { + String fileExt = filename.substring(filename.lastIndexOf(".") + 1, + filename.length()); + return "cif".equalsIgnoreCase(fileExt); + } + private StructureMapping getStructureMapping(SequenceI seq, - String pdbFile, String targetChainId, PDBfile pdb, + String pdbFile, String targetChainId, StructureFile pdb, PDBChain maxChain, jalview.datamodel.Mapping sqmpping, AlignSeq maxAlignseq) { @@ -560,7 +578,7 @@ public class StructureSelectionManager private StructureMapping getNWMappings(SequenceI seq, String pdbFile, - String maxChainId, PDBChain maxChain, PDBfile pdb, + String maxChainId, PDBChain maxChain, StructureFile pdb, AlignSeq maxAlignseq) { final StringBuilder mappingDetails = new StringBuilder(128); diff --git a/src/jalview/ws/dbsources/EmblXmlSource.java b/src/jalview/ws/dbsources/EmblXmlSource.java index 66ebe1b..d063247 100644 --- a/src/jalview/ws/dbsources/EmblXmlSource.java +++ b/src/jalview/ws/dbsources/EmblXmlSource.java @@ -62,7 +62,8 @@ public abstract class EmblXmlSource extends EbiFileRetrievedProxy try { reply = dbFetch.fetchDataAsFile( - emprefx.toLowerCase() + ":" + query.trim(), "emblxml", null); + emprefx.toLowerCase() + ":" + query.trim(), "emblxml", null, + ".xml"); } catch (Exception e) { stopQuery(); diff --git a/src/jalview/ws/dbsources/Pdb.java b/src/jalview/ws/dbsources/Pdb.java index 3fd7541..358c838 100644 --- a/src/jalview/ws/dbsources/Pdb.java +++ b/src/jalview/ws/dbsources/Pdb.java @@ -47,6 +47,8 @@ public class Pdb extends EbiFileRetrievedProxy super(); } + private static String currentDefaultFomart = DBRefSource.MMCIF; + /* * (non-Javadoc) * @@ -124,8 +126,12 @@ public class Pdb extends EbiFileRetrievedProxy stopQuery(); return null; } + String ext = getCurrentDefaultFomart().equalsIgnoreCase("mmcif") ? ".cif" + : ".xml"; EBIFetchClient ebi = new EBIFetchClient(); - file = ebi.fetchDataAsFile("pdb:" + id, "pdb", "raw").getAbsolutePath(); + file = ebi.fetchDataAsFile("pdb:" + id, + getCurrentDefaultFomart().toLowerCase(), "raw", ext) + .getAbsolutePath(); stopQuery(); if (file == null) { @@ -135,7 +141,8 @@ public class Pdb extends EbiFileRetrievedProxy { pdbAlignment = new FormatAdapter().readFile(file, - jalview.io.AppletFormatAdapter.FILE, "PDB"); + jalview.io.AppletFormatAdapter.FILE, + getCurrentDefaultFomart()); if (pdbAlignment != null) { List toremove = new ArrayList(); @@ -249,4 +256,14 @@ public class Pdb extends EbiFileRetrievedProxy { return 0; } + + public static String getCurrentDefaultFomart() + { + return currentDefaultFomart; + } + + public static void setCurrentDefaultFomart(String currentDefaultFomart) + { + Pdb.currentDefaultFomart = currentDefaultFomart; + } } diff --git a/src/jalview/ws/dbsources/Uniprot.java b/src/jalview/ws/dbsources/Uniprot.java index 12ebe90..17f1842 100644 --- a/src/jalview/ws/dbsources/Uniprot.java +++ b/src/jalview/ws/dbsources/Uniprot.java @@ -165,7 +165,7 @@ public class Uniprot extends DbSourceProxyImpl // uniprotxml parameter required since december 2007 // uniprotkb dbname changed introduced december 2008 File file = ebi.fetchDataAsFile("uniprotkb:" + queries, "uniprotxml", - null); + null, ".xml"); Vector entries = getUniprotEntries(new FileReader(file)); if (entries != null) diff --git a/src/jalview/ws/ebi/EBIFetchClient.java b/src/jalview/ws/ebi/EBIFetchClient.java index c33871d..468b7f0 100644 --- a/src/jalview/ws/ebi/EBIFetchClient.java +++ b/src/jalview/ws/ebi/EBIFetchClient.java @@ -97,13 +97,13 @@ public class EBIFetchClient * @return the file holding the response * @throws OutOfMemoryError */ - public File fetchDataAsFile(String ids, String f, String s) + public File fetchDataAsFile(String ids, String f, String s, String ext) throws OutOfMemoryError { File outFile = null; try { - outFile = File.createTempFile("jalview", ".xml"); + outFile = File.createTempFile("jalview", ext); outFile.deleteOnExit(); fetchData(ids, f, s, outFile); if (outFile.length() == 0) diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java index d30482f..ef6df43 100644 --- a/src/jalview/ws/sifts/SiftsClient.java +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -26,6 +26,7 @@ import jalview.api.SiftsClientI; import jalview.datamodel.DBRefEntry; import jalview.datamodel.DBRefSource; import jalview.datamodel.SequenceI; +import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; import jalview.structure.StructureMapping; import jalview.util.Format; @@ -77,7 +78,7 @@ public class SiftsClient implements SiftsClientI { private Entry siftsEntry; - private PDBfile pdb; + private StructureFile pdb; private String pdbId; @@ -147,7 +148,7 @@ public class SiftsClient implements SiftsClientI * @param pdbId * @throws SiftsException */ - public SiftsClient(PDBfile pdb) throws SiftsException + public SiftsClient(StructureFile pdb) throws SiftsException { this.pdb = pdb; this.pdbId = pdb.getId(); diff --git a/test/jalview/structure/Mapping.java b/test/jalview/structure/Mapping.java index cbdbc40..1630110 100644 --- a/test/jalview/structure/Mapping.java +++ b/test/jalview/structure/Mapping.java @@ -30,13 +30,12 @@ import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; import jalview.io.FileLoader; import jalview.io.FormatAdapter; +import jalview.io.StructureFile; import org.testng.Assert; import org.testng.AssertJUnit; import org.testng.annotations.Test; -import MCview.PDBfile; - public class Mapping { @@ -67,7 +66,7 @@ public class Mapping { 303, 315 }, sheets[] = new int[] { 267, 268, 269, 270 }; StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); - PDBfile pmap = ssm.setMapping(true, new SequenceI[] { uprot }, + StructureFile pmap = ssm.setMapping(true, new SequenceI[] { uprot }, new String[] { "A" }, "test/jalview/ext/jmol/1QCF.pdb", jalview.io.FormatAdapter.FILE); assertTrue(pmap != null); @@ -138,7 +137,8 @@ public class Mapping StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); // Associate the 1GAQ pdb file with the subsequence 'imported' from another // source - PDBfile pde = ssm.setMapping(true, new SequenceI[] { sq }, new String[] + StructureFile pde = ssm.setMapping(true, new SequenceI[] { sq }, + new String[] { "A" }, inFile = "examples/1gaq.txt", jalview.io.FormatAdapter.FILE); assertTrue("PDB File couldn't be found", pde != null); StructureMapping[] mp = ssm.getMapping(inFile); @@ -234,7 +234,7 @@ public class Mapping FormatAdapter.PASTE, "FASTA"); SequenceI newseq = seqf.getViewport().getAlignment().getSequenceAt(0); StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); - PDBfile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, + StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, new String[] { null }, "examples/3W5V.pdb", jalview.io.FormatAdapter.FILE); if (pmap == null) @@ -262,7 +262,7 @@ public class Mapping StructureSelectionManager ssm = new jalview.structure.StructureSelectionManager(); ssm.setProcessSecondaryStructure(true); ssm.setAddTempFacAnnot(true); - PDBfile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, + StructureFile pmap = ssm.setMapping(true, new SequenceI[] { newseq }, new String[] { null }, "test/jalview/ext/jmol/1QCF.pdb", jalview.io.FormatAdapter.FILE); assertTrue(pmap != null); diff --git a/test/jalview/structure/StructureSelectionManagerTest.java b/test/jalview/structure/StructureSelectionManagerTest.java index ddee3ac..3529375 100644 --- a/test/jalview/structure/StructureSelectionManagerTest.java +++ b/test/jalview/structure/StructureSelectionManagerTest.java @@ -28,6 +28,7 @@ import jalview.datamodel.Sequence; import jalview.datamodel.SequenceFeature; import jalview.datamodel.SequenceI; import jalview.io.FormatAdapter; +import jalview.io.StructureFile; import java.util.ArrayList; import java.util.List; @@ -35,8 +36,6 @@ import java.util.List; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -import MCview.PDBfile; - public class StructureSelectionManagerTest { private StructureSelectionManager ssm; @@ -112,7 +111,7 @@ public class StructureSelectionManagerTest StructureSelectionManager sm = new StructureSelectionManager(); sm.setProcessSecondaryStructure(true); sm.setAddTempFacAnnot(true); - PDBfile pmap = sm.setMapping(true, new SequenceI[] { seq }, + StructureFile pmap = sm.setMapping(true, new SequenceI[] { seq }, new String[] { null }, "examples/1gaq.txt", FormatAdapter.FILE); assertTrue(pmap != null);