public void TestGroupComparisonClustering() { RunDlg <EditGroupComparisonDlg>(SkylineWindow.AddGroupComparison, dlg => { dlg.GroupComparisonDef = GroupComparisonDef.EMPTY .ChangeControlAnnotation("Condition") .ChangeControlValue("Healthy") .ChangeIdentityAnnotation("BioReplicate") .ChangePerProtein(true) .ChangeNormalizationMethod(NormalizationMethod.GLOBAL_STANDARDS); dlg.TextBoxName.Text = PER_PROTEIN_NAME; dlg.OkDialog(); }); RunUI(() => SkylineWindow.ShowGroupComparisonWindow(PER_PROTEIN_NAME)); FoldChangeGrid grid = FindOpenForm <FoldChangeGrid>(); WaitForCondition(() => grid.DataboundGridControl.IsComplete); RunUI(() => grid.DataboundGridControl.ChooseView("Clustered")); WaitForCondition(() => grid.DataboundGridControl.IsComplete && 0 != grid.DataboundGridControl.RowCount); var heatMap = ShowDialog <HierarchicalClusterGraph>(() => grid.DataboundGridControl.ShowHeatMap()); var pcaPlot = ShowDialog <PcaPlot>(() => grid.DataboundGridControl.ShowPcaPlot()); OkDialog(heatMap, heatMap.Close); OkDialog(pcaPlot, pcaPlot.Close); }
public int GetRowCount(FoldChangeGrid grid) { var count = -1; RunUI(() => count = grid.DataboundGridControl.RowCount); return(count); }
private void RunScenario(string scenarioName) { RunUI(() => SkylineWindow.OpenSharedFile(TestFilesDir.GetTestPath(scenarioName + ".sky.zip"))); if (null != TestContext.TestRunResultsDirectory) { var directory = Path.Combine(TestContext.TestRunResultsDirectory, "GroupComparisonScenariosTest"); Directory.CreateDirectory(directory); string baseName = Path.Combine(directory, scenarioName); RunUI(() => SkylineWindow.ShareDocument(baseName + ".sky.zip", ShareType.COMPLETE)); foreach (var groupComparison in SkylineWindow.Document.Settings.DataSettings.GroupComparisonDefs) { String groupComparisonName = groupComparison.Name; FoldChangeGrid foldChangeGrid = ShowDialog <FoldChangeGrid>(() => SkylineWindow.ShowGroupComparisonWindow(groupComparisonName)); var reports = new[] { "GroupComparisonColumns" }; var dsvWriter = new DsvWriter(CultureInfo.InvariantCulture, ',') { NumberFormatOverride = Formats.RoundTrip }; foreach (String report in reports) { WaitForConditionUI(() => foldChangeGrid.DataboundGridControl.IsComplete && null != foldChangeGrid.FoldChangeBindingSource.GroupComparisonModel.Results && null != foldChangeGrid.DataboundGridControl.BindingListSource.ViewContext); // ReSharper disable AccessToForEachVariableInClosure RunUI(() => { foldChangeGrid.DataboundGridControl.ChooseView(report); }); // ReSharper restore AccessToForEachVariableInClosure WaitForConditionUI(() => foldChangeGrid.DataboundGridControl.IsComplete); String exportPath = Path.Combine(directory, scenarioName + "_" + groupComparisonName + "_" + report + ".csv"); RunUI(() => { var viewContext = (AbstractViewContext)foldChangeGrid.DataboundGridControl.NavBar.ViewContext; viewContext.ExportToFile(foldChangeGrid, foldChangeGrid.DataboundGridControl.BindingListSource, exportPath, dsvWriter); } ); } OkDialog(foldChangeGrid, foldChangeGrid.Close); } } }
public void WaitForVolcanoPlotPointCount(FoldChangeGrid grid, int expected) { WaitForConditionUI(() => expected == grid.DataboundGridControl.RowCount && grid.DataboundGridControl.IsComplete, string.Format("Expecting {0} points found {1}", expected, GetRowCount(grid))); }