예제 #1
0
 public void CompareAveragingWithMSstats()
 {
     var srmDocument = LoadRatPlasmaDocument();
     var documentContainer = new MemoryDocumentContainer();
     documentContainer.SetDocument(documentContainer.Document, srmDocument);
     GroupComparisonModel model = new GroupComparisonModel(documentContainer, null);
     model.GroupComparisonDef = GroupComparisonDef.EMPTY.ChangeControlAnnotation("Condition")
         .ChangeControlValue("Healthy")
         .ChangeIdentityAnnotation("BioReplicate")
         .ChangeSummarizationMethod(SummarizationMethod.AVERAGING)
         .ChangePerProtein(false);
     var expectedValues = MsStatsTestUtil.ReadExpectedResults(typeof (MSstatsAveragingTest),
         "RatPlasmaTestingResult.csv");
     var groupComparer = new GroupComparer(model.GroupComparisonDef, srmDocument, new QrFactorizationCache());
     foreach (var protein in srmDocument.PeptideGroups)
     {
         foreach (var peptide in protein.Peptides)
         {
             var result = groupComparer.CalculateFoldChange(new GroupComparisonSelector(protein, peptide, IsotopeLabelType.light, null, new GroupIdentifier("Diseased")), null);
             var expectedResult = expectedValues[peptide.Peptide.Sequence];
             Assert.AreEqual(expectedResult.EstimatedValue, result.LinearFitResult.EstimatedValue,
                 (expectedResult.StandardError + result.LinearFitResult.StandardError) * 2, peptide.Peptide.Sequence);
         }
     }
 }
예제 #2
0
 public ModelChangeSupport(GroupComparisonModel model, Control control, Action <GroupComparisonModel> eventHandler)
 {
     _model                    = model;
     _control                  = control;
     _eventHandler             = eventHandler;
     _control.HandleCreated   += ControlHandleCreated;
     _control.HandleDestroyed += ControlHandleDestroyed;
 }
예제 #3
0
 public ModelChangeSupport(GroupComparisonModel model, Control control, Action<GroupComparisonModel> eventHandler)
 {
     _model = model;
     _control = control;
     _eventHandler = eventHandler;
     _control.HandleCreated += ControlHandleCreated;
     _control.HandleDestroyed += ControlHandleDestroyed;
 }
 public FoldChangeBindingSource(GroupComparisonModel groupComparisonModel)
 {
     _container = new Container();
     GroupComparisonModel = groupComparisonModel;
     _taskScheduler = TaskScheduler.FromCurrentSynchronizationContext();
 }