示例#1
0
        private TransitionDocNode GetMatchingTransition(SrmSettings settings,
                                                        TransitionGroupDocNode nodeGroupMatching,
                                                        TransitionDocNode nodeTran,
                                                        IFragmentMassCalc calc)
        {
            var transition     = nodeTran.Transition;
            var losses         = nodeTran.Losses;
            var libInfo        = nodeTran.LibInfo;
            int?decoyMassShift = transition.IsPrecursor() ? DecoyMassShift : transition.DecoyMassShift;
            var tranNew        = new Transition(this,
                                                transition.IonType,
                                                transition.CleavageOffset,
                                                transition.MassIndex,
                                                transition.Charge,
                                                decoyMassShift,
                                                transition.CustomIon ?? CustomIon); // Handle reporter ions as well as small molecules
            var    isotopeDist = nodeGroupMatching.IsotopeDist;
            double massH;

            if (tranNew.IsCustom())
            {
                massH = tranNew.CustomIon.GetMass(settings.TransitionSettings.Prediction.FragmentMassType);
            }
            else
            {
                massH = calc.GetFragmentMass(tranNew, isotopeDist);
            }
            var isotopeDistInfo  = TransitionDocNode.GetIsotopeDistInfo(tranNew, losses, isotopeDist);
            var nodeTranMatching = new TransitionDocNode(tranNew, losses, massH, isotopeDistInfo, libInfo);

            return(nodeTranMatching);
        }
示例#2
0
        private TransitionDocNode GetMatchingTransition(SrmSettings settings,
                                                        TransitionGroupDocNode nodeGroupMatching,
                                                        TransitionDocNode nodeTran,
                                                        IFragmentMassCalc calc)
        {
            var transition     = nodeTran.Transition;
            var losses         = nodeTran.Losses;
            var libInfo        = nodeTran.LibInfo;
            int?decoyMassShift = transition.IsPrecursor() ? DecoyMassShift : transition.DecoyMassShift;
            var tranNew        = new Transition(this,
                                                transition.IonType,
                                                transition.CleavageOffset,
                                                transition.MassIndex,
                                                transition.Adduct,
                                                decoyMassShift,
                                                transition.CustomIon ?? CustomMolecule); // Handle reporter ions as well as small molecules
            var       isotopeDist = nodeGroupMatching.IsotopeDist;
            TypedMass massH;
            var       massType = calc.MassType;

            if (tranNew.IsCustom())
            {
                massH = tranNew.CustomIon.GetMass(massType);
            }
            else
            {
                massH = calc.GetFragmentMass(tranNew, isotopeDist);
            }
            var isotopeDistInfo  = TransitionDocNode.GetIsotopeDistInfo(tranNew, losses, isotopeDist);
            var nodeTranMatching = new TransitionDocNode(tranNew, losses, massH, new TransitionDocNode.TransitionQuantInfo(isotopeDistInfo, libInfo, nodeTran.IsQuantitative(settings)), nodeTran.ExplicitValues);

            return(nodeTranMatching);
        }