JAL-1919 Fixed failing tests, enabled HETATM processing from structure file to be...
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 8 Jul 2016 16:16:54 +0000 (17:16 +0100)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Fri, 8 Jul 2016 16:16:54 +0000 (17:16 +0100)
16 files changed:
src/MCview/PDBChain.java
src/MCview/PDBfile.java
src/jalview/bin/Cache.java
src/jalview/ext/jmol/JmolParser.java
src/jalview/io/AlignFile.java
src/jalview/io/AppletFormatAdapter.java
src/jalview/io/StructureFile.java
src/jalview/structure/StructureImportSettings.java [moved from src/jalview/structure/StructureViewSettings.java with 66% similarity]
src/jalview/ws/dbsources/Pdb.java
test/MCview/PDBChainTest.java
test/jalview/ext/jmol/JmolParserTest.java
test/jalview/gui/AlignViewportTest.java
test/jalview/io/AnnotatedPDBFileInputTest.java
test/jalview/structure/Mapping.java
test/jalview/structure/StructureSelectionManagerTest.java
test/jalview/ws/PDBSequenceFetcherTest.java

index 248cf29..885521b 100755 (executable)
@@ -30,7 +30,7 @@ import jalview.datamodel.SequenceI;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.ResidueProperties;
 import jalview.structure.StructureMapping;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 
 import java.awt.Color;
 import java.util.List;
@@ -423,7 +423,7 @@ public class PDBChain
     // System.out.println("PDB Sequence is :\nSequence = " + seq);
     // System.out.println("No of residues = " + residues.size());
 
-    if (StructureViewSettings.isShowSeqFeatures())
+    if (StructureImportSettings.isShowSeqFeatures())
     {
     for (i = 0, iSize = resFeatures.size(); i < iSize; i++)
     {
index 9a9b6f6..9acc2e7 100755 (executable)
@@ -25,6 +25,7 @@ import jalview.datamodel.DBRefSource;
 import jalview.datamodel.SequenceI;
 import jalview.io.FileParse;
 import jalview.io.StructureFile;
+import jalview.structure.StructureImportSettings;
 import jalview.util.MessageManager;
 
 import java.io.IOException;
@@ -46,10 +47,10 @@ public class PDBfile extends StructureFile
   }
 
   public PDBfile(boolean addAlignmentAnnotations, boolean predictSecStr,
-          boolean externalSecStr, String file, String protocol)
+          boolean externalSecStr, String dataObject, String protocol)
           throws IOException
   {
-    super(false, file, protocol);
+    super(false, dataObject, protocol);
     addSettings(addAlignmentAnnotations, predictSecStr, externalSecStr);
     doParse();
   }
@@ -131,7 +132,8 @@ public class PDBfile extends StructureFile
           break;
         }
         if (line.indexOf("ATOM") == 0
-                || (line.indexOf("HETATM") == 0 && !terFlag))
+                || (StructureImportSettings.isProcessHETATMs()
+                        && line.indexOf("HETATM") == 0 && !terFlag))
         {
           terFlag = false;
 
index dde67de..cf251dc 100755 (executable)
@@ -21,7 +21,7 @@
 package jalview.bin;
 
 import jalview.datamodel.DBRefSource;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.ws.dbsources.das.api.DasSourceRegistryI;
 import jalview.ws.dbsources.das.datamodel.DasSourceRegistry;
 import jalview.ws.sifts.SiftsSettings;
@@ -426,9 +426,12 @@ public class Cache
     System.out
             .println("Jalview Version: " + codeVersion + codeInstallation);
 
-    StructureViewSettings.setCurrentDefaultFormat(jalview.bin.Cache
+    StructureImportSettings.setCurrentDefaultFormat(jalview.bin.Cache
             .getDefault(
             "DEFAULT_STRUCTURE_FORMAT", DEFAULT_STRUCTURE_FORMAT));
+
+    StructureImportSettings.setProcessHETATMs(jalview.bin.Cache.getDefault(
+            "PROCESS_HETATM", false));
     // jnlpVersion will be null if we're using InstallAnywhere
     // Dont do this check if running in headless mode
     if (jnlpVersion == null
index 309e196..c514503 100644 (file)
@@ -27,7 +27,7 @@ import jalview.datamodel.SequenceI;
 import jalview.io.FileParse;
 import jalview.io.StructureFile;
 import jalview.schemes.ResidueProperties;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.util.MessageManager;
 
 import java.io.IOException;
@@ -186,7 +186,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener
           prot.add(chainseq);
         }
 
-        if (StructureViewSettings.isPredictSecondaryStructure())
+        if (StructureImportSettings.isPredictSecondaryStructure())
         {
           createAnnotation(chainseq, chain, ms.at);
         }
@@ -208,7 +208,7 @@ public class JmolParser extends StructureFile implements JmolStatusListener
     {
       // System.out.println("Seq Id : " + atom.getSeqID());
       // System.out.println("To String : " + atom.toString());
-      if (atom.isHetero())
+      if (!StructureImportSettings.isProcessHETATMs() && atom.isHetero())
       {
         continue;
       }
index 984eff6..5760fbe 100755 (executable)
@@ -89,14 +89,14 @@ public abstract class AlignFile extends FileParse
   /**
    * Constructor which parses the data from a file of some specified type.
    * 
-   * @param inFile
-   *          Filename to read from.
+   * @param dataObject
+   *          Filename, URL or Pasted String to read from.
    * @param type
-   *          What type of file to read from (File, URL)
+   *          What type of file to read from (File, URL, Pasted String)
    */
-  public AlignFile(String inFile, String type) throws IOException
+  public AlignFile(String dataObject, String type) throws IOException
   {
-    this(true, inFile, type);
+    this(true, dataObject, type);
   }
 
   /**
@@ -105,16 +105,16 @@ public abstract class AlignFile extends FileParse
    * 
    * @param parseImmediately
    *          if false, need to call 'doParse()' to begin parsing data
-   * @param inFile
-   *          Filename to read from.
+   * @param dataObject
+   *          Filename, URL or Pasted String to read from.
    * @param type
    *          What type of file to read from (File, URL)
    * @throws IOException
    */
-  public AlignFile(boolean parseImmediately, String inFile, String type)
+  public AlignFile(boolean parseImmediately, String dataObject, String type)
           throws IOException
   {
-    super(inFile, type);
+    super(dataObject, type);
     initData();
     if (parseImmediately)
     {
index 42a8ead..fb414f4 100755 (executable)
@@ -26,7 +26,7 @@ import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.util.MessageManager;
 
 import java.io.File;
@@ -280,11 +280,11 @@ public class AppletFormatAdapter
       {
         // TODO obtain config value from preference settings.
         // Set value to 'true' to test PDB processing with Jmol: JAL-1213
-        boolean isParseWithJMOL = !StructureViewSettings
+        boolean isParseWithJMOL = !StructureImportSettings
                 .getCurrentDefaultFormat().equalsIgnoreCase("PDB");
         if (isParseWithJMOL)
         {
-          StructureViewSettings.addSettings(annotFromStructure,
+          StructureImportSettings.addSettings(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct);
           alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct, inFile,
@@ -292,9 +292,9 @@ public class AppletFormatAdapter
         }
         else
         {
-          StructureViewSettings.addSettings(annotFromStructure,
+          StructureImportSettings.addSettings(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct);
-          StructureViewSettings.setShowSeqFeatures(true);
+          StructureImportSettings.setShowSeqFeatures(true);
           alignFile = new MCview.PDBfile(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct, inFile,
                   type);
@@ -302,7 +302,7 @@ public class AppletFormatAdapter
       }
       else if (format.equals("mmCIF"))
       {
-        StructureViewSettings.addSettings(annotFromStructure,
+        StructureImportSettings.addSettings(annotFromStructure,
                 localSecondaryStruct, serviceSecondaryStruct);
         alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure,
                 localSecondaryStruct, serviceSecondaryStruct, inFile, type);
@@ -436,21 +436,21 @@ public class AppletFormatAdapter
         boolean isParseWithJMOL = false;
         if (isParseWithJMOL)
         {
-          StructureViewSettings.addSettings(annotFromStructure,
+          StructureImportSettings.addSettings(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct);
           alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct, source);
         }
         else
         {
-          StructureViewSettings.setShowSeqFeatures(true);
+          StructureImportSettings.setShowSeqFeatures(true);
           alignFile = new MCview.PDBfile(annotFromStructure,
                   localSecondaryStruct, serviceSecondaryStruct, source);
         }
       }
       else if (format.equals("mmCIF"))
       {
-        StructureViewSettings.addSettings(annotFromStructure,
+        StructureImportSettings.addSettings(annotFromStructure,
                 localSecondaryStruct, serviceSecondaryStruct);
         alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure,
                 localSecondaryStruct, serviceSecondaryStruct, source);
index 6a236fd..6970ffa 100644 (file)
@@ -9,7 +9,7 @@ import jalview.datamodel.DBRefEntry;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 
 import java.awt.Color;
 import java.io.IOException;
@@ -67,19 +67,19 @@ public abstract class StructureFile extends AlignFile
 
   public void xferSettings()
   {
-    this.visibleChainAnnotation = StructureViewSettings
+    this.visibleChainAnnotation = StructureImportSettings
             .isVisibleChainAnnotation();
-    this.predictSecondaryStructure = StructureViewSettings
+    this.predictSecondaryStructure = StructureImportSettings
             .isPredictSecondaryStructure();
-    this.externalSecondaryStructure = StructureViewSettings
+    this.externalSecondaryStructure = StructureImportSettings
             .isExternalSecondaryStructure();
 
   }
 
-  public StructureFile(boolean parseImmediately, String inFile, String type)
+  public StructureFile(boolean parseImmediately, String dataObject, String type)
           throws IOException
   {
-    super(parseImmediately, inFile, type);
+    super(parseImmediately, dataObject, type);
   }
 
   public StructureFile(boolean a, FileParse fp) throws IOException
@@ -270,11 +270,11 @@ public abstract class StructureFile extends AlignFile
             predictSecondaryStructure, externalSecondaryStructure,
             new FileParse(getDataName(), type) };
 
-        StructureViewSettings.setShowSeqFeatures(false);
-        StructureViewSettings.setVisibleChainAnnotation(false);
-        StructureViewSettings
+        StructureImportSettings.setShowSeqFeatures(false);
+        StructureImportSettings.setVisibleChainAnnotation(false);
+        StructureImportSettings
                 .setPredictSecondaryStructure(predictSecondaryStructure);
-        StructureViewSettings
+        StructureImportSettings
                 .setExternalSecondaryStructure(externalSecondaryStructure);
         Object jmf = constructor.newInstance(args);
         AlignmentI al = new Alignment((SequenceI[]) cl.getMethod(
@@ -297,7 +297,7 @@ public abstract class StructureFile extends AlignFile
     } catch (ClassNotFoundException q)
     {
     }
-    StructureViewSettings.setShowSeqFeatures(true);
+    StructureImportSettings.setShowSeqFeatures(true);
   }
 
   public PDBChain findChain(String id) throws Exception
@@ -2,10 +2,8 @@ package jalview.structure;
 
 import jalview.datamodel.DBRefSource;
 
-public class StructureViewSettings
+public class StructureImportSettings
 {
-  private String dbRefType;
-
   /**
    * set to true to add derived sequence annotations (temp factor read from
    * file, or computed secondary structure) to the alignment
@@ -26,15 +24,17 @@ public class StructureViewSettings
 
   private static boolean showSeqFeatures = true;
 
+  private static boolean processHETATMs = false;
+
   private static String currentDefaultFormat = DBRefSource.PDB;
 
   public static void addSettings(boolean addAlignmentAnnotations,
           boolean predictSecStr, boolean externalSecStr)
   {
-    StructureViewSettings.visibleChainAnnotation = addAlignmentAnnotations;
-    StructureViewSettings.predictSecStr = predictSecStr;
-    StructureViewSettings.externalSecondaryStructure = externalSecStr;
-    StructureViewSettings.showSeqFeatures = true;
+    StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
+    StructureImportSettings.predictSecStr = predictSecStr;
+    StructureImportSettings.externalSecondaryStructure = externalSecStr;
+    StructureImportSettings.showSeqFeatures = true;
   }
 
   public static boolean isVisibleChainAnnotation()
@@ -45,7 +45,7 @@ public class StructureViewSettings
   public static void setVisibleChainAnnotation(
           boolean visibleChainAnnotation)
   {
-    StructureViewSettings.visibleChainAnnotation = visibleChainAnnotation;
+    StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
   }
 
   public static boolean isPredictSecondaryStructure()
@@ -56,7 +56,7 @@ public class StructureViewSettings
   public static void setPredictSecondaryStructure(
           boolean predictSecondaryStructure)
   {
-    StructureViewSettings.predictSecStr = predictSecondaryStructure;
+    StructureImportSettings.predictSecStr = predictSecondaryStructure;
   }
 
   public static boolean isExternalSecondaryStructure()
@@ -67,7 +67,7 @@ public class StructureViewSettings
   public static void setExternalSecondaryStructure(
           boolean externalSecondaryStructure)
   {
-    StructureViewSettings.externalSecondaryStructure = externalSecondaryStructure;
+    StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
   }
 
   public static boolean isShowSeqFeatures()
@@ -77,7 +77,7 @@ public class StructureViewSettings
 
   public static void setShowSeqFeatures(boolean showSeqFeatures)
   {
-    StructureViewSettings.showSeqFeatures = showSeqFeatures;
+    StructureImportSettings.showSeqFeatures = showSeqFeatures;
   }
 
   public static String getCurrentDefaultFormat()
@@ -87,7 +87,17 @@ public class StructureViewSettings
 
   public static void setCurrentDefaultFormat(String currentDefaultFormat)
   {
-    StructureViewSettings.currentDefaultFormat = currentDefaultFormat;
+    StructureImportSettings.currentDefaultFormat = currentDefaultFormat;
+  }
+
+  public static boolean isProcessHETATMs()
+  {
+    return processHETATMs;
+  }
+
+  public static void setProcessHETATMs(boolean processHETATMs)
+  {
+    StructureImportSettings.processHETATMs = processHETATMs;
   }
 
 }
index d3a6238..d945699 100644 (file)
@@ -30,7 +30,7 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceI;
 import jalview.io.FormatAdapter;
 import jalview.io.PDBFeatureSettings;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.util.MessageManager;
 import jalview.ws.ebi.EBIFetchClient;
 
@@ -132,12 +132,12 @@ public class Pdb extends EbiFileRetrievedProxy
       stopQuery();
       return null;
     }
-    String ext = StructureViewSettings.getCurrentDefaultFormat()
+    String ext = StructureImportSettings.getCurrentDefaultFormat()
             .equalsIgnoreCase("mmcif") ? ".cif"
             : ".xml";
     EBIFetchClient ebi = new EBIFetchClient();
     file = ebi.fetchDataAsFile("pdb:" + id,
-            StructureViewSettings.getCurrentDefaultFormat().toLowerCase(),
+            StructureImportSettings.getCurrentDefaultFormat().toLowerCase(),
             ext)
             .getAbsolutePath();
     stopQuery();
@@ -150,7 +150,7 @@ public class Pdb extends EbiFileRetrievedProxy
 
       pdbAlignment = new FormatAdapter().readFile(file,
               jalview.io.AppletFormatAdapter.FILE,
-              StructureViewSettings.getCurrentDefaultFormat());
+              StructureImportSettings.getCurrentDefaultFormat());
       if (pdbAlignment != null)
       {
         List<SequenceI> toremove = new ArrayList<SequenceI>();
index ff745ac..0406128 100644 (file)
@@ -32,7 +32,7 @@ import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.schemes.ColourSchemeI;
 import jalview.schemes.TaylorColourScheme;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 
 import java.awt.Color;
 import java.util.Vector;
@@ -56,7 +56,7 @@ public class PDBChainTest
   public void setUp()
   {
     System.out.println("setup");
-    StructureViewSettings.setShowSeqFeatures(true);
+    StructureImportSettings.setShowSeqFeatures(true);
     c = new PDBChain("1GAQ", "A");
   }
 
index 7ac1579..0627a4a 100644 (file)
@@ -30,6 +30,7 @@ import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
 import jalview.io.AppletFormatAdapter;
 import jalview.io.FileLoader;
+import jalview.structure.StructureImportSettings;
 
 import java.util.Vector;
 
@@ -55,7 +56,7 @@ public class JmolParserTest
 
   //@formatter:off
   // a modified and very cut-down extract of 4UJ4
-  String pdbWithChainBreak =
+  String pastePDBDataWithChainBreak =
      "HEADER    TRANSPORT PROTEIN                       08-APR-15   4UJ4\n" +
      // chain B has missing residues; these should all go in the same sequence:
      "ATOM   1909  CA  VAL B 358      21.329 -19.739 -67.740  1.00201.05           C\n" +
@@ -105,6 +106,31 @@ public class JmolParserTest
   @Test(groups = { "Functional" })
   public void testFileParser() throws Exception
   {
+    StructureImportSettings.setProcessHETATMs(false);
+    for (String pdbStr : testFile)
+    {
+      PDBfile mctest = new PDBfile(false, false, false, pdbStr,
+              AppletFormatAdapter.FILE);
+      JmolParser jtest = new JmolParser(false, false, false, pdbStr,
+              jalview.io.AppletFormatAdapter.FILE);
+      Vector<SequenceI> seqs = jtest.getSeqs(), mcseqs = mctest.getSeqs();
+
+      assertTrue(
+              "No sequences extracted from testfile\n"
+                      + (jtest.hasWarningMessage() ? jtest.getWarningMessage()
+                              : "(No warnings raised)"), seqs != null
+                      && seqs.size() > 0);
+      for (SequenceI sq : seqs)
+      {
+        assertEquals("JMol didn't process " + pdbStr
+                + " to the same sequence as MCView",
+                sq.getSequenceAsString(), mcseqs.remove(0)
+                        .getSequenceAsString());
+        AlignmentI al = new Alignment(new SequenceI[] { sq });
+        validateSecStrRows(al);
+      }
+    }
+    StructureImportSettings.setProcessHETATMs(true);
     for (String pdbStr : testFile)
     {
       PDBfile mctest = new PDBfile(false, false, false, pdbStr,
@@ -173,14 +199,15 @@ public class JmolParserTest
   @Test(groups = { "Functional" })
   public void testParse_missingResidues() throws Exception
   {
-    PDBfile mctest = new PDBfile(false, false, false, pdbWithChainBreak,
+    PDBfile mctest = new PDBfile(false, false, false,
+            pastePDBDataWithChainBreak,
             AppletFormatAdapter.PASTE);
     boolean annotFromStructure = false;
     boolean localSecondaryStruct = false;
     boolean serviceSecondaryStruct = false;
     JmolParser jtest = new JmolParser(annotFromStructure,
             localSecondaryStruct, serviceSecondaryStruct,
-            pdbWithChainBreak,
+            pastePDBDataWithChainBreak,
             jalview.io.AppletFormatAdapter.PASTE);
     Vector<SequenceI> seqs = jtest.getSeqs();
     Vector<SequenceI> mcseqs = mctest.getSeqs();
index b39b2bd..c956da1 100644 (file)
@@ -76,12 +76,12 @@ public class AlignViewportTest
     /*
      * Set up sequence pdb ids
      */
-    PDBEntry pdb1 = new PDBEntry("1ABC", "A", Type.PDB, "1ABC.pdb");
-    PDBEntry pdb2 = new PDBEntry("2ABC", "A", Type.PDB, "2ABC.pdb");
-    PDBEntry pdb3 = new PDBEntry("3ABC", "A", Type.PDB, "3ABC.pdb");
+    PDBEntry pdb1 = new PDBEntry("1ABC", "B", Type.PDB, "1ABC.pdb");
+    PDBEntry pdb2 = new PDBEntry("2ABC", "C", Type.PDB, "2ABC.pdb");
+    PDBEntry pdb3 = new PDBEntry("3ABC", "D", Type.PDB, "3ABC.pdb");
 
     /*
-     * seq1 and seq3 refer to 1ABC, seq2 to 2ABC, none to 3ABC
+     * seq1 and seq3 refer to 1abcB, seq2 to 2abcC, none to 3abcD
      */
     al.getSequenceAt(0).getDatasetSequence()
             .addPDBId(new PDBEntry("1ABC", "B", Type.PDB, "1ABC.pdb"));
index 62d76a2..3524a88 100644 (file)
@@ -31,6 +31,7 @@ import jalview.datamodel.PDBEntry;
 import jalview.datamodel.SequenceFeature;
 import jalview.datamodel.SequenceI;
 import jalview.gui.AlignFrame;
+import jalview.structure.StructureImportSettings;
 
 import java.io.File;
 
@@ -65,6 +66,7 @@ public class AnnotatedPDBFileInputTest
     al = af.getViewport().getAlignment();
     pdbId = al.getSequenceAt(0).getDatasetSequence().getAllPDBEntries()
             .get(0).getId();
+    StructureImportSettings.setCurrentDefaultFormat("PDB");
   }
 
   @Test(groups = { "Functional" })
index 8674ed8..5ab43b5 100644 (file)
@@ -250,7 +250,7 @@ public class Mapping
   @Test(groups = { "Functional" })
   public void compareTransferredToRefPDBAnnot() throws Exception
   {
-    StructureViewSettings.setShowSeqFeatures(true);
+    StructureImportSettings.setShowSeqFeatures(true);
     AlignFrame ref = new FileLoader(false)
             .LoadFileWaitTillLoaded("test/jalview/ext/jmol/1QCF.pdb",
                     jalview.io.FormatAdapter.FILE);
index 999d158..16f56a6 100644 (file)
@@ -43,7 +43,7 @@ public class StructureSelectionManagerTest
   @BeforeMethod(alwaysRun = true)
   public void setUp()
   {
-    StructureViewSettings.setShowSeqFeatures(true);
+    StructureImportSettings.setShowSeqFeatures(true);
     ssm = new StructureSelectionManager();
   }
 
index 27d2643..0c810a3 100644 (file)
@@ -25,7 +25,7 @@ import static org.testng.AssertJUnit.assertTrue;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.SequenceI;
-import jalview.structure.StructureViewSettings;
+import jalview.structure.StructureImportSettings;
 import jalview.ws.seqfetcher.DbSourceProxy;
 
 import java.util.List;
@@ -86,7 +86,7 @@ public class PDBSequenceFetcherTest
   {
     Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
             Boolean.TRUE.toString());
-    StructureViewSettings.setCurrentDefaultFormat("PDB");
+    StructureImportSettings.setCurrentDefaultFormat("PDB");
 
     testRetrieveProteinSeqFromPDB();
   }
@@ -96,7 +96,7 @@ public class PDBSequenceFetcherTest
   {
     Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
             Boolean.TRUE.toString());
-    StructureViewSettings.setCurrentDefaultFormat("mmCIF");
+    StructureImportSettings.setCurrentDefaultFormat("mmCIF");
     testRetrieveProteinSeqFromPDB();
   }