void PasteTableFromClipboard() { //Clipboard.ContainsData(); string Values = Clipboard.GetText(); if (Values.Length > 0) { string[] Sep = new string[1]; Sep[0] = "\r\n"; string[] ListValues = Values.Split(Sep, StringSplitOptions.None); if (ListValues.Length == 0) return; // let's compute the table width Sep[0] = "\t"; string[] subListValues = ListValues[0].Split(Sep, StringSplitOptions.None); if (subListValues.Length == 0) return; cExtendedTable ET = new cExtendedTable(subListValues.Length, ListValues.Length - 1, 0); ET.ListRowNames = new List<string>(); ET.Name = "From Clipboard [" + subListValues.Length.ToString() + "x" + (ListValues.Length - 1).ToString() + "]"; if (subListValues.Length * (ListValues.Length - 1) > 10000) { if (MessageBox.Show("The table will contain " + (subListValues.Length * (ListValues.Length - 1)) + " elements.\nDo you want proceed?", "Warning !", MessageBoxButtons.YesNo, MessageBoxIcon.Error) == System.Windows.Forms.DialogResult.No) return; } for (int j = 0; j < subListValues.Length; j++) ET[j].Name = j.ToString(); for (int i = 0; i < ListValues.Length - 1; i++) { ET.ListRowNames.Add(i.ToString()); subListValues = ListValues[i].Split(Sep, StringSplitOptions.None); for (int j = 0; j < subListValues.Length; j++) { double Res; bool IsSuccess = double.TryParse(subListValues[j], out Res); if (IsSuccess) ET[j][i] = Res; else ET[j][i] = double.NaN; } } cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); } }
private void ToolStripMenuItem_DisplaySerieData(object sender, EventArgs e) { if (sender.GetType() != typeof(ToolStripMenuItem)) return; ToolStripMenuItem TSMI = (ToolStripMenuItem)sender; if (TSMI.Tag.GetType() != typeof(HitTestResult)) return; HitTestResult HTR = (HitTestResult)TSMI.Tag; cExtendedList ELX = new cExtendedList(this.ChartAreas[0].AxisX.Title); cExtendedList ELY = new cExtendedList(this.ChartAreas[0].AxisY.Title); cExtendedTable ET = new cExtendedTable(); ET.ListTags = new List<object>(); ET.Name = "Serie [" + HTR.Series.Name + "]"; foreach (var item in HTR.Series.Points) { ELX.Add(item.XValue); ELY.Add(item.YValues[0]); ET.ListTags.Add(item.Tag); } ET.Add(ELX); ET.Add(ELY); cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); }
private void ToolStripMenuItem_OperationsStatistics(object sender, EventArgs e) { cExtendedTable ET = new cExtendedTable(); ET.Name = " Statistics(" + this.Input.Name + ")"; cLinearize L = new cLinearize(); L.SetInputData(this.Input); L.Run(); cStatistics S = new cStatistics(); S.SetInputData(L.GetOutPut()); S.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(S.GetOutPut()); CDT.Run(); }
private void loadExtendedTableToolStripMenuItem_Click(object sender, EventArgs e) { cCSVToTable CSVT = new cCSVToTable(); CSVT.IsDisplayUIForFilePath = true; CSVT.IsContainRowNames = true; CSVT.IsContainColumnHeaders = true; CSVT.Run(); cDisplayExtendedTable DT = new Classes.MetaComponents.cDisplayExtendedTable(); DT.SetInputData(CSVT.GetOutPut()); DT.Run(); }
private void dataTableToolStripMenuItem_Click(object sender, EventArgs e) { cDisplayExtendedTable CDT = new cDisplayExtendedTable(); cExtendedTable ET = new cExtendedTable(); ET.Name = toolStripComboBoxLUT.Text; ET.ListRowNames = new List<string>(); byte[][] Res= cGlobalInfo.CurrentPlateLUT; vtkColorTransferFunction TF = vtkColorTransferFunction.New(); // double[] ListValues = {-100.0, -90.0, -80.0, -70.0, -60.000004, -50.0, -40.0, -30.000002, -20.0, 20.0, 30.000002, 40.0, 50.0, 60.000004, 70.0, 80.0, 90.0, 100.0}; for (int i = 0; i < Res[0].Length; i++) { TF.AddRGBPoint((double)(255.0*i)/Res[0].Length, Res[0][i] / 255.0, Res[1][i] / 255.0, Res[2][i] / 255.0); } TF.Build(); ET.Add(new cExtendedList("Red")); ET.Add(new cExtendedList("Green")); ET.Add(new cExtendedList("Blue")); for (int i = 0; i < 255; i++) { double[] Test = TF.GetColor(i); ET[0].Add((char)(Test[0]*255)); ET[1].Add((char)(Test[1]*255)); ET[2].Add((char)(Test[2]*255)); } //ET.Add(new cExtendedList("Red")); //for (int i = 0; i < Res[0].Length; i++) //{ // ET[0].Add(Res[0][i]); // ET.ListRowNames.Add(i.ToString()); //} //ET.Add(new cExtendedList("Green")); //for (int i = 0; i < Res[1].Length; i++) // ET[1].Add(Res[1][i]); //ET.Add(new cExtendedList("Blue")); //for (int i = 0; i < Res[2].Length; i++) // ET[2].Add(Res[2][i]); CDT.SetInputData(ET); CDT.Run(); }
private void ToolStripMenuItem_OperationsInverse(object sender, EventArgs e) { cInverse CI = new cInverse(); CI.SetInputData(this.Input); CI.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CI.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_DistEuclidean(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index]); cDistances CD = new cDistances(); CD.DistanceType = eDistances.EUCLIDEAN; CD.SetInputData(CET); CD.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CD.GetOutPut()); CDT.Run(); }
private void TSItemSubPopSelectionDataTable(object sender, EventArgs e) { ToolStripMenuItem ParentTag = (ToolStripMenuItem)(sender); List<int> MyList = ((List<int>)(ParentTag.Tag)); cExtendedTable ET = new cExtendedTable(this.InputSimpleData.Count, MyList.Count, 0); for (int i = 0; i < this.InputSimpleData.Count; i++) { ET[i].Name = this.InputSimpleData[i].Name; } ET.ListRowNames = new List<string>(); for (int i = 0; i < MyList.Count; i++) { ET.ListRowNames.Add(i.ToString()); } int IdxPt = 0; foreach (var item in MyList) { for (int i = 0; i < this.InputSimpleData.Count; i++) { ET[i][IdxPt] = this.InputSimpleData[i][MyList[IdxPt]]; } IdxPt++; } ET.Name = "Data Table - " + MyList.Count + " Objects"; cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); }
private void ToolStripMenuItem_TestsOneWayANOVA(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index]); cANOVA S = new cANOVA(); S.SetInputData(CET); S.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.DigitNumber = -1; CDT.SetInputData(S.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_DescendingSorting(object sender, EventArgs e) { if (GridView.SelectedColumns.Count == 0) return; cSort S = new cSort(); S.SetInputData(this.Input); S.IsAscending = false; S.ColumnIndexForSorting = GridView.SelectedColumns[0].Index; S.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(S.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_DisplayDataTableDistance(object sender, EventArgs e) { cExtendedTable ET = this.ListActiveWells.GetDistanceMatrix(eDistances.EUCLIDEAN); cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); }
private void ToolStripMenuItem_DisplayDataTable(object sender, EventArgs e) { cExtendedTable ET = this.GetAverageValueTable(cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptor(), true); //ET = GetListValues(true); cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); }
private void ToolStripMenuItem_AnalysisDisplayDataTable(object sender, EventArgs e) { cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(this.GetActiveSignatures(false)); DET.DigitNumber = -1; DET.Run(); }
private void ToolStripMenuItem_DisplayDataTable(object sender, EventArgs e) { if (GlobalInfo == null) return; cListWells ListWellsToProcess = new cListWells(null); for (int i = 0; i < cGlobalInfo.ListWellClasses.Count; i++) { if (cGlobalInfo.ListWellClasses[i].Name == this.Name) { Idx = i; break; } } if (Idx == -1) return; foreach (cPlate TmpPlate in cGlobalInfo.CurrentScreening.ListPlatesActive) foreach (cWell item in TmpPlate.ListActiveWells) if (item.GetCurrentClassIdx() == Idx) ListWellsToProcess.Add(item); cExtendedTable DataFromPlate = new cExtendedTable(ListWellsToProcess, true); DataFromPlate.Name = this.Name + " : " + ListWellsToProcess.Count + " wells"; DataFromPlate.ListRowNames.Clear(); foreach (var item in ListWellsToProcess) { DataFromPlate.ListRowNames.Add(item.GetShortInfo()); } cDisplayExtendedTable DEXT = new cDisplayExtendedTable(); DEXT.SetInputData(DataFromPlate); DEXT.Run(); }
private void ToolStripMenuItem_NormMinMax(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) { CET.Add(Input[item.Index].Normalize(eNormalizationType.MIN_MAX)); } CET.Name = "Min-Max(" + this.Input.Name + ")"; cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CET); CDT.Run(); }
void DisplayAsDataTable(object sender, EventArgs e) { cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(cGlobalInfo.CurrentScreening.ListDescriptors.GetDataTable()); DET.Run(); }
private void ToolStripMenuItem_NormStandardize(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index].Normalize(eNormalizationType.STANDARDIZE)); CET.Name = "Standardize(" + this.Input.Name + ")"; cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CET); CDT.Run(); }
private void TSItemSubPopSelectionDataTableImages(object sender, EventArgs e) { ToolStripMenuItem ParentTag = (ToolStripMenuItem)(sender); List<int> MyList = ((List<int>)(ParentTag.Tag)); cExtendedTable ET = new cExtendedTable(this.InputSimpleData.Count, MyList.Count, 0); for (int i = 0; i < this.InputSimpleData.Count; i++) { ET[i].Name = this.InputSimpleData[i].Name; } ET.ListRowNames = new List<string>(); for (int i = 0; i < MyList.Count; i++) { ET.ListRowNames.Add(i.ToString()); } if (this.InputSimpleData.ListTags != null) ET.ListTags = new List<object>(); int IdxPt = 0; FormForProgress FP = new FormForProgress(); FP.Show(); int MaxProgress = MyList.Count; FP.progressBar.Maximum = MaxProgress; foreach (var item in MyList) { for (int i = 0; i < this.InputSimpleData.Count; i++) { ET[i][IdxPt] = this.InputSimpleData[i][MyList[IdxPt]]; } if ((this.InputSimpleData.ListTags != null) && (this.InputSimpleData.ListTags[IdxPt] != null)) { if (this.InputSimpleData.ListTags[MyList[IdxPt]].GetType() == typeof(cSingleBiologicalObject)) { cSingleBiologicalObject TmpBioObj = ((cSingleBiologicalObject)this.InputSimpleData.ListTags[MyList[IdxPt]]); List<cImageMetaInfo> ListMeta = cGlobalInfo.ImageAccessor.GetImageInfo(TmpBioObj); if (ListMeta==null) continue; cImage Image = new cImage(ListMeta); TmpBioObj.BD_BoxMax.Z = TmpBioObj.BD_BoxMin.Z = 0; cImage CroppedImaged = Image.Crop(TmpBioObj.BD_BoxMin, TmpBioObj.BD_BoxMax); if((cGlobalInfo.TmpImageDisplayProperties==null)||(cGlobalInfo.TmpImageDisplayProperties.ListMin.Count != CroppedImaged.GetNumChannels())) { ET.ListTags.Add(CroppedImaged.GetBitmap(1f, null, null)); } else { cImageDisplayProperties IP = cGlobalInfo.TmpImageDisplayProperties; ET.ListTags.Add(CroppedImaged.GetBitmap(1f, IP, null)); } FP.richTextBoxForComment.AppendText("Object "+ IdxPt +" / "+MyList.Count +"\n"); } } FP.progressBar.Value = IdxPt; FP.Refresh(); IdxPt++; } FP.Close(); ET.Name = "Data Table - " + MyList.Count + " Objects"; cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); //DataPoint DP = new DataPoint(); //if (this.InputSimpleData[0].ListTags != null) //{ // if (j >= this.InputSimpleData[0].ListTags.Count) continue; // DP.Tag = this.InputSimpleData[0].ListTags[j]; // // if (DP.Tag.GetType() == typeof(cWell)) // // { // // DP.Color = ((cWell)(DP.Tag)).GetClassColor(); // // DP.ToolTip = ((cWell)(DP.Tag)).GetShortInfo() + Value[0]; // // } // if (DP.Tag.GetType() == typeof(cSingleBiologicalObject)) // { // // DP.Color = ((cSingleBiologicalObject)(DP.Tag)).GetColor(); // // DP.ToolTip = ((cSingleBiologicalObject)(DP.Tag)).GetAssociatedPhenotype().Name + "\nValue: (" + DP.XValue.ToString("N2") + ":" + DP.YValues[0].ToString("N2") + ")"; // } //} }
private void ToolStripMenuItem_OperationsClustering(object sender, EventArgs e) { cClustering CC = new cClustering(); cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index]); if (this.Input.ListRowNames != null) { CET.ListRowNames = new List<string>(); foreach (var item in this.Input.ListRowNames) CET.ListRowNames.Add(item); } if (this.Input.ListTags != null) { CET.ListTags = new List<object>(); foreach (var item in this.Input.ListTags) CET.ListTags.Add(item); } CET.Name = "Sub["+this.Input.Name+"]"; CC.SetInputData(CET); //CC.ListProperties.FindByName("Number of Clusters").SetNewValue((int)3); //CC.ListProperties.FindByName("Number of Clusters").IsGUIforValue = true; if (!CC.Run().IsSucceed) return; cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CC.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_OperationsAbs(object sender, EventArgs e) { cArithmetic_Abs CAA = new cArithmetic_Abs(); CAA.SetInputData(this.Input); CAA.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CAA.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_OperationsCropSelection(object sender, EventArgs e) { int MinX = 0; int MaxX = 0; int MinY = 0; int MaxY = 0; DataGridViewCell item = GridView.SelectedCells[0]; MinX = MaxX = item.ColumnIndex; MinY = MaxY = item.RowIndex; for (int i = 1; i < GridView.SelectedCells.Count; i++) { item = GridView.SelectedCells[i]; if (item.ColumnIndex < MinX) MinX = item.ColumnIndex; if (item.RowIndex < MinY) MinY = item.RowIndex; if (item.ColumnIndex > MaxX) MaxX = item.ColumnIndex; if (item.RowIndex > MaxY) MaxY = item.RowIndex; } cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(this.Input.Crop(MinX, MaxX, MinY, MaxY)); CDT.Run(); }
private void ToolStripMenuItem_OperationsSquare(object sender, EventArgs e) { cArithmetic_Power CAP = new cArithmetic_Power(); CAP.SetInputData(this.Input); CAP.Power = 2; CAP.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(CAP.GetOutPut()); CDT.Run(); }
private void ToolStripMenuItem_Statistics(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index]); cStatistics S = new cStatistics(); S.SetInputData(CET); S.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.SetInputData(S.GetOutPut()); CDT.Run(); }
private void _ToolStripMenuItemInfo(object sender, EventArgs e) { cExtendedTable ET = this.AssociatedImage.GetPropertyTable(); cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(ET); DET.Run(); }
private void ToolStripMenuItem_Tests2SamplesTTest(object sender, EventArgs e) { cExtendedTable CET = new cExtendedTable(); foreach (DataGridViewColumn item in GridView.SelectedColumns) CET.Add(Input[item.Index]); cTwoSampleUnpooledTTest S = new cTwoSampleUnpooledTTest(); S.SetInputData(CET); S.FTestTails = eFTestTails.BOTH; S.Run(); cDisplayExtendedTable CDT = new cDisplayExtendedTable(); CDT.DigitNumber = -1; CDT.SetInputData(S.GetOutPut()); CDT.Run(); }
private void sigmoidFittToolStripMenuItem_Click(object sender, EventArgs e) { int NumberOfReplicate = 4; int NumberOfCurves = 30; int DRCNumberofPoints = 12; cExtendedTable FullResults = new cExtendedTable(); FullResults.ListRowNames = new List<string>(); double RealEC50 = 0.0001; int NumberOfDiffEC50 = 20; int NumberOfSlopes = 100; // for (int EC50 = 0; EC50 < NumberOfDiffEC50; EC50++) { //double TmpSlopeValue = 0.0; for (int EC50 = 0; EC50 < NumberOfDiffEC50; EC50++) //for (int SlopeTmp = 0; SlopeTmp < NumberOfSlopes; SlopeTmp++) { RealEC50 *= 2; //TmpSlopeValue += 0.1; cExtendedList ListPValues = new cExtendedList("EC50 - " + RealEC50/*TmpSlopeValue*/); cDesignerTab DT = new cDesignerTab(); DT.IsMultiline = false; cDataGeneratorTitration GT = new cDataGeneratorTitration(); GT.NumberOfPoint = DRCNumberofPoints; GT.Start = 5; GT.DilutionFactor = 2; GT.Run(); Random RND = new Random(); //cExtendedTable EXT = new cExtendedTable(); //EXT.ListRowNames = new List<string>(); //EXT.Name = "Quality fitting Report"; //EXT.Add(new cExtendedList("Noise Level")); //EXT.Add(new cExtendedList("Original EC50")); //EXT.Add(new cExtendedList("Estimated EC50")); //EXT.Add(new cExtendedList("p-Value")); for (int i = 0; i < NumberOfCurves; i++) { cExtendedTable FinalTable = new cExtendedTable(); cDataGeneratorSigmoid DGS = null; DGS = new cDataGeneratorSigmoid(); DGS.SetInputData(GT.GetOutPut()[0]); DGS.EC50 = RealEC50;// 0.01;// 1;// 0.1;// Math.Pow((double)10, -2); DGS.Bottom = 0; DGS.Top = 100; DGS.Slope = 2;// TmpSlopeValue;//1; DGS.Run(); cAddNoise AN = new cAddNoise(); AN.DistributionType = eRandDistributionType.GAUSSIAN; double NoiseLevel = (i + 1) * 5; // EXT[0].Add(NoiseLevel); // EXT[1].Add(DGS.EC50); #region loop over the replicates for (int NumReplic = 0; NumReplic < NumberOfReplicate; NumReplic++) { //AN.Mean = 0; //AN.Stdv = 10; //AN.SetInputData(DGS.GetOutPut()); //AN.Run(); cExtendedList NewL = DGS.GetOutPut()[1]; for (int k = 0; k < NewL.Count; k++) { NewL[k] += RND.NextDouble() * NoiseLevel; } cExtendedTable TmpTable = new cExtendedTable(); TmpTable.Add(GT.GetOutPut()[0]); TmpTable.Add(/*AN.GetOutPut()[1]*/NewL); if (NumReplic >= 1) { cMerge M = new cMerge(); M.IsHorizontal = false; M.SetInputData(TmpTable, FinalTable); M.Run(); FinalTable = M.GetOutPut(); } else FinalTable = new cExtendedTable(TmpTable); } #endregion //cListWell LW = new cListWell(null); //foreach (cWell item in CompleteScreening.GetCurrentDisplayPlate().ListActiveWells) //{ // if (item.GetClassIdx() == 0) // LW.Add(item); //} //cExtendedTable ET = LW.GetDescriptorValues(CompleteScreening.ListDescriptors.GetActiveDescriptors(), true); cCurveForGraph CFG = new cCurveForGraph(); CFG.SetInputData(FinalTable); CFG.Run(); // compute ANOVA cANOVA S = new cANOVA(); cExtendedTable NewTable = CFG.ListPtValues.Crop(0, CFG.ListPtValues.Count - 1, 1, CFG.ListPtValues[0].Count - 1); S.SignificanceThreshold = 1E-11; S.SetInputData(NewTable); S.Run(); //cLinearRegression LR = new cLinearRegression(); //LR.SetInputData(FinalTable); //LR.Run(); cSigmoidFitting SF = new cSigmoidFitting(); SF.SetInputData(FinalTable); if (SF.Run().IsSucceed == false) continue; // double Ratio = LR.GetOutPut()[0][LR.GetOutPut().Count - 1] / SF.GetOutPut()[0][SF.GetOutPut().Count - 1]; cExtendedTable Sigmoid = SF.GetFittedRawValues(GT.GetOutPut()[0]); FinalTable[0] = Sigmoid[1]; cDesignerSplitter DS = new cDesignerSplitter(); ////cViewerTableAsRichText VT = new cViewerTableAsRichText(); cViewerTable VT = new cViewerTable(); cExtendedTable TableResults = SF.GetOutPut(); TableResults[0].Add(S.GetOutPut()[0][0]); ListPValues.Add(S.GetOutPut()[0][0]); TableResults[0].Add(S.GetOutPut()[0][1]); TableResults.ListRowNames.Add("p-Value"); TableResults.ListRowNames.Add("Null hyp. rejected?"); VT.SetInputData(TableResults); VT.DigitNumber = -1; VT.Run(); cViewerGraph1D VS1 = new cViewerGraph1D(); VS1.SetInputData(new cExtendedTable(Sigmoid[1])); VS1.AddCurve(CFG); VS1.Chart.X_AxisValues = Sigmoid[0];//DGS.GetOutPut()[0]; VS1.Chart.IsLogAxis = true; VS1.Chart.IsLine = true; VS1.Chart.IsShadow = true; VS1.Chart.Opacity = 210; VS1.Chart.LineWidth = 3; VS1.Chart.LabelAxisX = "Concentration"; VS1.Chart.LabelAxisY = "Readout"; VS1.Chart.XAxisFormatDigitNumber = -1; VS1.Chart.IsZoomableX = true; //Classes.Base_Classes.General.cLineVerticalForGraph VLForEC50 = new Classes.Base_Classes.General.cLineVerticalForGraph(SF.GetOutPut()[0][2]); //VLForEC50.AddText("EC50: " + SF.GetOutPut()[0][2].ToString("e3")/* + "\nError Ratio:" + Ratio.ToString("N4")*/); //VS1.Chart.ListVerticalLines.Add(VLForEC50); //VS1.Chart.ArraySeriesInfo = new cSerieInfoDesign[FinalTable.Count]; //EXT[2].Add(SF.GetOutPut()[0][2]); //EXT[3].Add(S.GetOutPut()[0][0]); //for (int IdxCurve = 0; IdxCurve < FinalTable.Count; IdxCurve++) //{ // cSerieInfoDesign TmpSerieInfo = new cSerieInfoDesign(); // TmpSerieInfo.color = Color.FromArgb(100, GlobalInfo.ListCellularPhenotypes[IdxCurve % GlobalInfo.ListCellularPhenotypes.Count].ColourForDisplay); // TmpSerieInfo.markerStyle = MarkerStyle.Circle; // VS1.Chart.ArraySeriesInfo[IdxCurve] = TmpSerieInfo; //} VS1.Run(); DS.SetInputData(VS1.GetOutPut()); DS.SetInputData(VT.GetOutPut()); DS.Orientation = Orientation.Horizontal; DS.Title = "Noise Stdev " + NoiseLevel; DS.Run(); DT.SetInputData(DS.GetOutPut()); // EXT.ListRowNames.Add(DS.Title); } DT.Run(); //cDisplayToWindow DTW = new cDisplayToWindow(); //DTW.SetInputData(DT.GetOutPut()); //DTW.Run(); //DTW.Display(); //cDisplayExtendedTable DET = new cDisplayExtendedTable(); //DET.SetInputData(EXT); //DET.DigitNumber = -1; //DET.Run(); FullResults.Add(ListPValues); } } cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(FullResults); DET.DigitNumber = -1; DET.Run(); }
private void DisplayTable(object sender, EventArgs e) { cDisplayExtendedTable CDET = new cDisplayExtendedTable(); CDET.SetInputData(this.Input); CDET.Title = this.Title; CDET.Run(); }
private void createAveragePlateToolStripMenuItem_Click(object sender, EventArgs e) { FormForPlateAveraging FFPA = new FormForPlateAveraging(); PanelForPlatesSelection PlatesSelectionPanel = new PanelForPlatesSelection(true, null, true); PlatesSelectionPanel.Height = FFPA.panelForPlateList.Height; FFPA.panelForPlateList.Controls.Add(PlatesSelectionPanel); if (FFPA.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; cListPlates LP = PlatesSelectionPanel.GetListSelectedPlates(); cPlate NewPlate = new cPlate("Average Plate", cGlobalInfo.CurrentScreening); cWell TmpWell; #region QC report cExtendedList TmpReportForQuality = new cExtendedList("Weight"); TmpReportForQuality.ListTags = new List<object>(); cExtendedTable TableForQCReport = new cExtendedTable(TmpReportForQuality); TableForQCReport.ListRowNames = new List<string>(); TableForQCReport.ListTags = new List<object>(); foreach (cPlate TmpPlate in LP) { object QualityValue = TmpPlate.ListProperties.FindValueByName("Quality"); if ((QualityValue != null) && (FFPA.checkBoxWeightedSum.Checked)) TableForQCReport[0].Add((double)QualityValue); else { this.richTextBoxConsole.AppendText(TmpPlate.GetName() + " - Quality is NULL. Weight set to 1.\n"); TableForQCReport[0].Add(1); } TableForQCReport.ListRowNames.Add(TmpPlate.GetName()); TableForQCReport.ListTags.Add(TmpPlate); TableForQCReport[0].ListTags.Add(TmpPlate); } cDisplayExtendedTable DET = new cDisplayExtendedTable(); DET.SetInputData(TableForQCReport); DET.Title = "QC report"; TableForQCReport.Name = "QC report"; DET.Run(); #endregion for (int X = 0; X < cGlobalInfo.CurrentScreening.Columns; X++) for (int Y = 0; Y < cGlobalInfo.CurrentScreening.Rows; Y++) { cListSignature LDesc = new cListSignature(); for (int i = 0; i < cGlobalInfo.CurrentScreening.ListDescriptors.Count; i++) { double Value = 0; double NormFactor = 0; foreach (cPlate TmpPlate in LP) { double Weight = 1; object QualityValue = TmpPlate.ListProperties.FindValueByName("Quality"); if ((QualityValue != null) && (FFPA.checkBoxWeightedSum.Checked)) Weight = (double)QualityValue; NormFactor += Weight; TmpWell = TmpPlate.GetWell(X, Y, false); if (TmpWell != null) { Value += Weight * TmpWell.ListSignatures[i].GetValue(); } } if (NormFactor > 0) { cSignature Desc = new cSignature(Value / NormFactor, cGlobalInfo.CurrentScreening.ListDescriptors[i], cGlobalInfo.CurrentScreening); LDesc.Add(Desc); } } cWell NewWell = new cWell(LDesc, X + 1, Y + 1, cGlobalInfo.CurrentScreening, NewPlate); NewWell.SetCpdName("Average Well [" + (X + 1) + ":" + (Y + 1) + "]"); NewPlate.AddWell(NewWell); } cGlobalInfo.CurrentScreening.AddPlate(NewPlate); cGlobalInfo.CurrentScreening.ListPlatesActive.Add(NewPlate); toolStripcomboBoxPlateList.Items.Add(NewPlate.GetName()); cGlobalInfo.CurrentScreening.ListPlatesActive[cGlobalInfo.CurrentScreening.ListPlatesActive.Count - 1].UpDataMinMax(); cGlobalInfo.CurrentScreening.CurrentDisplayPlateIdx = 0; cGlobalInfo.CurrentScreening.GetCurrentDisplayPlate().DisplayDistribution(cGlobalInfo.CurrentScreening.ListDescriptors.GetActiveDescriptor(), true); }
private void ToolStripMenuItem_DisplayDataTable(object sender, EventArgs e) { cDisplayExtendedTable CDE = new cDisplayExtendedTable(); CDE.SetInputData(this.InputSimpleData); CDE.Run(); }