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 public enum StructureParser
36 JMOL_PARSER, JALVIEW_PARSER
41 * Determines the default file format for structure files to be downloaded
42 * from the PDB sequence fetcher. Possible options include: PDB|mmCIF
44 private static PDBEntry.Type defaultStructureFileFormat = Type.PDB;
47 * Determines the parser used for parsing PDB format file. Possible options
48 * are : JMolParser|JalveiwParser
50 private static StructureParser defaultPDBFileParser = StructureParser.JMOL_PARSER;
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());
115 public static String getDefaultPDBFileParser()
117 return defaultPDBFileParser.toString();
120 public static void setDefaultPDBFileParser(
121 StructureParser defaultPDBFileParser)
123 StructureImportSettings.defaultPDBFileParser = defaultPDBFileParser;
126 public static void setDefaultPDBFileParser(String defaultPDBFileParser)
128 StructureImportSettings.defaultPDBFileParser = StructureParser
129 .valueOf(defaultPDBFileParser.toUpperCase());