Ejemplo n.º 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            label2.Text    = GGKUtilLib.getKitName(kit);
            txtSNPs.Text   = GGKUtilLib.queryValue("kit_ysnps", new string[] { "ysnps" }, "where kit_no='" + kit + "'");
            GGKUtilLib.setStatus("Plotting on ISOGG Y-Tree ...");
            //
            XDocument doc = XDocument.Parse(Genetic_Genealogy_Kit.Properties.Resources.ytree);

            TreeNode root = new TreeNode("Adam");

            treeView1.Nodes.Add(root);

            foreach (XElement el in doc.Root.Elements())
            {
                buildTree(root, el);
            }
            root.Expand();
            //
            snp_on_tree.AddRange(Genetic_Genealogy_Kit.Properties.Resources.snps_on_tree.Split(new char[] { ',' }));

            my_snp    = txtSNPs.Text;
            snp_array = filterSNPsOnTree(my_snp);

            timer2.Enabled = true;
        }
Ejemplo n.º 2
0
        private void MitoMapFrm_Load(object sender, EventArgs e)
        {
            string       csv    = Genetic_Genealogy_Kit.Properties.Resources.mtdna_map;
            StreamReader reader = new StreamReader(new MemoryStream(Encoding.ASCII.GetBytes(csv)));
            string       line   = null;

            string[] data   = null;
            Series   series = series = mtdna_chart.Series[0];

            //Map Locus	 Starting	 Ending	bp Length	 Shorthand	 Description
            dgvmtdna.Rows.Clear();
            while ((line = reader.ReadLine()) != null)
            {
                data = line.Split(new char[] { ',' });
                DataPoint dp = new DataPoint();
                dp.IsVisibleInLegend = false;
                dp.Label             = data[0];
                dp.YValues           = new double[] { int.Parse(data[3]) };
                dp.CustomProperties  = "PieLineColor=Black, PieLabelStyle=Outside, Exploded=True";
                series.Points.Add(dp);
                //
                dgvmtdna.Rows.Add(new object[] { data[0], data[1], data[2], data[3], data[4], data[5] });
            }
            reader.Close();
            //
            RSRS = GGKUtilLib.getRSRS();
            for (int i = 0; i < RSRS.Length; i++)
            {
                nucleotides.Add(i + 1, new string[] { (i + 1).ToString(), RSRS[i].ToString(), RSRS[i].ToString() });
            }

            mutations = GGKUtilLib.queryValue("kit_mtdna", new string[] { "mutations" }, "where kit_no='" + kit + "'");
            dgvNucleotides.Columns[2].HeaderText = GGKUtilLib.getKitName(kit) + " (" + kit + ")";

            dgvmtdna.Columns[3].Visible = false;

            loadKitMutations();
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            timer1.Enabled = false;
            GGKUtilLib.enableSave();
            //
            XDocument doc = XDocument.Parse(xml_phylogeny);

            TreeNode root = new TreeNode("Eve");

            treeView1.Nodes.Add(root);

            foreach (XElement el in doc.Root.Elements())
            {
                buildTree(root, el);
            }
            root.Expand();
            //
            string mutations = GGKUtilLib.queryValue("kit_mtdna", new string[] { "mutations" }, "where kit_no='" + kit + "'");

            txtSNPs.Text = mutations;
            //
            markOnTree();
        }