Exemple #1
0
        /// <summary>
        /// Gets the scoring parameter set for the given activation method.
        /// </summary>
        /// <param name="activationMethod">The activation method to find scoring parameters for.</param>
        /// <returns>Array of scoring parameters sorted by the mass of each parameter bin.</returns>
        public ScoringParameters[] GetScoringParameters(ActivationMethod activationMethod)
        {
            var searchParamDesc = new ScoringParameterDescription {
                ActivationMethod = activationMethod, IsTopDown = this.isTopDown
            };

            ScoringParameters[] parameters;
            if (this.scoringParameters.ContainsKey(searchParamDesc))
            {   // Seen this activation method already.
                parameters = this.scoringParameters[searchParamDesc];
            }
            else
            {   // Haven't seen this activation method yet. Try to load it from file.
                parameters = ScoringParameters.Parse(searchParamDesc.GetPath());
                this.scoringParameters.Add(searchParamDesc, parameters);
            }

            return(parameters);
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FlipScorer{TNeutralMonoSpectrum}" /> class.
 /// </summary>
 /// <param name="scoringParameters">Parameters to use for scoring ions.</param>
 /// <param name="productSpectrum">The deconvoluted spectrum to get ions to calculate scores for.</param>
 public FlipScorer(ScoringParameters scoringParameters, TNeutralMonoSpectrum productSpectrum)
 {
     this.scoringParameters = scoringParameters;
     this.ProductSpectrum   = productSpectrum;
 }