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
8 * TODO: tests for race conditions (all fields are static, is that correct ?)
13 public class StructureImportSettings
16 * set to true to add derived sequence annotations (temp factor read from
17 * file, or computed secondary structure) to the alignment
19 private static boolean visibleChainAnnotation = false;
22 * Set true to predict secondary structure (using JMol for protein, Annotate3D
25 private static boolean processSecStr = false;
28 * Set true (with predictSecondaryStructure=true) to predict secondary
29 * structure using an external service (currently Annotate3D for RNA only)
31 private static boolean externalSecondaryStructure = false;
33 private static boolean showSeqFeatures = true;
35 public enum StructureParser
37 JMOL_PARSER, JALVIEW_PARSER
42 * Determines the default file format for structure files to be downloaded
43 * from the PDB sequence fetcher. Possible options include: PDB|mmCIF
45 private static PDBEntry.Type defaultStructureFileFormat = Type.PDB;
48 * Determines the parser used for parsing PDB format file. Possible options
49 * are : JMolParser|JalveiwParser
51 public static void addSettings(boolean addAlignmentAnnotations,
52 boolean processSecStr, boolean externalSecStr)
54 StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
55 StructureImportSettings.processSecStr = processSecStr;
56 StructureImportSettings.externalSecondaryStructure = externalSecStr;
57 StructureImportSettings.showSeqFeatures = true;
60 public static boolean isVisibleChainAnnotation()
62 return visibleChainAnnotation;
65 public static void setVisibleChainAnnotation(
66 boolean visibleChainAnnotation)
68 StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
71 public static boolean isProcessSecondaryStructure()
76 public static void setProcessSecondaryStructure(
77 boolean processSecondaryStructure)
79 StructureImportSettings.processSecStr = processSecondaryStructure;
82 public static boolean isExternalSecondaryStructure()
84 return externalSecondaryStructure;
87 public static void setExternalSecondaryStructure(
88 boolean externalSecondaryStructure)
90 StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
93 public static boolean isShowSeqFeatures()
95 return showSeqFeatures;
98 public static void setShowSeqFeatures(boolean showSeqFeatures)
100 StructureImportSettings.showSeqFeatures = showSeqFeatures;
103 public static String getDefaultStructureFileFormat()
105 return defaultStructureFileFormat.toString();
108 public static void setDefaultStructureFileFormat(
109 String defaultStructureFileFormat)
111 StructureImportSettings.defaultStructureFileFormat = PDBEntry.Type
112 .valueOf(defaultStructureFileFormat.toUpperCase());