/** Tests the adding of a histogram to the histogram */
        public void TestAddHistogram()
        {
            HistogramSymbol histo2 = new HistogramSymbol();
            histo.Add(new Sequence(AlphabetType.DNA, "gactt"));
            histo2.Add(new Sequence(AlphabetType.DNA, "act"));
            histo.Add(histo2);

            Assert.AreEqual(2, histo.HistoValue(alpha['a']));
            Assert.AreEqual(2, histo.HistoValue(alpha['c']));
            Assert.AreEqual(3, histo.HistoValue(alpha['t']));
            Assert.AreEqual(1, histo.HistoValue(alpha['g']));
        }
        /// <summary>
        /// Estimates the weights of the PWM that's behind a Block pattern.
        /// </summary>
        /// <exception cref="System.ArgumentException">
        /// Thrown when sequences length are not equal</exception>
        /// <param name="sequenceList"> List of aligned sequences. </param>
        /// <param name="background"> Histogram with base counts of the background
        /// sequences. Can be null. In that case all frequencies are set equally.</param>
        private void Estimate
            (SequenceList sequenceList, HistogramSymbol background)
        {
            int length = sequenceList.MinLength();

            if (sequenceList.MaxLength() != length)
                throw new ArgumentException
                    ("Sequences must be of equal length!");

            if (background == null)
            {
                background = new HistogramSymbol();

                foreach (Symbol sym in PWMalphabet)
                    background.Add(sym);
            }

            base.Init(length);
            base.Estimate(sequenceList, 1, background);
        }