public void Add(EntropyProfile profile)
        {
            this._profiles.Add(profile);

            for (int i = 0; i < profile.states.Count; i++)
            {
                var index = states.IndexOf(profile.states[i]);

                if (index == -1)
                {
                    this.states.Add(profile.states[i]);
                    this.statesCount.Add(1);
                }
                else
                {
                    this.statesCount[index]++;
                }
            }

            this.totalStates += profile.totalStates;
            this.statesProbabilities = new List<float>();
            for (int i = 0; i < statesCount.Count; i++)
                this.statesProbabilities.Add((1.0f * statesCount[i]) / (1.0f * this.totalStates));
        }
示例#2
0
        public FastaObj updateEntropyProfile(int width, int velocity)
        {
            this.entropyProfile = new EntropyProfile(this.sequence, ProteinHelper.AminoAcidCharStrings, width, velocity);

            return this;
        }