| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package jalview.structure; |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
import java.util.Locale; |
| 25 |
|
|
| 26 |
|
import jalview.bin.ApplicationSingletonProvider; |
| 27 |
|
import jalview.bin.ApplicationSingletonProvider.ApplicationSingletonI; |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
import jalview.datamodel.PDBEntry; |
| 31 |
|
import jalview.datamodel.PDBEntry.Type; |
| 32 |
|
import jalview.util.MessageManager; |
| 33 |
|
|
| 34 |
|
|
| 35 |
|
|
| 36 |
|
|
| 37 |
|
|
| 38 |
|
@author |
| 39 |
|
|
| 40 |
|
|
| |
|
| 0% |
Uncovered Elements: 39 (39) |
Complexity: 18 |
Complexity Density: 0.86 |
|
| 41 |
|
public class StructureImportSettings implements ApplicationSingletonI |
| 42 |
|
{ |
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 43 |
0 |
private StructureImportSettings()... |
| 44 |
|
{ |
| 45 |
|
|
| 46 |
|
} |
| 47 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 48 |
0 |
private static StructureImportSettings getInstance()... |
| 49 |
|
{ |
| 50 |
0 |
return ApplicationSingletonProvider |
| 51 |
|
.getInstance(StructureImportSettings.class); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
private boolean visibleChainAnnotation = false; |
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
private static boolean processSecStr = false; |
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
private boolean externalSecondaryStructure = false; |
| 70 |
|
|
| 71 |
|
private static boolean showSeqFeatures = true; |
| 72 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 0 |
Complexity Density: - |
|
| 73 |
|
public enum StructureParser |
| 74 |
|
{ |
| 75 |
|
JMOL_PARSER, JALVIEW_PARSER |
| 76 |
|
} |
| 77 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 1 |
|
| 78 |
|
public static enum TFType |
| 79 |
|
{ |
| 80 |
|
DEFAULT, PLDDT, QMEANDISCO; |
| 81 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 82 |
0 |
@Override... |
| 83 |
|
public String toString() |
| 84 |
|
{ |
| 85 |
0 |
return MessageManager.getString( |
| 86 |
|
"label.tftype_" + this.name().toLowerCase(Locale.ROOT)); |
| 87 |
|
} |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
|
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
private PDBEntry.Type defaultStructureFileFormat = Type.PDB; |
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
|
| 99 |
|
|
| 100 |
|
private StructureParser defaultPDBFileParser = StructureParser.JMOL_PARSER; |
| 101 |
|
|
| 102 |
|
private static TFType temperatureFactorType; |
| 103 |
|
|
| |
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
| 104 |
0 |
public static void addSettings(boolean addAlignmentAnnotations,... |
| 105 |
|
boolean processSecStr, boolean externalSecStr) |
| 106 |
|
{ |
| 107 |
0 |
StructureImportSettings s = getInstance(); |
| 108 |
0 |
s.visibleChainAnnotation = addAlignmentAnnotations; |
| 109 |
0 |
s.processSecStr = processSecStr; |
| 110 |
0 |
s.externalSecondaryStructure = externalSecStr; |
| 111 |
0 |
s.showSeqFeatures = true; |
| 112 |
|
} |
| 113 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 114 |
0 |
public static boolean isVisibleChainAnnotation()... |
| 115 |
|
{ |
| 116 |
0 |
return getInstance().visibleChainAnnotation; |
| 117 |
|
} |
| 118 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 119 |
0 |
public static void setTemperatureFactorType(TFType t)... |
| 120 |
|
{ |
| 121 |
0 |
StructureImportSettings.temperatureFactorType = t; |
| 122 |
|
} |
| 123 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 124 |
0 |
public static void setVisibleChainAnnotation(... |
| 125 |
|
boolean visibleChainAnnotation) |
| 126 |
|
{ |
| 127 |
0 |
getInstance().visibleChainAnnotation = visibleChainAnnotation; |
| 128 |
|
} |
| 129 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 130 |
0 |
public static boolean isProcessSecondaryStructure()... |
| 131 |
|
{ |
| 132 |
0 |
return getInstance().processSecStr; |
| 133 |
|
} |
| 134 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 135 |
0 |
public static void setProcessSecondaryStructure(... |
| 136 |
|
boolean processSecondaryStructure) |
| 137 |
|
{ |
| 138 |
0 |
getInstance().processSecStr = processSecondaryStructure; |
| 139 |
|
} |
| 140 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 141 |
0 |
public static boolean isExternalSecondaryStructure()... |
| 142 |
|
{ |
| 143 |
0 |
return getInstance().externalSecondaryStructure; |
| 144 |
|
} |
| 145 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 146 |
0 |
public static void setExternalSecondaryStructure(... |
| 147 |
|
boolean externalSecondaryStructure) |
| 148 |
|
{ |
| 149 |
0 |
getInstance().externalSecondaryStructure = externalSecondaryStructure; |
| 150 |
|
} |
| 151 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 152 |
0 |
public static boolean isShowSeqFeatures()... |
| 153 |
|
{ |
| 154 |
0 |
return getInstance().showSeqFeatures; |
| 155 |
|
} |
| 156 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 157 |
0 |
public static void setShowSeqFeatures(boolean showSeqFeatures)... |
| 158 |
|
{ |
| 159 |
0 |
getInstance().showSeqFeatures = showSeqFeatures; |
| 160 |
|
} |
| 161 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 162 |
0 |
public static PDBEntry.Type getDefaultStructureFileFormat()... |
| 163 |
|
{ |
| 164 |
0 |
return getInstance().defaultStructureFileFormat; |
| 165 |
|
} |
| 166 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 167 |
0 |
public static void setDefaultStructureFileFormat(... |
| 168 |
|
String defaultStructureFileFormat) |
| 169 |
|
{ |
| 170 |
0 |
getInstance().defaultStructureFileFormat = PDBEntry.Type |
| 171 |
|
.valueOf(defaultStructureFileFormat.toUpperCase(Locale.ROOT)); |
| 172 |
|
} |
| 173 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 174 |
0 |
public static String getDefaultPDBFileParser()... |
| 175 |
|
{ |
| 176 |
0 |
return getInstance().defaultPDBFileParser.toString(); |
| 177 |
|
} |
| 178 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 179 |
0 |
public static void setDefaultPDBFileParser(... |
| 180 |
|
StructureParser defaultPDBFileParser) |
| 181 |
|
{ |
| 182 |
0 |
getInstance().defaultPDBFileParser = defaultPDBFileParser; |
| 183 |
|
} |
| 184 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 185 |
0 |
public static void setDefaultPDBFileParser(String defaultPDBFileParser)... |
| 186 |
|
{ |
| 187 |
0 |
getInstance().defaultPDBFileParser = StructureParser |
| 188 |
|
.valueOf(defaultPDBFileParser.toUpperCase(Locale.ROOT)); |
| 189 |
|
} |
| 190 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 191 |
0 |
public static TFType getTemperatureFactorType()... |
| 192 |
|
{ |
| 193 |
0 |
return temperatureFactorType; |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
} |