Beispiel #1
0
        private void buttonLoad_Click(object sender, EventArgs e)
        {
            openFileDialog1.Title  = "Indicate the GO (DAG) file";
            openFileDialog1.Filter = "OBO file (*.OBO)|*.OBO";

            if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }

            gt.LoadFile(openFileDialog1.FileName);
            richTextBoxLog.AppendText("Nodes loaded :" + gt.Terms.Count.ToString() + "\n");

            int prunnedNodes = gt.pruneObsoleteTerms();

            richTextBoxLog.AppendText("Prunned nodes (obsolete): " + prunnedNodes.ToString() + "\n");
            richTextBoxLog.AppendText("We now have " + gt.Terms.Count.ToString() + "nodes\n");

            gt.buildTreeNodes();

            //Lets give them a friendly wait advice
            waitWindow = new WaitWindow();
            waitWindow.ChangeLable("Performing Optimizations...");
            System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(waitWindow.ShowWindow));
            t.Start();

            tabControlGOTools.Enabled = true;
            tabControlRight.Enabled   = true;

            treeViewGO2.ShowPlusMinus = false;

            treeNodes.Clear();
            treeNodes = gt.getNodesCategory(GO.GOTerms.GOCategories.all);

            addRoots();

            //Perform Precalculations
            //We could let this computing in a sepatared thread
            gt.ComputeAllNodesBelowForAllNodes();

            dagLoaded = true;

            if (dagLoaded && associationTableloaded)
            {
                buttonSavePreCalc.Enabled    = true;
                groupBoxTreeControls.Enabled = true;
                groupBoxGOPlot.Enabled       = true;
            }
            openFileDialog1.Filter = "";

            //Turn off the button so the user wont fo mess
            buttonLoad.Enabled        = false;
            groupBoxGOPrecomp.Enabled = false;

            t.Abort();
        }