Ejemplo n.º 1
0
 private static bool AreEquivalentGroupNodes(TransitionGroupDocNode nodeGroup1, TransitionGroupDocNode nodeGroup2)
 {
     return(AreEquivalentGroups(nodeGroup1, nodeGroup2) && nodeGroup1.EquivalentChildren(nodeGroup2));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Given a <see cref="TransitionGroupDocNode"/> returns a <see cref="TransitionGroupDocNode"/> for which
        /// transition rankings based on imported results should be used for determining primary transitions
        /// in triggered-MRM (iSRM).  This ensures that light and isotope labeled precursors with the same
        /// transitions use the same ranking, and that only one isotope label type need be measured to
        /// produce a method for a document with light-heavy pairs.
        /// </summary>
        public TransitionGroupDocNode GetPrimaryResultsGroup(TransitionGroupDocNode nodeGroup)
        {
            TransitionGroupDocNode nodeGroupPrimary = nodeGroup;
            if (TransitionGroupCount > 1)
            {
                double maxArea = nodeGroup.AveragePeakArea ?? 0;
                int precursorCharge = nodeGroup.TransitionGroup.PrecursorCharge;
                foreach (var nodeGroupChild in TransitionGroups.Where(g =>
                        g.TransitionGroup.PrecursorCharge == precursorCharge &&
                        !ReferenceEquals(g, nodeGroup)))
                {
                    // Only when children match can one precursor provide primary values for another
                    if (!nodeGroup.EquivalentChildren(nodeGroupChild))
                        continue;

                    float peakArea = nodeGroupChild.AveragePeakArea ?? 0;
                    if (peakArea > maxArea)
                    {
                        maxArea = peakArea;
                        nodeGroupPrimary = nodeGroupChild;
                    }
                }
            }
            return nodeGroupPrimary;
        }