private void stdAnalysesList_SelectedIndexChanged(object sender, EventArgs e) { if (stdRunsList.SelectedIndex > -1) { Properties.Settings.Default.platform = global.ssh_type; Properties.Settings.Default.run = stdRunsList.SelectedItem.ToString(); settings SF = new settings(); SF.ShowDialog(); run_cmd = new StringBuilder(); if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.run)) { if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.platform)) { // run_cmd.Append("minion -p ").Append(Properties.Settings.Default.platform); run_cmd.Append("minion -p ").Append(Properties.Settings.Default.server_name); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.chemistry)) { run_cmd.Append(" -c ").Append(Properties.Settings.Default.chemistry); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.aligner)) { run_cmd.Append(" -a ").Append(Properties.Settings.Default.aligner); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.variant_caller)) { run_cmd.Append(" -v ").Append(Properties.Settings.Default.variant_caller); } if (Properties.Settings.Default.demultiplex == true) { run_cmd.Append(" -d"); } if (Properties.Settings.Default.dual_index == true) { run_cmd.Append(" -m Y*,I8,I8,Y*"); } else if (Properties.Settings.Default.dual_index == false) { run_cmd.Append(" -m Y*,I8,Y*"); } if (Properties.Settings.Default.custom_trim == true) { run_cmd.Append(" --a1 ").Append(Properties.Settings.Default.f_adapter).Append(" --a2 ").Append(Properties.Settings.Default.r_adapter); } } } }
/// <summary> /// File menu Tab /// </summary> private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { if (stdRunsList.SelectedIndex > -1) { Properties.Settings.Default.platform = global.ssh_type; Properties.Settings.Default.run = stdRunsList.SelectedItem.ToString(); settings SF = new settings(); SF.ShowDialog(); } }
private void customExecuteBtn_Click(object sender, EventArgs e) { if (customExecuteBtn.Text == "WORKFLOW") { Properties.Settings.Default.type = "custom"; settings SF = new settings(); SF.ShowDialog(); run_cmd = new StringBuilder(); if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.run)) { if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.platform)) { // run_cmd.Append("minion -p ").Append(Properties.Settings.Default.platform); run_cmd.Append("minion -p ").Append(Properties.Settings.Default.server_name); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.chemistry)) { run_cmd.Append(" -c ").Append(Properties.Settings.Default.chemistry).Append(" --ss ").Append(singlesamps.ToString(0, singlesamps.Length - 1)); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.aligner)) { run_cmd.Append(" -a ").Append(Properties.Settings.Default.aligner); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.variant_caller)) { run_cmd.Append(" -v ").Append(Properties.Settings.Default.variant_caller); } if (Properties.Settings.Default.demultiplex == true) { run_cmd.Append(" -d"); } if (Properties.Settings.Default.dual_index == true) { run_cmd.Append(" -m Y*,I8,I8,Y*"); } else if (Properties.Settings.Default.dual_index == false) { run_cmd.Append(" -m Y*,I8,Y*"); } if (Properties.Settings.Default.custom_trim == true) { run_cmd.Append(" --a1 ").Append(Properties.Settings.Default.f_adapter).Append(" --a2 ").Append(Properties.Settings.Default.r_adapter); } } } else if (customExecuteBtn.Text == "EXECUTE") { DialogResult dialogResult = MessageBox.Show("Ready to analyze " + Properties.Settings.Default.run + "? \r\n\n" + run_cmd.ToString(), "Minion - Checkpoint", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { global.run_date = DateTime.Now.ToString(); global.run_duration = "In Progress..."; startAnalysis(); runHistory(); ssh_command("analyze", global.ssh_host, global.ssh_usr, global.ssh_pass, run_cmd.ToString()); } else if (dialogResult == DialogResult.No) { dialogResult = DialogResult.Cancel; } } else if (customExecuteBtn.Text == "CANCEL") { DialogResult dialogResult = MessageBox.Show("Are you sure you want to cancel analysis on " + Properties.Settings.Default.run + "?", "Minion - Important Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { while (true) { if (terminalThread.IsBusy) { run_cmd = new StringBuilder(); run_cmd.Append("kill -9 `ps aux | grep minion.py | awk '{print $2}'`]"); ssh_command("kill", global.ssh_host, global.ssh_usr, global.ssh_pass, run_cmd.ToString()); terminalThread.CancelAsync(); } else break; } } else if (dialogResult == DialogResult.No) { dialogResult = DialogResult.Cancel; } } }
private void customWorkflowBtn_Click(object sender, EventArgs e) { Properties.Settings.Default.type = "custom"; settings SF = new settings(); SF.ShowDialog(); run_cmd = new StringBuilder(); if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.run)) { if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.platform)) { // run_cmd.Append("minion -p ").Append(Properties.Settings.Default.platform); run_cmd.Append("minion -p ").Append(Properties.Settings.Default.server_name); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.chemistry)) { run_cmd.Append(" -c ").Append(Properties.Settings.Default.chemistry).Append(" --ss ").Append(singlesamps.ToString(0, singlesamps.Length - 1)); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.aligner)) { run_cmd.Append(" -a ").Append(Properties.Settings.Default.aligner); } if (!String.IsNullOrWhiteSpace(Properties.Settings.Default.variant_caller)) { run_cmd.Append(" -v ").Append(Properties.Settings.Default.variant_caller); } if (Properties.Settings.Default.demultiplex == true) { run_cmd.Append(" -d"); } if (Properties.Settings.Default.dual_index == true) { run_cmd.Append(" -m Y*,I8,I8,Y*"); } else if (Properties.Settings.Default.dual_index == false) { run_cmd.Append(" -m Y*,I8,Y*"); } if (Properties.Settings.Default.custom_trim == true) { run_cmd.Append(" --a1 ").Append(Properties.Settings.Default.f_adapter).Append(" --a2 ").Append(Properties.Settings.Default.r_adapter); } } }
/// <summary> /// File menu Tab /// </summary> private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { settings SF = new settings(); SF.ShowDialog(); }