protected void TestDoWorkBetween(BetweenGroupTest bt)
        {
            Dictionary <int, List <RSplitUnit <double> > > units = DataToProcess.GetGroupedList();
            int cnt = units.Count;
            List <List <double> > rankData = new List <List <double> > ();

            foreach (KeyValuePair <int, List <RSplitUnit <double> > > kvp in units)
            {
                List <double> x = new List <double> ();
                List <double> y = new List <double> ();

                ExtractXYLists(kvp.Value, x, y);
                rankData.Add(y);
            }

            List <List <TestResult> > results = new List <List <TestResult> > ();

            for (int i = 0; i < cnt - 1; i++)
            {
                List <TestResult> tsr = new List <TestResult> ();
                for (int j = i + 1; j < cnt; j++)
                {
                    tsr.Add(StatsTester.RunBetweenTest(rankData [i], rankData [j], bt));
                }
                results.Add(tsr);
            }

            Gtk.Application.Invoke(delegate {
                AssignResultsToTable(results, cnt, bt);
            });
        }
Beispiel #2
0
 public static void Assemble()
 {
     Genome = new Genome();
     ProgramState.Init();
     AppSettings.Assemble();
     RankSplit.Assemble();
     FPKMFileNames    = new List <string> ();
     BAMFileNames     = new List <string> ();
     VariantFileNames = new List <string> ();
     TypeDict         = new ElementTypeDictionary();
     Samples          = new Dictionary <string, BioSample> ();
     BioSample.ResetStaticLoader();
     GeneToScaffDict   = new Dictionary <string, string> ();
     RegionToScaffDict = new Dictionary <string, string> ();
     RSPToMergeSeries  = new List <Series> ();
     StatsTester.Assemble();
 }
        protected void TestDoWorkPaired(PairedTest pt)
        {
            List <double> x = new List <double> ();
            List <double> y = new List <double> ();

            ExtractXYLists(DataToProcess.GetRankedList(), x, y);

            TestResult ts = StatsTester.RunPairedTest(x, y, pt);

            Gtk.Application.Invoke(delegate {
                covStatLabel.Text  = ts.Statistic.ToString("G7");
                covLProbLabel.Text = ts.LeftProbability.ToString("e2");
                covRProbLabel.Text = ts.RightProbability.ToString("e2");

                if (ts.Statistic > 0)
                {
                    covRProbLabel.Text += " *";
                }
                else
                {
                    covLProbLabel.Text += " *";
                }
            });
        }