From: tva Date: Wed, 3 Jul 2019 11:16:50 +0000 (+0100) Subject: JAL-2629 evalues and bit scores now conserved after hmmalign is run X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=10e91b47b2400ade70129d09261c326379d39de4;p=jalview.git JAL-2629 evalues and bit scores now conserved after hmmalign is run --- diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index b50a2ce..61fc747 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -20,6 +20,7 @@ */ package jalview.analysis; +import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.HiddenMarkovModel; import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; @@ -74,6 +75,12 @@ public class SeqsetUtils { sqinfo.put("HMM", seq.getHMM()); } + + if (seq.getAnnotation("Search Scores") != null) + { + sqinfo.put("Score", seq.getAnnotation("Search Scores")); + } + return sqinfo; } @@ -103,6 +110,9 @@ public class SeqsetUtils String description = (String) sqinfo.get("Description"); Sequence seqds = (Sequence) sqinfo.get("datasetSequence"); HiddenMarkovModel hmm = (HiddenMarkovModel) sqinfo.get("HMM"); + AlignmentAnnotation[] scores = (AlignmentAnnotation[]) sqinfo + .get("Score"); + if (oldname == null) { namePresent = false; @@ -145,6 +155,14 @@ public class SeqsetUtils { sq.setHMM(new HiddenMarkovModel(hmm, sq)); } + + if (scores != null) + { + for (AlignmentAnnotation score : scores) + { + sq.addAlignmentAnnotation(score); + } + } return namePresent; } diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 9354d55..3e532df 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -733,6 +733,9 @@ public class AlignmentAnnotation this.scaleColLabel = annotation.scaleColLabel; this.showAllColLabels = annotation.showAllColLabels; this.calcId = annotation.calcId; + this.bitScore = annotation.bitScore; + this.eValue = annotation.eValue; + if (annotation.properties != null) { properties = new HashMap<>();