JAL-2023 stronger check for whether to start cdna consensus
[jalview.git] / src / jalview / structure / StructureImportSettings.java
1 package jalview.structure;
2
3 import jalview.datamodel.DBRefSource;
4
5 public class StructureImportSettings
6 {
7   /**
8    * set to true to add derived sequence annotations (temp factor read from
9    * file, or computed secondary structure) to the alignment
10    */
11   private static boolean visibleChainAnnotation = false;
12
13   /**
14    * Set true to predict secondary structure (using JMol for protein, Annotate3D
15    * for RNA)
16    */
17   private static boolean predictSecStr = false;
18
19   /**
20    * Set true (with predictSecondaryStructure=true) to predict secondary
21    * structure using an external service (currently Annotate3D for RNA only)
22    */
23   private static boolean externalSecondaryStructure = false;
24
25   private static boolean showSeqFeatures = true;
26
27   private static boolean processHETATMs = false;
28
29   public static final String JMOL_PARSER = "JMolParser";
30
31   public static final String JALVIEW_PARSER = "JalViewParser";
32
33   public static final String MMCIF = "mmCIF";
34
35   public static final String PDB = "PDB";
36
37   /**
38    * Determines the default file format for structure files to be downloaded
39    * from the PDB sequence fetcher. Possible options include: PDB|mmCIF
40    */
41   private static String defaultStructureFileFormat = DBRefSource.PDB;
42
43   /**
44    * Determines the parser used for parsing PDB format file. Possible options
45    * are : JMolParser|JalveiwParser
46    */
47   private static String defaultPDBFileParser = JMOL_PARSER;
48   public static void addSettings(boolean addAlignmentAnnotations,
49           boolean predictSecStr, boolean externalSecStr)
50   {
51     StructureImportSettings.visibleChainAnnotation = addAlignmentAnnotations;
52     StructureImportSettings.predictSecStr = predictSecStr;
53     StructureImportSettings.externalSecondaryStructure = externalSecStr;
54     StructureImportSettings.showSeqFeatures = true;
55   }
56
57   public static boolean isVisibleChainAnnotation()
58   {
59     return visibleChainAnnotation;
60   }
61
62   public static void setVisibleChainAnnotation(
63           boolean visibleChainAnnotation)
64   {
65     StructureImportSettings.visibleChainAnnotation = visibleChainAnnotation;
66   }
67
68   public static boolean isPredictSecondaryStructure()
69   {
70     return predictSecStr;
71   }
72
73   public static void setPredictSecondaryStructure(
74           boolean predictSecondaryStructure)
75   {
76     StructureImportSettings.predictSecStr = predictSecondaryStructure;
77   }
78
79   public static boolean isExternalSecondaryStructure()
80   {
81     return externalSecondaryStructure;
82   }
83
84   public static void setExternalSecondaryStructure(
85           boolean externalSecondaryStructure)
86   {
87     StructureImportSettings.externalSecondaryStructure = externalSecondaryStructure;
88   }
89
90   public static boolean isShowSeqFeatures()
91   {
92     return showSeqFeatures;
93   }
94
95   public static void setShowSeqFeatures(boolean showSeqFeatures)
96   {
97     StructureImportSettings.showSeqFeatures = showSeqFeatures;
98   }
99
100   public static String getDefaultStructureFileFormat()
101   {
102     return defaultStructureFileFormat;
103   }
104
105   public static void setDefaultStructureFileFormat(
106           String defaultStructureFileFormat)
107   {
108     StructureImportSettings.defaultStructureFileFormat = defaultStructureFileFormat;
109   }
110
111   public static boolean isProcessHETATMs()
112   {
113     return processHETATMs;
114   }
115
116   public static void setProcessHETATMs(boolean processHETATMs)
117   {
118     StructureImportSettings.processHETATMs = processHETATMs;
119   }
120
121   public static String getDefaultPDBFileParser()
122   {
123     return defaultPDBFileParser;
124   }
125
126   public static void setDefaultPDBFileParser(String defaultPDBFileParser)
127   {
128     StructureImportSettings.defaultPDBFileParser = defaultPDBFileParser;
129   }
130
131 }