private void bwROH_DoWork(object sender, DoWorkEventArgs e) { DataTable dt = GGKUtilLib.QueryDB("select kit_no,roh_status from kit_master where reference=0 and disabled=0"); string kit = null; string roh = null; foreach (DataRow row in dt.Rows) { if (bwROH.CancellationPending) { break; } kit = row.ItemArray[0].ToString(); roh = row.ItemArray[1].ToString(); if (roh == "0") { bwROH.ReportProgress(dt.Rows.IndexOf(row) * 100 / dt.Rows.Count, "Runs of Homozygosity for kit #" + kit + " (" + GGKUtilLib.getKitName(kit) + ") - Processing ..."); GGKUtilLib.ROH(kit); } else if (roh == "1") { bwROH.ReportProgress(dt.Rows.IndexOf(row) * 100 / dt.Rows.Count, "Runs of Homozygosity for kit #" + kit + " (" + GGKUtilLib.getKitName(kit) + ") - Already Exists. Skipping.."); } } }
private void bwROH_DoWork(object sender, DoWorkEventArgs e) { string kit = e.Argument.ToString(); object[] roh_results = GGKUtilLib.ROH(kit); segment_idx = (DataTable)roh_results[0]; segments = (List <DataTable>)roh_results[1]; }