import java.util.Hashtable;
import jalview.io.StructureFile;
+import jalview.structure.StructureImportSettings.TFType;
import jalview.util.CaseInsensitiveString;
public class PDBEntry
private static final String PROVIDERCATEGORY = "PROVIDERCATEGORY";
+ private static final String TEMPFACTYPE = "TEMPFACTYPE";
+
+ private static final String MODELCONFIDENCE = "MODELCONFIDENCE";
+
+ private static final String MODELCONFTYPE = "MODELCONFTYPE";
+
+ private static final String MODELCONFVER = "MODELCONFVER";
+
+
/**
* Permanent URI for retrieving the original structure data
*
return _hasProperty(PROVIDERCATEGORY);
}
+ public void setTempFacType(TFType tempfactype)
+ {
+ setProperty(TEMPFACTYPE, tempfactype);
+ }
+
+ /**
+ * String version of TFType enum
+ * @return
+ */
+ public String getTempFacType()
+ {
+ return (String) getProperty(TEMPFACTYPE);
+ }
+ public TFType getTempFacTypeTFType()
+ {
+ return TFType.valueOf((String) getProperty(TEMPFACTYPE));
+ }
+
+ public boolean hasTempFacType()
+ {
+ return _hasProperty(TEMPFACTYPE);
+ }
+
+ public void setModelConfidenceType(String modelConfType2)
+ {
+ setProperty(MODELCONFTYPE, modelConfType2);
+ }
+
+ public boolean hasModelConfidenceType()
+ {
+ return _hasProperty(MODELCONFTYPE);
+ }
+
+ public String getModelConfidenceType()
+ {
+ return (String) getProperty(MODELCONFTYPE);
+ }
+
+ public void setModelConfidenceVersion(String modelConfVer2)
+ {
+ setProperty(MODELCONFVER, modelConfVer2);
+ }
+
+ public boolean hasModelConfidenceVersion()
+ {
+ return _hasProperty(MODELCONFVER);
+ }
+
+ public String getModelConfidenceVersion()
+ {
+ return (String) getProperty(MODELCONFVER);
+ }
+
+ public void setModelConfidence(Double modelConf)
+ {
+ setProperty(MODELCONFIDENCE, modelConf);
+ }
+
+ public boolean hasModelConfidence()
+ {
+ return _hasProperty(MODELCONFIDENCE);
+ }
+
+ public Double getModelConfidence()
+ {
+ return (Double) getProperty(MODELCONFIDENCE);
+ }
+
}
import jalview.fts.service.threedbeacons.TDB_FTSData;
import jalview.fts.service.threedbeacons.TDBeaconsFTSRestClient;
import jalview.jbgui.FilterOption;
+import jalview.structure.StructureImportSettings.TFType;
/**
* logic for querying the 3DBeacons API for structures of sequences
int humanUrl = restable.getColumn("Page URL").getModelIndex();
int modelformat = restable.getColumn("Model Format").getModelIndex();
int idx_mcat = restable.getColumn("Model Category").getModelIndex();
+ int idx_mqual = restable.getColumn("Confidence").getModelIndex();
+ int idx_mqualtype = restable.getColumn("Confidence Score Type").getModelIndex();
+ int idx_mqualtypever = restable.getColumn("Confidence Score Version").getModelIndex();
+
+
final int up_start_idx = restable.getColumn("Uniprot Start")
.getModelIndex();
String modelCategory = idx_mcat < 1 ? null
: (String) restable.getValueAt(row, idx_mcat);
+
+ Double modelConf = idx_mqual < 1 ? null
+ : (Double) restable.getValueAt(row, idx_mqual);
+
+ String modelConfType = idx_mqualtype < 1 ? null
+ : (String) restable.getValueAt(row, idx_mqualtype);
+ String modelConfVer = idx_mqualtypever < 1 ? null
+ : (String) restable.getValueAt(row, idx_mqualtypever);
+
+ String tftype = modelConfType.toUpperCase(Locale.ROOT);
+ TFType tempfacType = (tftype==null) ? null : TFType.valueOf(tftype);
+ if (tftype==null || "".equals(tftype) || TFType.valueOf(tftype) == null )
+ {
+ // TODO maintain mappings between confidence types and tempfactypes
+ if (typeColumn.toLowerCase(Locale.ROOT).startsWith("alpha") || tftype.startsWith("ALPHAFOLD")) {
+ tftype = TFType.PLDDT.toString();
+ modelConfVer = null;
+ }
+ if (!typeColumn.toLowerCase(Locale.ROOT).startsWith("pdbe")) {
+ tftype = TFType.QMEANDISCO.toString();
+ }
+ }
+
String strucFormat = restable.getValueAt(row, modelformat).toString();
SequenceI selectedSeq = (SequenceI) restable.getValueAt(row,
pdbEntry.setProviderPage(modelPage);
}
pdbEntry.setProviderCategory(modelCategory);
+ pdbEntry.setTempFacType(tempfacType);
+ if (modelConf != null) {
+ pdbEntry.setModelConfidence(modelConf);
+ }
+ if (modelConfType != null) {
+ pdbEntry.setModelConfidenceType(modelConfType);
+ }
+ if (modelConfVer != null) {
+ pdbEntry.setModelConfidenceVersion(modelConfVer);
+ }
+
selectedSeq.getDatasetSequence().addPDBId(pdbEntry);
}
pdbEntriesToView[count++] = pdbEntry;