private final static String PDB_DOWNLOAD_FORMAT = PDBEntry.Type.MMCIF
.toString();
- private final static String DEFAULT_PDB_FILE_PARSER = StructureImportSettings.StructureParser.JMOL_PARSER
- .toString();
/*
* a date formatter using a fixed (rather than the user's) locale;
StructureImportSettings.setDefaultStructureFileFormat(jalview.bin.Cache
.getDefault(
"PDB_DOWNLOAD_FORMAT", PDB_DOWNLOAD_FORMAT));
- StructureImportSettings
- .setDefaultPDBFileParser(jalview.bin.Cache.getDefault(
- "DEFAULT_PDB_FILE_PARSER", DEFAULT_PDB_FILE_PARSER));
+
// jnlpVersion will be null if we're using InstallAnywhere
// Dont do this check if running in headless mode
if (jnlpVersion == null
}
else if (format.equals("PDB"))
{
- // TODO obtain config value from preference settings.
- // Set value to 'true' to test PDB processing with Jmol: JAL-1213
- boolean isParseWithJMOL = StructureImportSettings
- .getDefaultPDBFileParser().equalsIgnoreCase(
- StructureImportSettings.StructureParser.JMOL_PARSER
- .toString());
- if (isParseWithJMOL)
- {
+
StructureImportSettings.addSettings(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct);
alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure,
localSecondaryStruct, serviceSecondaryStruct, inFile,
type);
- }
- else
- {
- StructureImportSettings.addSettings(annotFromStructure,
- localSecondaryStruct, serviceSecondaryStruct);
- StructureImportSettings.setShowSeqFeatures(true);
- alignFile = new MCview.PDBfile(annotFromStructure,
- localSecondaryStruct, serviceSecondaryStruct, inFile,
- type);
- }
((StructureFile) alignFile).setDbRefType(format);
}
else if (format.equalsIgnoreCase("mmCIF"))
* Determines the parser used for parsing PDB format file. Possible options
* are : JMolParser|JalveiwParser
*/
- private static StructureParser defaultPDBFileParser = StructureParser.JMOL_PARSER;
public static void addSettings(boolean addAlignmentAnnotations,
boolean processSecStr, boolean externalSecStr)
{
.valueOf(defaultStructureFileFormat.toUpperCase());
}
- public static String getDefaultPDBFileParser()
- {
- return defaultPDBFileParser.toString();
- }
-
- public static void setDefaultPDBFileParser(
- StructureParser defaultPDBFileParser)
- {
- StructureImportSettings.defaultPDBFileParser = defaultPDBFileParser;
- }
-
- public static void setDefaultPDBFileParser(String defaultPDBFileParser)
- {
- StructureImportSettings.defaultPDBFileParser = StructureParser
- .valueOf(defaultPDBFileParser.toUpperCase());
- }
}
boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts();
try
{
-
- boolean isParseWithJMOL = StructureImportSettings
- .getDefaultPDBFileParser().equalsIgnoreCase(
- StructureImportSettings.StructureParser.JMOL_PARSER
- .toString());
- if (isParseWithJMOL || (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))
import jalview.io.AppletFormatAdapter;
import jalview.io.FileLoader;
import jalview.structure.StructureImportSettings;
-import jalview.structure.StructureImportSettings.StructureParser;
import java.util.Vector;
Cache.applicationProperties.setProperty("ADD_SS_ANN",
Boolean.TRUE.toString());
StructureImportSettings.setDefaultStructureFileFormat("PDB");
- StructureImportSettings
- .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
}
@Test(groups = { "Functional" })
import jalview.datamodel.SequenceI;
import jalview.gui.AlignFrame;
import jalview.structure.StructureImportSettings;
-import jalview.structure.StructureImportSettings.StructureParser;
import java.io.File;
{
System.out.println("CalcId: " + aa.getCalcId());
- if (StructureImportSettings.getDefaultPDBFileParser().equals(
- StructureParser.JALVIEW_PARSER))
- {
- assertTrue(MCview.PDBfile.isCalcIdForFile(aa, pdbId));
- }
+ // if (StructureImportSettings.getDefaultPDBFileParser().equals(
+ // StructureParser.JALVIEW_PARSER))
+ // {
+ // assertTrue(MCview.PDBfile.isCalcIdForFile(aa, pdbId));
+ // }
}
}
}
import jalview.datamodel.AlignmentI;
import jalview.datamodel.SequenceI;
import jalview.structure.StructureImportSettings;
-import jalview.structure.StructureImportSettings.StructureParser;
import jalview.ws.seqfetcher.DbSourceProxy;
import java.util.List;
Cache.applicationProperties.setProperty("STRUCT_FROM_PDB",
Boolean.TRUE.toString());
StructureImportSettings.setDefaultStructureFileFormat("PDB");
- StructureImportSettings
- .setDefaultPDBFileParser(StructureParser.JALVIEW_PARSER);
testRetrieveProteinSeqFromPDB();
}