+ if (nodes.size() > 1)
+ {
+ buildConsensusSequence();
+ }
+ }
+
+ /**
+ * Sets the aligned consensus sequence this HMM is the model for
+ *
+ * @param hmmSeq
+ */
+ public void setHmmSeq(SequenceI hmmSeq)
+ {
+ this.hmmSeq = hmmSeq;
+ }
+
+ public void setBackgroundFrequencies(Map<Character, Float> bkgdFreqs)
+ {
+ backgroundFrequencies = bkgdFreqs;
+ }
+
+ public void setBackgroundFrequencies(ResidueCount bkgdFreqs)
+ {
+ backgroundFrequencies = new HashMap<>();
+
+ int total = bkgdFreqs.getTotalResidueCount();
+
+ for (char c : bkgdFreqs.getSymbolCounts().symbols)
+ {
+ backgroundFrequencies.put(c, bkgdFreqs.getCount(c) * 1f / total);
+ }
+