1 package jalview.structure;
3 import jalview.datamodel.PDBEntry;
4 import jalview.datamodel.PDBEntry.Type;
7 * bean holding settings for structure IO. TODO: tests for validation of values
12 public class StructureImportSettings
15 * set to true to add derived sequence annotations (temp factor read from
16 * file, or computed secondary structure) to the alignment
18 private static boolean visibleChainAnnotation = false;
21 * Set true to predict secondary structure (using JMol for protein, Annotate3D
24 private static boolean processSecStr = false;
27 * Set true (with predictSecondaryStructure=true) to predict secondary
28 * structure using an external service (currently Annotate3D for RNA only)
30 private static boolean externalSecondaryStructure = false;
32 private static boolean showSeqFeatures = true;
34 private static boolean processHETATMs = false;
36 public enum StructureParser
38 JMOL_PARSER, JALVIEW_PARSER
43 * Determines the default file format for structure files to be downloaded
44 * from the PDB sequence fetcher. Possible options include: PDB|mmCIF
46 private static PDBEntry.Type defaultStructureFileFormat = Type.PDB;
49 * Determines the parser used for parsing PDB format file. Possible options
50 * are : JMolParser|JalveiwParser
52 private static StructureParser defaultPDBFileParser = StructureParser.JMOL_PARSER;
53 public static void addSettings(boolean addAlignmentAnnotations,
54 boolean processSecStr, boolean externalSecStr)
56 StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
57 StructureImportSettings.processSecStr = processSecStr;
58 StructureImportSettings.externalSecondaryStructure = externalSecStr;
59 StructureImportSettings.showSeqFeatures = true;
62 public static boolean isVisibleChainAnnotation()
64 return visibleChainAnnotation;
67 public static void setVisibleChainAnnotation(
68 boolean visibleChainAnnotation)
70 StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
73 public static boolean isProcessSecondaryStructure()
78 public static void setProcessSecondaryStructure(
79 boolean processSecondaryStructure)
81 StructureImportSettings.processSecStr = processSecondaryStructure;
84 public static boolean isExternalSecondaryStructure()
86 return externalSecondaryStructure;
89 public static void setExternalSecondaryStructure(
90 boolean externalSecondaryStructure)
92 StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
95 public static boolean isShowSeqFeatures()
97 return showSeqFeatures;
100 public static void setShowSeqFeatures(boolean showSeqFeatures)
102 StructureImportSettings.showSeqFeatures = showSeqFeatures;
105 public static String getDefaultStructureFileFormat()
107 return defaultStructureFileFormat.toString();
110 public static void setDefaultStructureFileFormat(
111 String defaultStructureFileFormat)
113 StructureImportSettings.defaultStructureFileFormat = PDBEntry.Type
114 .valueOf(defaultStructureFileFormat);
117 public static boolean isProcessHETATMs()
119 return processHETATMs;
122 public static void setProcessHETATMs(boolean processHETATMs)
124 StructureImportSettings.processHETATMs = processHETATMs;
127 public static String getDefaultPDBFileParser()
129 return defaultPDBFileParser.toString();
132 public static void setDefaultPDBFileParser(
133 StructureParser defaultPDBFileParser)
135 StructureImportSettings.defaultPDBFileParser = defaultPDBFileParser;
138 public static void setDefaultPDBFileParser(String defaultPDBFileParser)
140 StructureImportSettings.defaultPDBFileParser = StructureParser
141 .valueOf(defaultPDBFileParser);