示例#1
0
        private void applyBtn_Click(object sender, EventArgs e)
        {
            List<string> errors = new List<string>();

            if (custom_trim.Checked)
            {
                if (String.IsNullOrWhiteSpace(f_adapter.Text))
                {
                    errors.Add("Missing forward adapter");
                }
                if (String.IsNullOrWhiteSpace(r_adapter.Text))
                {
                    errors.Add("Missing reverse adapter");
                }
            }

            if (errors.Count > 0)
            {
                string err = string.Join("\r\n", errors.ToArray());
                MessageBox.Show("There are errors in your config settings, please see details. \r\n\nDetails:\r\n\n" + err, "Minion - Important Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                errors.Clear();
            }
            else
            {

                //general
                if (platform.SelectedIndex > -1)
                {
                    Properties.Settings.Default.platform = platform.Text.ToString().ToLower();
                }
                if (chemistry.SelectedIndex > -1)
                {
                    Properties.Settings.Default.chemistry = chemistry.Text.ToString().ToLower();
                }

                //alignment
                if (aligner.SelectedIndex > -1)
                {
                    Properties.Settings.Default.aligner = aligner.Text.ToString().ToLower();
                }
                Properties.Settings.Default.demultiplex = demultiplex.Checked;
                Properties.Settings.Default.dual_index = dual_index.Checked;
                Properties.Settings.Default.custom_trim = custom_trim.Checked;
                Properties.Settings.Default.f_adapter = f_adapter.Text;
                Properties.Settings.Default.r_adapter = r_adapter.Text;

                //variant calling
                if (variant_caller.SelectedIndex > -1)
                {
                    Properties.Settings.Default.variant_caller = variant_caller.Text.ToString().ToLower();
                }
                Properties.Settings.Default.recalibrate = recalibrate.Checked;
                Properties.Settings.Default.realign = realign.Checked;

                //more
                Properties.Settings.Default.tophat = rna_seq.Checked;
                Properties.Settings.Default.tophat_fusion = fusion.Checked;
                Properties.Settings.Default.cnvseq = cnv.Checked;
                Properties.Settings.Default.breakdancer = translocations.Checked;
                Properties.Settings.Default.pindel = indels.Checked;

                workflow cf = new workflow();
                cf.ShowDialog();

            }
        }
示例#2
0
        private void applyBtn_Click(object sender, EventArgs e)
        {
            List <string> errors = new List <string>();

            if (custom_trim.Checked)
            {
                if (String.IsNullOrWhiteSpace(f_adapter.Text))
                {
                    errors.Add("Missing forward adapter");
                }
                if (String.IsNullOrWhiteSpace(r_adapter.Text))
                {
                    errors.Add("Missing reverse adapter");
                }
            }

            if (errors.Count > 0)
            {
                string err = string.Join("\r\n", errors.ToArray());
                MessageBox.Show("There are errors in your config settings, please see details. \r\n\nDetails:\r\n\n" + err, "Minion - Important Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                errors.Clear();
            }
            else
            {
                //general
                if (platform.SelectedIndex > -1)
                {
                    Properties.Settings.Default.platform = platform.Text.ToString().ToLower();
                }
                if (chemistry.SelectedIndex > -1)
                {
                    Properties.Settings.Default.chemistry = chemistry.Text.ToString().ToLower();
                }

                //alignment
                if (aligner.SelectedIndex > -1)
                {
                    Properties.Settings.Default.aligner = aligner.Text.ToString().ToLower();
                }
                Properties.Settings.Default.demultiplex = demultiplex.Checked;
                Properties.Settings.Default.dual_index  = dual_index.Checked;
                Properties.Settings.Default.custom_trim = custom_trim.Checked;
                Properties.Settings.Default.f_adapter   = f_adapter.Text;
                Properties.Settings.Default.r_adapter   = r_adapter.Text;

                //variant calling
                if (variant_caller.SelectedIndex > -1)
                {
                    Properties.Settings.Default.variant_caller = variant_caller.Text.ToString().ToLower();
                }
                Properties.Settings.Default.recalibrate = recalibrate.Checked;
                Properties.Settings.Default.realign     = realign.Checked;

                //more
                Properties.Settings.Default.tophat        = rna_seq.Checked;
                Properties.Settings.Default.tophat_fusion = fusion.Checked;
                Properties.Settings.Default.cnvseq        = cnv.Checked;
                Properties.Settings.Default.breakdancer   = translocations.Checked;
                Properties.Settings.Default.pindel        = indels.Checked;

                workflow cf = new workflow();
                cf.ShowDialog();
            }
        }