Exemple #1
0
        private void BtnGblocks_Click(object sender, EventArgs e)
        {
            string align = txtAlignment.Text;

            if (PhyloMain.IDlines(align))
            {
                MessageBox.Show("GBlocks can't be executed, because there are '>' lines present larger than 50 characters.", "Fasta ID line too long", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            string gap = cboGaps.Text;
            string b5  = "";

            switch (gap)
            {
            case "None":
                b5 = "n";
                break;

            case "With Half":
                b5 = "h";
                break;

            case "All":
                b5 = "a";
                break;
            }
            options = " -t=d -b3=" + txtB3.Text + " -b4=" + txtB4.Text + " -b5=" + b5 + " -e=.gb";
            if (File.Exists(align))
            {
                RunGblocks(align, options);
            }
        }
Exemple #2
0
        private void BtnAlign_Click(object sender, EventArgs e)
        {
            btnAlign.Enabled = false;
            options          = "";
            if (rdbClustalW.Checked)
            {
                string options = " -ALIGN -CONVERT -OUTPUT=fasta -INFILE=\"" + txtFastaFile.Text + "\" -OUTFILE=\"" + txtAlignment.Text + "\" -BOOTSTRAP=" + txtBootstrap.Text;
                if (chkNJtree.Checked)
                {
                    options += " -TREE";
                }
                if (rdbAligned.Checked)
                {
                    options += " -OUTORDER=aligned";
                }
                else
                {
                    options += " -OUTORDER=input";
                }
                RunProg(clustalw, options, param);
            }

            if (rdbMuscle.Checked)
            {
                string options = " -in \"" + txtFastaFile.Text + "\" -out \"" + txtAlignment.Text + "\" -maxiters " + txtMuscleIterations.Text;
                if (chkDiag.Checked)
                {
                    options += " -diags1";
                }
                RunProg(muscle, options, param);
            }

            if (rdbMAFFT.Checked)
            {
                if (rdbFFT1.Checked)
                {
                    options = " --retree " + cboRetree.Text;
                }
                if (rdbEINS.Checked)
                {
                    options = " --genafpair";
                }
                if (rdbLINS.Checked)
                {
                    options = " --localpair";
                }
                if (rdbGINS.Checked)
                {
                    options = " --globalpair";
                }
                if (chkAdjust.Checked)
                {
                    options += " --adjustdirection";
                }
                options += " --maxiterate 1000 --reorder \"" + txtFastaFile.Text + "\" > \"" + txtAlignment.Text + "\"";
                RunProg(mafft, options, param);
            }
            if (chkGblocks.Checked)
            {
                if (PhyloMain.IDlines(txtAlignment.Text))
                {
                    MessageBox.Show("GBlocks can't be executed, because there are '>' lines present larger than 50 characters.", "Fasta ID line too long", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                string gap = cboGaps.Text;
                string b5  = "";
                switch (gap)
                {
                case "None":
                    b5 = "n";
                    break;

                case "With Half":
                    b5 = "h";
                    break;

                case "All":
                    b5 = "a";
                    break;
                }
                options = " -t=d -b3=" + txtB3.Text + " -b4=" + txtB4.Text + " -b5=" + b5 + " -e=.gb";
                RunGblocks(txtAlignment.Text, options);
            }
            btnAlign.Enabled = true;
            //btnStartBioEdit.Enabled = true;
        }