From 87b3ae66c09502cb3c173e8ef3ea299e9f61373b Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 15 Nov 2024 11:26:13 +0000 Subject: [PATCH] JAL-3914 QMEANDiSCo quality score TFType --- .../annotations/QMEANDISCORowBuilder.java | 39 ++++++++++++++++++++ src/jalview/ext/jmol/JmolParser.java | 7 +++- src/jalview/structure/StructureImportSettings.java | 4 +- 3 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 src/jalview/datamodel/annotations/QMEANDISCORowBuilder.java diff --git a/src/jalview/datamodel/annotations/QMEANDISCORowBuilder.java b/src/jalview/datamodel/annotations/QMEANDISCORowBuilder.java new file mode 100644 index 0000000..df50c7f --- /dev/null +++ b/src/jalview/datamodel/annotations/QMEANDISCORowBuilder.java @@ -0,0 +1,39 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ +package jalview.datamodel.annotations; + +import jalview.datamodel.Annotation; +import jalview.structure.StructureImportSettings; +import jalview.structure.StructureImportSettings.TFType; + +public class QMEANDISCORowBuilder extends AnnotationRowBuilder +{ + public static final String LABEL = "QMEANDiSCo Score"; + + public QMEANDISCORowBuilder() + { + super(LABEL); + min = 0; + max = 1; + hasMinMax = true; + this.setTFType(StructureImportSettings.TFType.QMEANDISCO); + } +} \ No newline at end of file diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 92c762b..7c45edf 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -46,6 +46,7 @@ import jalview.datamodel.PDBEntry; import jalview.datamodel.SequenceI; import jalview.datamodel.annotations.AlphaFoldAnnotationRowBuilder; import jalview.datamodel.annotations.AnnotationRowBuilder; +import jalview.datamodel.annotations.QMEANDISCORowBuilder; import jalview.io.DataSourceType; import jalview.io.FileParse; import jalview.io.StructureFile; @@ -264,8 +265,12 @@ public class JmolParser extends StructureFile implements JmolStatusListener || getTemperatureFactorType() == StructureImportSettings.TFType.PLDDT) { builder = new AlphaFoldAnnotationRowBuilder(); + } + if (getTemperatureFactorType() == StructureImportSettings.TFType.QMEANDISCO) + { + builder = new QMEANDISCORowBuilder(); } - + tmpchain = new PDBChain(getId(), tmpatom.chain, builder); getChains().add(tmpchain); tmpchain.atoms.addElement(tmpatom); diff --git a/src/jalview/structure/StructureImportSettings.java b/src/jalview/structure/StructureImportSettings.java index 22ecdc7..204562b 100644 --- a/src/jalview/structure/StructureImportSettings.java +++ b/src/jalview/structure/StructureImportSettings.java @@ -62,8 +62,8 @@ public class StructureImportSettings public static enum TFType { - DEFAULT, PLDDT; - + DEFAULT, PLDDT, QMEANDISCO; + @Override public String toString() { -- 1.7.10.2