Exemple #1
0
        private static double?GetApexRT(TransitionGroupDocNode nodeGroup, int resultIndex, ChromFileInfo chromFileInfo, bool ms1Trans)
        {
            double?apexRT = null;
            float  ms1Max = 0;
            var    trans  = ms1Trans
                ? nodeGroup.GetMsTransitions(true)
                : nodeGroup.GetMsMsTransitions(true);

            foreach (var nodeTran in trans)
            {
                foreach (var peakInfo in nodeTran.GetChromInfos(resultIndex).Where(c =>
                                                                                   ReferenceEquals(c.FileId, chromFileInfo.FileId)))
                {
                    if (peakInfo.Area > ms1Max)
                    {
                        apexRT = peakInfo.RetentionTime;
                        ms1Max = peakInfo.Area;
                    }
                }
            }
            return(apexRT);
        }
 public static IEnumerable<TransitionDocNode> GetDisplayTransitions(TransitionGroupDocNode nodeGroup,
     DisplayTypeChrom displayType)
 {
     switch (displayType)
     {
         case DisplayTypeChrom.precursors:
             // Return transitions that would be filtered from MS1
             return nodeGroup.GetMsTransitions(true);
         case DisplayTypeChrom.products:
             // Return transitions that would not be filtered in MS1
             return nodeGroup.GetMsMsTransitions(true);
         default:
             return nodeGroup.Transitions;
     }
 }
 private static double? GetApexRT(TransitionGroupDocNode nodeGroup, int resultIndex, ChromFileInfo chromFileInfo, bool ms1Trans)
 {
     double? apexRT = null;
     float ms1Max = 0;
     var trans = ms1Trans
         ? nodeGroup.GetMsTransitions(true)
         : nodeGroup.GetMsMsTransitions(true);
     foreach (var nodeTran in trans)
     {
         foreach (var peakInfo in nodeTran.GetChromInfos(resultIndex).Where(c =>
             ReferenceEquals(c.FileId, chromFileInfo.FileId)))
         {
             if (peakInfo.Area > ms1Max)
             {
                 apexRT = peakInfo.RetentionTime;
                 ms1Max = peakInfo.Area;
             }
         }
     }
     return apexRT;
 }