/// <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); }