コード例 #1
0
        /// <summary>
        /// Get possible ions for <paramref name="sequence"/>
        /// </summary>
        /// <param name="sequence"></param>
        /// <returns></returns>
        public IEnumerable <Ion> GetPossibleIons(Sequence sequence)
        {
            var cutComposition  = sequence.Composition;
            var terminalResidue = IsPrefixIon ? sequence[sequence.Count - 1] : sequence[0];

            return(BaseIonType.GetPossibleCompositions(terminalResidue)
                   .Select(offsetComposition => cutComposition + offsetComposition - NeutralLoss.Composition)
                   .Select(comp => new Ion(comp, Charge)));
        }
コード例 #2
0
 /// <summary>
 /// Get possible ions for <paramref name="cutComposition"/> and <paramref name="terminalResidue"/>
 /// </summary>
 /// <param name="cutComposition"></param>
 /// <param name="terminalResidue"></param>
 /// <returns></returns>
 public IEnumerable <Ion> GetPossibleIons(Composition.Composition cutComposition, AminoAcid terminalResidue)
 {
     return(BaseIonType.GetPossibleCompositions(terminalResidue)
            .Select(offsetComposition => cutComposition + offsetComposition - NeutralLoss.Composition)
            .Select(comp => new Ion(comp, Charge)));
 }