| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
|
| 17 |
|
|
| 18 |
|
|
| 19 |
|
|
| 20 |
|
|
| 21 |
|
package jalview.io; |
| 22 |
|
|
| 23 |
|
import java.awt.Color; |
| 24 |
|
import java.io.IOException; |
| 25 |
|
import java.lang.reflect.Constructor; |
| 26 |
|
import java.net.MalformedURLException; |
| 27 |
|
import java.util.List; |
| 28 |
|
import java.util.Vector; |
| 29 |
|
|
| 30 |
|
import jalview.analysis.AlignSeq; |
| 31 |
|
import jalview.api.FeatureSettingsModelI; |
| 32 |
|
import jalview.datamodel.Alignment; |
| 33 |
|
import jalview.datamodel.AlignmentAnnotation; |
| 34 |
|
import jalview.datamodel.AlignmentI; |
| 35 |
|
import jalview.datamodel.DBRefEntry; |
| 36 |
|
import jalview.datamodel.DBRefSource; |
| 37 |
|
import jalview.datamodel.PDBEntry; |
| 38 |
|
import jalview.datamodel.PDBEntry.Type; |
| 39 |
|
import jalview.datamodel.SequenceI; |
| 40 |
|
import jalview.ext.jmol.JmolParser; |
| 41 |
|
import jalview.structure.StructureImportSettings; |
| 42 |
|
import jalview.structure.StructureImportSettings.TFType; |
| 43 |
|
import mc_view.PDBChain; |
| 44 |
|
|
| |
|
| 74.9% |
Uncovered Elements: 54 (215) |
Complexity: 70 |
Complexity Density: 0.51 |
|
| 45 |
|
public abstract class StructureFile extends AlignFile |
| 46 |
|
{ |
| 47 |
|
private String id; |
| 48 |
|
|
| 49 |
|
private PDBEntry.Type dbRefType; |
| 50 |
|
|
| 51 |
|
|
| 52 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
protected boolean visibleChainAnnotation = false; |
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
protected boolean predictSecondaryStructure = false; |
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
protected boolean externalSecondaryStructure = false; |
| 68 |
|
|
| 69 |
|
private Vector<PDBChain> chains; |
| 70 |
|
|
| 71 |
|
private boolean pdbIdAvailable; |
| 72 |
|
|
| 73 |
|
private TFType temperatureFactorType = TFType.DEFAULT; |
| 74 |
|
|
| 75 |
|
private String paeMatrix = null; |
| 76 |
|
|
| 77 |
|
private boolean alphaFoldModel; |
| 78 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 79 |
42 |
public void setPAEMatrix(String paeFilename)... |
| 80 |
|
{ |
| 81 |
42 |
paeMatrix = paeFilename; |
| 82 |
|
} |
| 83 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 84 |
42 |
public String getPAEMatrix()... |
| 85 |
|
{ |
| 86 |
42 |
return paeMatrix; |
| 87 |
|
} |
| 88 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 89 |
195 |
public boolean hasPAEMatrix()... |
| 90 |
|
{ |
| 91 |
195 |
return paeMatrix != null; |
| 92 |
|
} |
| 93 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 94 |
172 |
public void setTemperatureFactorType(TFType t)... |
| 95 |
|
{ |
| 96 |
172 |
this.temperatureFactorType = t; |
| 97 |
|
} |
| 98 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 99 |
251 |
public TFType getTemperatureFactorType()... |
| 100 |
|
{ |
| 101 |
251 |
return temperatureFactorType; |
| 102 |
|
} |
| 103 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 104 |
117 |
public void setAlphafoldModel(boolean afm)... |
| 105 |
|
{ |
| 106 |
117 |
alphaFoldModel = afm; |
| 107 |
|
} |
| 108 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 109 |
446 |
public boolean isAlphafoldModel()... |
| 110 |
|
{ |
| 111 |
446 |
return alphaFoldModel; |
| 112 |
|
} |
| 113 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 114 |
0 |
public StructureFile(Object inFile, DataSourceType sourceType)... |
| 115 |
|
throws IOException |
| 116 |
|
{ |
| 117 |
0 |
this(inFile, sourceType, null); |
| 118 |
|
} |
| 119 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 120 |
21 |
public StructureFile(Object inFile, DataSourceType sourceType,... |
| 121 |
|
TFType tempfacType) throws IOException |
| 122 |
|
{ |
| 123 |
21 |
super(false, inFile, sourceType); |
| 124 |
21 |
this.setTemperatureFactorType(tempfacType); |
| 125 |
21 |
doParse(); |
| 126 |
|
} |
| 127 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 128 |
0 |
public StructureFile(FileParse fp) throws IOException... |
| 129 |
|
{ |
| 130 |
0 |
this(fp, true); |
| 131 |
|
} |
| 132 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 133 |
5 |
public StructureFile(FileParse fp, boolean doXferSettings)... |
| 134 |
|
throws IOException |
| 135 |
|
{ |
| 136 |
5 |
super(fp, doXferSettings); |
| 137 |
|
} |
| 138 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 139 |
167 |
public void addSettings(boolean addAlignmentAnnotations,... |
| 140 |
|
boolean predictSecondaryStructure, boolean externalSecStr) |
| 141 |
|
{ |
| 142 |
167 |
this.visibleChainAnnotation = addAlignmentAnnotations; |
| 143 |
167 |
this.predictSecondaryStructure = predictSecondaryStructure; |
| 144 |
167 |
this.externalSecondaryStructure = externalSecStr; |
| 145 |
|
} |
| 146 |
|
|
| |
|
| 85.7% |
Uncovered Elements: 1 (7) |
Complexity: 2 |
Complexity Density: 0.4 |
|
| 147 |
120 |
public void xferSettings()... |
| 148 |
|
{ |
| 149 |
120 |
if (this.getDoXferSettings()) |
| 150 |
|
{ |
| 151 |
120 |
this.visibleChainAnnotation = StructureImportSettings |
| 152 |
|
.isVisibleChainAnnotation(); |
| 153 |
120 |
this.predictSecondaryStructure = StructureImportSettings |
| 154 |
|
.isProcessSecondaryStructure(); |
| 155 |
120 |
this.externalSecondaryStructure = StructureImportSettings |
| 156 |
|
.isExternalSecondaryStructure(); |
| 157 |
120 |
this.temperatureFactorType = StructureImportSettings |
| 158 |
|
.getTemperatureFactorType(); |
| 159 |
|
} |
| 160 |
|
} |
| 161 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 162 |
167 |
public StructureFile(boolean parseImmediately, Object dataObject,... |
| 163 |
|
DataSourceType sourceType) throws IOException |
| 164 |
|
{ |
| 165 |
167 |
super(parseImmediately, dataObject, sourceType); |
| 166 |
|
} |
| 167 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 168 |
0 |
public StructureFile(boolean a, FileParse fp) throws IOException... |
| 169 |
|
{ |
| 170 |
0 |
super(a, fp); |
| 171 |
|
} |
| 172 |
|
|
| |
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 173 |
1 |
public StructureFile()... |
| 174 |
|
{ |
| 175 |
|
} |
| 176 |
|
|
| |
|
| 97% |
Uncovered Elements: 1 (33) |
Complexity: 6 |
Complexity Density: 0.24 |
|
| 177 |
304 |
protected SequenceI postProcessChain(PDBChain chain)... |
| 178 |
|
{ |
| 179 |
304 |
SequenceI pdbSequence = chain.sequence; |
| 180 |
304 |
pdbSequence.setName(getId() + "|" + pdbSequence.getName()); |
| 181 |
304 |
PDBEntry entry = new PDBEntry(); |
| 182 |
304 |
entry.setId(getId()); |
| 183 |
304 |
entry.setFakedPDBId(!isPPDBIdAvailable()); |
| 184 |
304 |
entry.setType(getStructureFileType()); |
| 185 |
304 |
if (chain.id != null) |
| 186 |
|
{ |
| 187 |
304 |
entry.setChainCode(chain.id); |
| 188 |
|
} |
| 189 |
304 |
if (inFile != null) |
| 190 |
|
{ |
| 191 |
280 |
entry.setFile(inFile.getAbsolutePath()); |
| 192 |
|
} |
| 193 |
|
else |
| 194 |
|
{ |
| 195 |
24 |
entry.setFile(getDataName()); |
| 196 |
|
} |
| 197 |
|
|
| 198 |
304 |
DBRefEntry sourceDBRef = new DBRefEntry(); |
| 199 |
304 |
sourceDBRef.setAccessionId(getId()); |
| 200 |
304 |
sourceDBRef.setSource(DBRefSource.PDB); |
| 201 |
|
|
| 202 |
|
|
| 203 |
304 |
sourceDBRef.setVersion(""); |
| 204 |
304 |
pdbSequence.addPDBId(entry); |
| 205 |
304 |
pdbSequence.addDBRef(sourceDBRef); |
| 206 |
304 |
SequenceI chainseq = pdbSequence; |
| 207 |
304 |
seqs.addElement(chainseq); |
| 208 |
304 |
AlignmentAnnotation[] chainannot = chainseq.getAnnotation(); |
| 209 |
|
|
| 210 |
304 |
if (chainannot != null && visibleChainAnnotation) |
| 211 |
|
{ |
| 212 |
408 |
for (int ai = 0; ai < chainannot.length; ai++) |
| 213 |
|
{ |
| 214 |
204 |
chainannot[ai].visible = visibleChainAnnotation; |
| 215 |
204 |
annotations.addElement(chainannot[ai]); |
| 216 |
|
} |
| 217 |
|
} |
| 218 |
304 |
return chainseq; |
| 219 |
|
} |
| 220 |
|
|
| 221 |
|
|
| 222 |
|
|
| 223 |
|
|
| 224 |
|
String structureFileType = PDBEntry.Type.PDB.toString(); |
| 225 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 226 |
354 |
protected void setStructureFileType(String structureFileType)... |
| 227 |
|
{ |
| 228 |
354 |
this.structureFileType = structureFileType; |
| 229 |
|
} |
| 230 |
|
|
| 231 |
|
|
| 232 |
|
|
| 233 |
|
|
| 234 |
|
@return |
| 235 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 236 |
304 |
public String getStructureFileType()... |
| 237 |
|
{ |
| 238 |
304 |
return structureFileType; |
| 239 |
|
} |
| 240 |
|
|
| |
|
| 0% |
Uncovered Elements: 20 (20) |
Complexity: 6 |
Complexity Density: 0.5 |
|
| 241 |
0 |
@SuppressWarnings({ "unchecked", "rawtypes" })... |
| 242 |
|
protected void processPdbFileWithAnnotate3d(List<SequenceI> rna) |
| 243 |
|
throws Exception |
| 244 |
|
{ |
| 245 |
|
|
| 246 |
|
|
| 247 |
|
|
| 248 |
|
|
| 249 |
0 |
try |
| 250 |
|
{ |
| 251 |
0 |
Class cl = Class.forName("jalview.ws.jws1.Annotate3D"); |
| 252 |
0 |
if (cl != null) |
| 253 |
|
{ |
| 254 |
|
|
| 255 |
|
|
| 256 |
0 |
Object annotate3d = cl.getConstructor(new Class[] {}) |
| 257 |
|
.newInstance(new Object[] {}); |
| 258 |
0 |
AlignmentI al = ((AlignmentI) cl |
| 259 |
|
.getMethod("getRNAMLFor", new Class[] |
| 260 |
|
{ FileParse.class }) |
| 261 |
|
.invoke(annotate3d, new Object[] |
| 262 |
|
{ new FileParse(getDataName(), dataSourceType) })); |
| 263 |
0 |
for (SequenceI sq : al.getSequences()) |
| 264 |
|
{ |
| 265 |
0 |
if (sq.getDatasetSequence() != null) |
| 266 |
|
{ |
| 267 |
0 |
if (sq.getDatasetSequence().getAllPDBEntries() != null) |
| 268 |
|
{ |
| 269 |
0 |
sq.getDatasetSequence().getAllPDBEntries().clear(); |
| 270 |
|
} |
| 271 |
|
} |
| 272 |
|
else |
| 273 |
|
{ |
| 274 |
0 |
if (sq.getAllPDBEntries() != null) |
| 275 |
|
{ |
| 276 |
0 |
sq.getAllPDBEntries().clear(); |
| 277 |
|
} |
| 278 |
|
} |
| 279 |
|
} |
| 280 |
0 |
replaceAndUpdateChains(rna, al, AlignSeq.DNA, false); |
| 281 |
|
} |
| 282 |
|
} catch (ClassNotFoundException x) |
| 283 |
|
{ |
| 284 |
|
|
| 285 |
|
} |
| 286 |
|
} |
| 287 |
|
|
| |
|
| 93.8% |
Uncovered Elements: 1 (16) |
Complexity: 4 |
Complexity Density: 0.33 |
|
| 288 |
5 |
@SuppressWarnings("unchecked")... |
| 289 |
|
protected void replaceAndUpdateChains(List<SequenceI> prot, AlignmentI al, |
| 290 |
|
String pep, boolean b) |
| 291 |
|
{ |
| 292 |
5 |
List<List<? extends Object>> replaced = AlignSeq |
| 293 |
|
.replaceMatchingSeqsWith(seqs, annotations, prot, al, pep, |
| 294 |
|
false); |
| 295 |
5 |
for (PDBChain ch : getChains()) |
| 296 |
|
{ |
| 297 |
14 |
int p = 0; |
| 298 |
14 |
for (SequenceI sq : (List<SequenceI>) replaced.get(0)) |
| 299 |
|
{ |
| 300 |
30 |
p++; |
| 301 |
30 |
if (sq == ch.sequence || sq.getDatasetSequence() == ch.sequence) |
| 302 |
|
{ |
| 303 |
14 |
p = -p; |
| 304 |
14 |
break; |
| 305 |
|
} |
| 306 |
|
} |
| 307 |
14 |
if (p < 0) |
| 308 |
|
{ |
| 309 |
14 |
p = -p - 1; |
| 310 |
|
|
| 311 |
14 |
ch.shadow = (SequenceI) replaced.get(1).get(p); |
| 312 |
14 |
ch.shadowMap = ((AlignSeq) replaced.get(2).get(p)) |
| 313 |
|
.getMappingFromS1(false); |
| 314 |
|
} |
| 315 |
|
} |
| 316 |
|
} |
| 317 |
|
|
| 318 |
|
|
| 319 |
|
|
| 320 |
|
|
| 321 |
|
|
| 322 |
|
@param |
| 323 |
|
@param |
| 324 |
|
|
| |
|
| 42.9% |
Uncovered Elements: 8 (14) |
Complexity: 6 |
Complexity Density: 0.6 |
|
| 325 |
5 |
protected void addSecondaryStructure(List<SequenceI> rnaSequences,... |
| 326 |
|
List<SequenceI> proteinSequences) |
| 327 |
|
{ |
| 328 |
|
|
| 329 |
|
|
| 330 |
|
|
| 331 |
|
|
| 332 |
5 |
if (externalSecondaryStructure && rnaSequences.size() > 0) |
| 333 |
|
{ |
| 334 |
0 |
try |
| 335 |
|
{ |
| 336 |
0 |
processPdbFileWithAnnotate3d(rnaSequences); |
| 337 |
|
} catch (Exception x) |
| 338 |
|
{ |
| 339 |
0 |
jalview.bin.Console |
| 340 |
|
.errPrintln("Exceptions when dealing with RNA in pdb file"); |
| 341 |
0 |
x.printStackTrace(); |
| 342 |
|
|
| 343 |
|
} |
| 344 |
|
} |
| 345 |
|
|
| 346 |
|
|
| 347 |
|
|
| 348 |
|
|
| 349 |
5 |
if (proteinSequences.size() > 0) |
| 350 |
|
{ |
| 351 |
5 |
try |
| 352 |
|
{ |
| 353 |
5 |
processWithJmolParser(proteinSequences, true); |
| 354 |
|
} catch (Exception x) |
| 355 |
|
{ |
| 356 |
0 |
jalview.bin.Console.errPrintln( |
| 357 |
|
"Exceptions from Jmol when processing data in pdb file"); |
| 358 |
0 |
x.printStackTrace(); |
| 359 |
|
} |
| 360 |
|
} |
| 361 |
|
} |
| 362 |
|
|
| |
|
| 88.2% |
Uncovered Elements: 2 (17) |
Complexity: 2 |
Complexity Density: 0.13 |
|
| 363 |
5 |
private void processWithJmolParser(List<SequenceI> prot,... |
| 364 |
|
boolean doXferSettings) throws MalformedURLException, IOException |
| 365 |
|
{ |
| 366 |
5 |
FileParse fp = new FileParse(getDataName(), dataSourceType); |
| 367 |
|
|
| 368 |
5 |
StructureImportSettings.setShowSeqFeatures(false); |
| 369 |
5 |
StructureImportSettings.setVisibleChainAnnotation(false); |
| 370 |
5 |
StructureImportSettings |
| 371 |
|
.setProcessSecondaryStructure(predictSecondaryStructure); |
| 372 |
5 |
StructureImportSettings |
| 373 |
|
.setExternalSecondaryStructure(externalSecondaryStructure); |
| 374 |
5 |
StructureImportSettings.setTemperatureFactorType(temperatureFactorType); |
| 375 |
5 |
JmolParser jmf = new JmolParser(fp, doXferSettings); |
| 376 |
5 |
AlignmentI al = new Alignment((SequenceI[]) jmf.getSeqsAsArray()); |
| 377 |
5 |
jmf.addAnnotations(al); |
| 378 |
5 |
for (SequenceI sq : al.getSequences()) |
| 379 |
|
{ |
| 380 |
14 |
if (sq.getDatasetSequence() != null) |
| 381 |
|
{ |
| 382 |
0 |
sq.getDatasetSequence().getAllPDBEntries().clear(); |
| 383 |
|
} |
| 384 |
|
else |
| 385 |
|
{ |
| 386 |
14 |
sq.getAllPDBEntries().clear(); |
| 387 |
|
} |
| 388 |
|
} |
| 389 |
5 |
replaceAndUpdateChains(prot, al, AlignSeq.PEP, false); |
| 390 |
5 |
StructureImportSettings.setShowSeqFeatures(true); |
| 391 |
|
} |
| 392 |
|
|
| 393 |
|
|
| 394 |
|
|
| 395 |
|
|
| 396 |
|
|
| 397 |
|
@param |
| 398 |
|
@return |
| 399 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0.5 |
|
| 400 |
48239 |
public PDBChain findChain(String id)... |
| 401 |
|
{ |
| 402 |
48239 |
for (PDBChain chain : getChains()) |
| 403 |
|
{ |
| 404 |
82832 |
if (chain.id.equals(id)) |
| 405 |
|
{ |
| 406 |
47935 |
return chain; |
| 407 |
|
} |
| 408 |
|
} |
| 409 |
304 |
return null; |
| 410 |
|
} |
| 411 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 412 |
193 |
public void makeResidueList()... |
| 413 |
|
{ |
| 414 |
193 |
for (PDBChain chain : getChains()) |
| 415 |
|
{ |
| 416 |
304 |
chain.makeResidueList(visibleChainAnnotation); |
| 417 |
|
} |
| 418 |
|
} |
| 419 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 420 |
193 |
public void makeCaBondList()... |
| 421 |
|
{ |
| 422 |
193 |
for (PDBChain chain : getChains()) |
| 423 |
|
{ |
| 424 |
304 |
chain.makeCaBondList(); |
| 425 |
|
} |
| 426 |
|
} |
| 427 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 428 |
0 |
public void setChargeColours()... |
| 429 |
|
{ |
| 430 |
0 |
for (PDBChain chain : getChains()) |
| 431 |
|
{ |
| 432 |
0 |
chain.setChargeColours(); |
| 433 |
|
} |
| 434 |
|
} |
| 435 |
|
|
| |
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 436 |
0 |
public void setColours(jalview.schemes.ColourSchemeI cs)... |
| 437 |
|
{ |
| 438 |
0 |
for (PDBChain chain : getChains()) |
| 439 |
|
{ |
| 440 |
0 |
chain.setChainColours(cs); |
| 441 |
|
} |
| 442 |
|
} |
| 443 |
|
|
| |
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
|
| 444 |
0 |
public void setChainColours()... |
| 445 |
|
{ |
| 446 |
0 |
int i = 0; |
| 447 |
0 |
for (PDBChain chain : getChains()) |
| 448 |
|
{ |
| 449 |
0 |
chain.setChainColours(Color.getHSBColor(1.0f / i++, .4f, 1.0f)); |
| 450 |
|
} |
| 451 |
|
} |
| 452 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (10) |
Complexity: 6 |
Complexity Density: 1 |
|
| 453 |
308 |
public static boolean isRNA(SequenceI seq)... |
| 454 |
|
{ |
| 455 |
308 |
int length = seq.getLength(); |
| 456 |
472 |
for (int i = 0; i < length; i++) |
| 457 |
|
{ |
| 458 |
471 |
char c = seq.getCharAt(i); |
| 459 |
471 |
if ((c != 'A') && (c != 'C') && (c != 'G') && (c != 'U')) |
| 460 |
|
{ |
| 461 |
307 |
return false; |
| 462 |
|
} |
| 463 |
|
} |
| 464 |
1 |
return true; |
| 465 |
|
} |
| 466 |
|
|
| 467 |
|
|
| 468 |
|
|
| 469 |
|
|
| 470 |
|
@param |
| 471 |
|
@return |
| 472 |
|
|
| 473 |
|
|
| |
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 4 |
Complexity Density: 0.67 |
|
| 474 |
76 |
protected String safeName(String dataName)... |
| 475 |
|
{ |
| 476 |
76 |
int p = 0; |
| 477 |
? |
while ((p = dataName.indexOf("/")) > -1 && p < dataName.length()) |
| 478 |
|
{ |
| 479 |
656 |
dataName = dataName.substring(p + 1); |
| 480 |
|
} |
| 481 |
76 |
if (dataName.indexOf(".") > -1) |
| 482 |
|
{ |
| 483 |
74 |
dataName = dataName.substring(0, dataName.lastIndexOf(".")); |
| 484 |
|
} |
| 485 |
76 |
return dataName; |
| 486 |
|
} |
| 487 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 488 |
2287 |
public String getId()... |
| 489 |
|
{ |
| 490 |
2287 |
return id; |
| 491 |
|
} |
| 492 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 493 |
209 |
public void setId(String id)... |
| 494 |
|
{ |
| 495 |
209 |
this.id = id; |
| 496 |
|
} |
| 497 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 498 |
49510 |
public Vector<PDBChain> getChains()... |
| 499 |
|
{ |
| 500 |
49510 |
return chains; |
| 501 |
|
} |
| 502 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 503 |
193 |
public void setChains(Vector<PDBChain> chains)... |
| 504 |
|
{ |
| 505 |
193 |
this.chains = chains; |
| 506 |
|
} |
| 507 |
|
|
| |
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 508 |
0 |
public Type getDbRefType()... |
| 509 |
|
{ |
| 510 |
0 |
return dbRefType; |
| 511 |
|
} |
| 512 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 513 |
16 |
public void setDbRefType(String dbRefType)... |
| 514 |
|
{ |
| 515 |
16 |
this.dbRefType = Type.getType(dbRefType); |
| 516 |
|
} |
| 517 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 518 |
18 |
public void setDbRefType(Type dbRefType)... |
| 519 |
|
{ |
| 520 |
18 |
this.dbRefType = dbRefType; |
| 521 |
|
} |
| 522 |
|
|
| 523 |
|
|
| 524 |
|
|
| 525 |
|
|
| 526 |
|
|
| 527 |
|
|
| 528 |
|
|
| 529 |
|
|
| 530 |
|
|
| 531 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 532 |
17 |
@Override... |
| 533 |
|
public FeatureSettingsModelI getFeatureColourScheme() |
| 534 |
|
{ |
| 535 |
17 |
return new PDBFeatureSettings(); |
| 536 |
|
} |
| 537 |
|
|
| 538 |
|
|
| 539 |
|
|
| 540 |
|
|
| 541 |
|
@return |
| 542 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 543 |
304 |
public boolean isPPDBIdAvailable()... |
| 544 |
|
{ |
| 545 |
304 |
return pdbIdAvailable; |
| 546 |
|
} |
| 547 |
|
|
| |
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 548 |
177 |
public void setPDBIdAvailable(boolean pdbIdAvailable)... |
| 549 |
|
{ |
| 550 |
177 |
this.pdbIdAvailable = pdbIdAvailable; |
| 551 |
|
} |
| 552 |
|
} |