示例#1
0
        void bWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            string[] o      = (string[])e.Argument;
            string   cmp_id = o[0];
            string   kit2   = o[1];
            string   name2  = o[2];

            segment_dt = GGKUtilLib.QueryDB("select chromosome'Chromosome',start_position'Start Position',end_position'End Position',segment_length_cm'Segment Length (cM)',snp_count'SNP Count',segment_id from cmp_autosomal where cmp_id='" + cmp_id + "'");

            if (GGKUtilLib.isPhased(kit))
            {
                phased_kit   = kit;
                unphased_kit = kit2;
                phased       = true;
            }
            else if (GGKUtilLib.isPhased(kit2))
            {
                phased_kit   = kit2;
                unphased_kit = kit;
                phased       = true;
            }
            else
            {
                phased = false;
            }
            e.Result = new string[] { kit2, name2 };
        }
 private void bwCompare_DoWork(object sender, DoWorkEventArgs e)
 {
     if (GGKUtilLib.isPhased(kit1))
     {
         phased_kit   = kit1;
         unphased_kit = kit2;
         phased       = true;
     }
     else if (GGKUtilLib.isPhased(kit2))
     {
         phased_kit   = kit2;
         unphased_kit = kit1;
         phased       = true;
     }
     else
     {
         phased = false;
     }
     object[] cmp_results = GGKUtilLib.compareOneToOne(kit1, kit2);
     segment_idx = (DataTable)cmp_results[0];
     segments    = (List <DataTable>)cmp_results[1];
 }