Exemple #1
0
        public KMeansForm(KmeansInput obj, bool flag, INPUTMODE inputmode, List <string> profiles = null)
        {
            InitializeComponent();
            this.inputmode = inputmode;
            if (profiles != null)
            {
                button3.Visible = true;
                profileFile     = profiles[0];
            }
            else
            {
                button3.Visible = false;
            }
            distanceControl1.changedProfile = juryChanged;
            Settings set = new Settings();

            set.Load();
            if (set.mode == INPUTMODE.RNA)
            {
                distanceControl1.HideAtoms = true;
            }

            jury1DSetup1.profileNameChanged = juryChanged;
            if (flag)
            {
                distanceControl1.FreezDist();
            }


            if (obj != null)
            {
                kmeansMaxK.Value = (decimal)obj.maxK;
                if (obj.kMeans_init == Initialization.Jury1D)
                {
                    juryRadio.Checked   = true;
                    randomRadio.Checked = false;
                }
                else
                {
                    juryRadio.Checked   = false;
                    randomRadio.Checked = true;
                }

                distanceControl1.distDef          = obj.kDistance;
                distanceControl1.CAtoms           = obj.kAtoms;
                distanceControl1.profileName      = obj.hammingProfile;
                jury1DSetup1.profileName          = obj.jury1DProfile;
                numericUpDown1.Value              = obj.maxIter;
                distanceControl1.reference        = obj.reference1Djury;
                distanceControl1.referenceProfile = obj.jury1DProfile;
            }
        }
Exemple #2
0
        public KMeansForm(KmeansInput obj, bool flag,INPUTMODE inputmode,List<string> profiles=null)
        {
            InitializeComponent();
            this.inputmode = inputmode;
            if (profiles != null)
            {
                button3.Visible = true;
                profileFile = profiles[0];
            }
            else
                button3.Visible = false;
            distanceControl1.changedProfile = juryChanged;
            Settings set = new Settings();
            set.Load();
            if (set.mode == INPUTMODE.RNA)
                distanceControl1.HideAtoms = true;

            jury1DSetup1.profileNameChanged = juryChanged;
            if (flag)
                distanceControl1.FreezDist();


            if (obj != null)
            {
                kmeansMaxK.Value = (decimal)obj.maxK;
                if (obj.kMeans_init == Initialization.Jury1D)
                {
                    juryRadio.Checked = true;
                    randomRadio.Checked = false;
                }
                else
                {
                    juryRadio.Checked = false;
                    randomRadio.Checked = true;
                }

                distanceControl1.distDef = obj.kDistance;
                distanceControl1.CAtoms = obj.kAtoms;
                distanceControl1.profileName = obj.hammingProfile;
                jury1DSetup1.profileName = obj.jury1DProfile;
                numericUpDown1.Value = obj.maxIter;
                distanceControl1.reference = obj.reference1Djury;
                distanceControl1.referenceProfile = obj.jury1DProfile;
            }
        }