コード例 #1
0
ファイル: WindowHCSAnalyzer.cs プロジェクト: cyrenaique/HCSA
        private void testMultiScatterToolStripMenuItem_Click(object sender, EventArgs e)
        {

            //V1D.Chart.LabelAxisX = "Well Index";
            //V1D.Chart.LabelAxisY = CompleteScreening.ListDescriptors[CompleteScreening.ListDescriptors.CurrentSelectedDescriptor].GetName();
            //V1D.Chart.BackgroundColor = Color.LightYellow;
            //V1D.Chart.IsXAxis = true;


            cGUI_ListClasses GUI_ListClasses = new cGUI_ListClasses();
            GUI_ListClasses.IsCheckBoxes = true;
            GUI_ListClasses.IsSelectAll = true;

            if (GUI_ListClasses.Run().IsSucceed == false) return;
            cExtendedList ListClassSelected = GUI_ListClasses.GetOutPut()[0];

            if (ListClassSelected.Sum() < 1)
            {
                MessageBox.Show("At least one classe has to be selected.", "Error !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }


            cDesignerSplitter CDC = new cDesignerSplitter();
            cListWells ListWellsToProcess = new cListWells(null);

            //foreach (cPlate TmpPlate in CompleteScreening.ListPlatesActive)
            foreach (cWell item in cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate().ListActiveWells)
                if (item.GetCurrentClassIdx() != -1)
                    if (ListClassSelected[item.GetCurrentClassIdx()] == 1) ListWellsToProcess.Add(item);

            cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true);
            DataFromPlate.Name = cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate().GetName();

            //if (ProcessModeCurrentPlateOnlyToolStripMenuItem.Checked)
            {


                for (int IdxDesc0 = 0; IdxDesc0 < DataFromPlate.Count; IdxDesc0++)
                    for (int IdxDesc1 = 1; IdxDesc1 < DataFromPlate.Count; IdxDesc1++)
                    {


                        cViewer2DScatterPoint V1D = new cViewer2DScatterPoint();
                        V1D.Chart.CurrentTitle.Tag = cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate();
                        V1D.Chart.IdxDesc0 = IdxDesc0;
                        V1D.Chart.IdxDesc1 = IdxDesc1;
                        V1D.SetInputData(DataFromPlate);
                        V1D.Run();
                        V1D.Chart.Width = 0;
                        V1D.Chart.Height = 0;

                        cDesignerSinglePanel Designer0 = new cDesignerSinglePanel();
                        Designer0.SetInputData(V1D.GetOutPut());
                        Designer0.Run();

                        CDC.SetInputData(Designer0.GetOutPut());
                    }
            }

            CDC.Run();

            cDisplayToWindow Disp0 = new cDisplayToWindow();
            Disp0.SetInputData(CDC.GetOutPut());
            Disp0.Title = "2D Scatter points graph - wells.";
            if (!Disp0.Run().IsSucceed) return;
            Disp0.Display();

        }
コード例 #2
0
ファイル: WindowHCSAnalyzer.cs プロジェクト: cyrenaique/HCSA
        private void dToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            cFeedBackMessage MessageReturned;

            cViewer2DScatterPoint V1D = new cViewer2DScatterPoint();
            V1D.Chart.IsSelectable = true;
            //V1D.Chart.LabelAxisX = "Well Index";
            //V1D.Chart.LabelAxisY = CompleteScreening.ListDescriptors[CompleteScreening.ListDescriptors.CurrentSelectedDescriptor].GetName();
            //V1D.Chart.BackgroundColor = Color.LightYellow;
            //V1D.Chart.IsXAxis = true;


            cGUI_ListClasses GUI_ListClasses = new cGUI_ListClasses();
            GUI_ListClasses.IsCheckBoxes = true;
            GUI_ListClasses.IsSelectAll = true;

            if (GUI_ListClasses.Run().IsSucceed == false) return;
            cExtendedList ListClassSelected = GUI_ListClasses.GetOutPut()[0];

            if (ListClassSelected.Sum() < 1)
            {
                MessageBox.Show("At least one classe has to be selected.", "Error !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            //cDisplayToWindow CDW1 = new cDisplayToWindow();
            // cListWell ListWellsToProcess = new cListWell();

            if (ProcessModeCurrentPlateOnlyToolStripMenuItem.Checked)
            {
                //cExtendedTable DataFromPlate = new cExtendedTable(CompleteScreening.GetCurrentDisplayPlate().ListActiveWells,
                //                                CompleteScreening.ListDescriptors.CurrentSelectedDescriptor);
                cListWells ListWellsToProcess = new cListWells(null);


                //foreach (cPlate TmpPlate in CompleteScreening.ListPlatesActive)
                foreach (cWell item in cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate().ListActiveWells)
                    if (item.GetCurrentClassIdx() != -1)
                        if (ListClassSelected[item.GetCurrentClassIdx()] == 1) ListWellsToProcess.Add(item);

                cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true);
                DataFromPlate.Name = cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate().GetName();

                V1D.Chart.IsShadow = true;
                V1D.Chart.IsBorder = true;
                V1D.Chart.IsSelectable = true;
                V1D.Chart.CurrentTitle.Tag = cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate();
                V1D.SetInputData(DataFromPlate);
                MessageReturned = V1D.Run();
                if (MessageReturned.IsSucceed == false)
                {
                    MessageBox.Show(MessageReturned.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                cDesignerSinglePanel Designer0 = new cDesignerSinglePanel();
                Designer0.SetInputData(V1D.GetOutPut());
                Designer0.Run();

                cDisplayToWindow Disp0 = new cDisplayToWindow();
                Disp0.SetInputData(Designer0.GetOutPut());
                Disp0.Title = "2D Scatter points graph - " + DataFromPlate[0].Count + " wells.";
                if (!Disp0.Run().IsSucceed) return;
                Disp0.Display();
            }
            else if (ProcessModeEntireScreeningToolStripMenuItem.Checked)
            {
                V1D.Chart.MarkerSize = 5;
                V1D.Chart.IsBorder = false;

                //List<cWell> ListWell = new List<cWell>();
                //foreach (cPlate TmpPlate in CompleteScreening.ListPlatesActive)
                //    foreach (cWell TmpWell in TmpPlate.ListActiveWells)
                //        ListWell.Add(TmpWell);

                //cExtendedTable DataFromPlate = new cExtendedTable(ListWell,
                //                                CompleteScreening.ListDescriptors.CurrentSelectedDescriptor);

                cListWells ListWellsToProcess = new cListWells(null);

                foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                    foreach (cWell item in TmpPlate.ListActiveWells)
                        if (item.GetCurrentClassIdx() != -1)
                            if (ListClassSelected[item.GetCurrentClassIdx()] == 1) ListWellsToProcess.Add(item);

                cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true);

                DataFromPlate.Name = cGlobalInfo.CurrentScreening.GetName() + " - " + cGlobalInfo.CurrentScreening.ListPlatesActive.Count + " plates";

                V1D.SetInputData(DataFromPlate);
                V1D.Run();

                cDesignerSinglePanel Designer0 = new cDesignerSinglePanel();
                Designer0.SetInputData(V1D.GetOutPut());
                Designer0.Run();

                cDisplayToWindow Disp0 = new cDisplayToWindow();
                Disp0.SetInputData(Designer0.GetOutPut());
                Disp0.Title = "2D Scatter points graph - " + DataFromPlate[0].Count + " wells.";
                if (!Disp0.Run().IsSucceed) return;
                Disp0.Display();

               
                //dislin.metafl("xwin");

                
                //dislin.disini();
                
                

                //dislin.name("X-axis", "X");
                //dislin.name("Y-axis", "Y");
                

                
                //dislin.title();

                
                //dislin.axslen(1000, 1000);


                ////dislin.graf(0.0, 1.0, 0.0, 0.1, 0.0, 1.0, 0.0, 0.1);

                
                ////dislin.crvmat(func, n, n, 1, 1);

               
                //dislin.disfin();

            }
            else if (ProcessModeplateByPlateToolStripMenuItem.Checked)
            {
                cDesignerTab CDT = new cDesignerTab();

                foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive)
                {
                    //cExtendedTable DataFromPlate = new cExtendedTable(TmpPlate.ListActiveWells,
                    //                            CompleteScreening.ListDescriptors.CurrentSelectedDescriptor);

                    cListWells ListWellsToProcess = new cListWells(null);

                    foreach (cWell item in TmpPlate.ListActiveWells)
                        if (item.GetCurrentClassIdx() != -1)
                            if (ListClassSelected[item.GetCurrentClassIdx()] == 1) ListWellsToProcess.Add(item);

                    cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true);

                    DataFromPlate.Name = TmpPlate.GetName();

                    V1D = new cViewer2DScatterPoint();
                    V1D.Chart.IsSelectable = true;
                    V1D.Chart.LabelAxisX = "Well Index";
                    V1D.Chart.LabelAxisY = cGlobalInfo.CurrentScreening.ListDescriptors[cGlobalInfo.CurrentScreening.ListDescriptors.CurrentSelectedDescriptorIdx].GetName();
                    V1D.Chart.BackgroundColor = Color.LightYellow;
                    V1D.Chart.IsXGrid = true;
                    V1D.Chart.CurrentTitle.Tag = TmpPlate;
                    V1D.SetInputData(DataFromPlate);
                    V1D.Title = TmpPlate.GetName();
                    V1D.Run();

                    CDT.SetInputData(V1D.GetOutPut());
                }

                CDT.Run();

                cDisplayToWindow Disp0 = new cDisplayToWindow();
                Disp0.SetInputData(CDT.GetOutPut());
                Disp0.Title = "2D Scatter points graphs";
                if (!Disp0.Run().IsSucceed) return;
                Disp0.Display();

               
            }


            //if (CompleteScreening == null) return;

            //SimpleFormForXY FormToDisplayXY = new SimpleFormForXY(false);
            //FormToDisplayXY.CompleteScreening = CompleteScreening;

            //for (int i = 0; i < (int)CompleteScreening.ListDescriptors.Count; i++)
            //{
            //    FormToDisplayXY.comboBoxDescriptorX.Items.Add(CompleteScreening.ListDescriptors[i].GetName());
            //    FormToDisplayXY.comboBoxDescriptorY.Items.Add(CompleteScreening.ListDescriptors[i].GetName());
            //}

            //FormToDisplayXY.comboBoxDescriptorX.SelectedIndex = 0;
            //FormToDisplayXY.comboBoxDescriptorY.SelectedIndex = 0;


            //FormToDisplayXY.DisplayXY();
            //FormToDisplayXY.ShowDialog();

            //return;
        }
コード例 #3
0
        private void ToolStripMenuItem_Display2DScatterGraph(object sender, EventArgs e)
        {
            cViewer2DScatterPoint V2DSG = new cViewer2DScatterPoint();
            V2DSG.SetInputData(this.Input);
            V2DSG.Run();

            cDesignerSinglePanel CD = new cDesignerSinglePanel();
            CD.SetInputData(V2DSG.GetOutPut());
            CD.Run();

            cDisplayToWindow DW = new cDisplayToWindow();
            DW.SetInputData(CD.GetOutPut());
            DW.Run();
            DW.Display();
        }
コード例 #4
0
ファイル: cPlate.cs プロジェクト: cyrenaique/HCSA
        private void ToolStripMenuItem_DisplayAs2DScatterPoints(object sender, EventArgs e)
        {
            cListWells ListWellsToProcess = new cListWells(null);

            foreach (cWell item in this.ListActiveWells)
                if (item.GetCurrentClassIdx() != -1)
                    ListWellsToProcess.Add(item);

            cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true);
            DataFromPlate.Name = this.Name;

            cViewer2DScatterPoint V1D = new cViewer2DScatterPoint();
            V1D.Chart.IsSelectable = true;
            V1D.Chart.IsShadow = true;
            V1D.Chart.IsBorder = true;
            V1D.Chart.IsSelectable = true;
            V1D.Chart.CurrentTitle.Tag = this;
            V1D.SetInputData(DataFromPlate);
            cFeedBackMessage MessageReturned = V1D.Run();
            if (MessageReturned.IsSucceed == false)
            {
                MessageBox.Show(MessageReturned.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            cDesignerSinglePanel Designer0 = new cDesignerSinglePanel();
            Designer0.SetInputData(V1D.GetOutPut());
            Designer0.Run();

            cDisplayToWindow Disp0 = new cDisplayToWindow();
            Disp0.SetInputData(Designer0.GetOutPut());
            Disp0.Title = "2D Scatter points graph - " + DataFromPlate[0].Count + " wells.";
            if (!Disp0.Run().IsSucceed) return;
            Disp0.Display();
        }
コード例 #5
0
ファイル: cPlate.cs プロジェクト: cyrenaique/HCSA
        public void Refresh2DScatter()
        {
            cExtendedTable EL = this.ListActiveWells.GetAverageDescriptorValues(cGlobalInfo.CurrentScreening.GetActiveDescriptors(), false, false);
            EL.Name = this.Name;

            cViewer2DScatterPoint V2D = new cViewer2DScatterPoint();
            V2D.SetInputData(EL);
            V2D.Chart.IsZoomableX = true;
            V2D.Chart.IsZoomableY = true;
            V2D.Chart.IsDetachable = false;
            V2D.Run();

            cExtendedControl EXT = V2D.GetOutPut();
            cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Controls.Clear();

            EXT.Width = cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Width;
            EXT.Height = cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Height;

            if (EXT.Controls.Count > 0)
            {
                EXT.Controls[0].Width = cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Width;
                EXT.Controls[0].Height = cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Height;
            }
            cGlobalInfo.WindowHCSAnalyzer.tabPage2DView.Controls.Add(EXT);
        }
コード例 #6
0
ファイル: cWell.cs プロジェクト: cyrenaique/HCSA
        private void ToolStripMenuItem_DisplaySingleCellData(object sender, EventArgs e)
        {
            this.AssociatedPlate.DBConnection = new cDBConnection(this.AssociatedPlate, this.SQLTableName);

            cListSingleBiologicalObjects ListPhenotypes =
                this.AssociatedPlate.DBConnection.GetBiologicalPhenotypes(this);

            cExtendedTable ET = this.AssociatedPlate.DBConnection.GetWellValues(this, cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptors());

            for (int i = 0; i < ET.Count; i++)
            {
                ET[i].ListTags = new List<object>();

                for (int j = 0; j < ListPhenotypes.Count; j++)
                    ET[i].ListTags.Add(ListPhenotypes[j]);
            }

            for (int j = 0; j < ListPhenotypes.Count; j++)
                ET.ListTags.Add(ListPhenotypes[j]);

            ET.Name = this.GetShortInfo();
            cViewer2DScatterPoint VS = new cViewer2DScatterPoint();
            VS.SetInputData(ET);
            VS.Chart.IsSelectable = true;
            if (VS.Run().IsSucceed == false) return;

            cDisplayToWindow DTW = new cDisplayToWindow();
            DTW.SetInputData(VS.GetOutPut());
            DTW.Title = "Well [" + this.PosX + "x" + this.PosY + "] - " + this.GetShortInfo();
            DTW.Run();
            DTW.Display();

            this.AssociatedPlate.DBConnection.CloseConnection();
        }
コード例 #7
0
        void Process()
        {
            cExtendedTable NewTable1 = null;
            string DescName = "";

            if (this.InputWells != null)
            {
                NewTable1 = new cExtendedTable(this.InputWells, cGlobalInfo.CurrentScreening.ListDescriptors.CurrentSelectedDescriptorIdx);
                DescName = cGlobalInfo.CurrentScreening.ListDescriptors[cGlobalInfo.CurrentScreening.ListDescriptors.CurrentSelectedDescriptorIdx].GetName();
            }
            else if (this.InputTable != null)
            {
                NewTable1 = this.InputTable;
            }

            cDesignerTab NormalityTestTabs = new cDesignerTab();

            cNormalityAndersonDarling NAD = new cNormalityAndersonDarling();
            NAD.SetInputData(NewTable1);
            NAD.Run();

            cExtendedTable TNAD = NAD.GetOutPut();

            TNAD[0].Name = "Anderson-Darling Test";
            cViewerTable VTNAD = new cViewerTable();
            VTNAD.SetInputData(TNAD);
            VTNAD.Sender = NAD;
            VTNAD.IsDisplayInfo = true;
            VTNAD.DigitNumber = -1;
            VTNAD.Run();

            cExtendedControl AndersonCtrl = VTNAD.GetOutPut();
            AndersonCtrl.Title = TNAD[0].Name;

            cNormalityJarqueBera NJB = new cNormalityJarqueBera();
            NJB.SetInputData(NewTable1);
            NJB.Run();

            cExtendedTable TmpTest = NJB.GetOutPut();
            TmpTest[0].Name = "Jarque-Bera Test";
            cViewerTable VT = new cViewerTable();
            VT.SetInputData(TmpTest);
            VT.Sender = NJB;
            VT.IsDisplayInfo = true;
            VT.DigitNumber = -1;
            VT.Run();

            cExtendedControl JarqueCtrl = VT.GetOutPut();
            JarqueCtrl.Title = TmpTest[0].Name;

            NormalityTestTabs.SetInputData(JarqueCtrl);
            NormalityTestTabs.SetInputData(AndersonCtrl);

            NormalityTestTabs.Run();

            //cExtendedControl ControlForTab = CADP.GetOutPut();
            //NormalityTestTabs.Title = TmpPlate.Name;

            cDesignerSplitter MainDS = new cDesignerSplitter();
            MainDS.Orientation = Orientation.Vertical;

            cDesignerSplitter DS = new cDesignerSplitter();
            DS.Orientation = Orientation.Horizontal;

            cNormalProbabilityPlot NPP = new cNormalProbabilityPlot();
            NPP.SetInputData(NewTable1);
            NPP.IdxColumnToProcess = 0;
            NPP.Run();

            cViewer2DScatterPoint V2DS = new cViewer2DScatterPoint();
            cExtendedTable TableToDisp = NPP.GetOutPut();
            TableToDisp.Name = "";
            V2DS.Chart.IsSelectable = true;
            V2DS.Chart.IsBorder = false;
            V2DS.Chart.IsShadow = false;
            V2DS.Chart.IsXGrid = true;
            V2DS.Chart.IsYGrid = true;
            V2DS.Chart.IsDisplayTrendLine = true;
            V2DS.SetInputData(TableToDisp);
            V2DS.Run();
            V2DS.Chart.CurrentTitle.Text = "Normal Probability Plot\n" + DescName + " - " + NewTable1[0].Count + " points";

            DS.SetInputData(V2DS.GetOutPut());

            cViewerStackedHistogram VSH = new cViewerStackedHistogram();

            cExtendedTable NewTable = null;

            if (this.InputWells != null)
            {
                NewTable = this.InputWells.GetAverageDescriptorValues(cGlobalInfo.CurrentScreening.ListDescriptors.CurrentSelectedDescriptorIdx);
            }
            else
            {
                NewTable = this.InputTable;
            }
            NewTable.Name = DescName + " - Stacked Histogram - " + NewTable1[0].Count + " values";

            VSH.SetInputData(NewTable);
            VSH.Chart.LabelAxisX = DescName;
            VSH.Run();

            DS.SetInputData(VSH.GetOutPut());
            DS.Run();

            cExtendedControl TextEC = NormalityTestTabs.GetOutPut();
            TextEC.Width = 0;
            TextEC.Height = 0;

            TextEC.Anchor = (System.Windows.Forms.AnchorStyles)(System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom
                    | System.Windows.Forms.AnchorStyles.Left
                    | System.Windows.Forms.AnchorStyles.Right);

            MainDS.SetInputData(TextEC);
            MainDS.SetInputData(DS.GetOutPut());

            MainDS.Run();
            this.Output = MainDS.GetOutPut();
        }